skuba 11.1.0-jest30-20250620003740 → 12.0.0-enable-js-extensions-20250704134302
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/jest/moduleNameMapper.js +4 -1
- package/lib/api/buildkite/annotate.js +2 -2
- package/lib/api/buildkite/annotate.js.map +1 -1
- package/lib/api/buildkite/index.d.ts +3 -3
- package/lib/api/buildkite/index.js +2 -2
- package/lib/api/buildkite/index.js.map +1 -1
- package/lib/api/git/commitAllChanges.d.ts +2 -2
- package/lib/api/git/commitAllChanges.js +3 -3
- package/lib/api/git/commitAllChanges.js.map +1 -1
- package/lib/api/git/getChangedFiles.js +1 -1
- package/lib/api/git/getChangedFiles.js.map +1 -1
- package/lib/api/git/index.d.ts +12 -12
- package/lib/api/git/index.js +11 -11
- package/lib/api/git/index.js.map +1 -1
- package/lib/api/git/pull.js +2 -2
- package/lib/api/git/pull.js.map +1 -1
- package/lib/api/git/push.js +2 -2
- package/lib/api/git/push.js.map +1 -1
- package/lib/api/git/reset.js +1 -1
- package/lib/api/git/reset.js.map +1 -1
- package/lib/api/github/checkRun.js +4 -4
- package/lib/api/github/checkRun.js.map +1 -1
- package/lib/api/github/environment.js +1 -1
- package/lib/api/github/environment.js.map +1 -1
- package/lib/api/github/index.d.ts +7 -7
- package/lib/api/github/index.js +6 -6
- package/lib/api/github/index.js.map +1 -1
- package/lib/api/github/issueComment.js +4 -4
- package/lib/api/github/issueComment.js.map +1 -1
- package/lib/api/github/pullRequest.js +3 -3
- package/lib/api/github/pullRequest.js.map +1 -1
- package/lib/api/github/push.d.ts +1 -1
- package/lib/api/github/push.js +3 -3
- package/lib/api/github/push.js.map +1 -1
- package/lib/api/jest/index.js +2 -2
- package/lib/api/jest/index.js.map +1 -1
- package/lib/api/net/compose.js +1 -1
- package/lib/api/net/compose.js.map +1 -1
- package/lib/api/net/index.d.ts +1 -1
- package/lib/api/net/index.js +1 -1
- package/lib/api/net/index.js.map +1 -1
- package/lib/api/net/waitFor.d.ts +1 -1
- package/lib/api/net/waitFor.js +2 -2
- package/lib/api/net/waitFor.js.map +1 -1
- package/lib/cli/adapter/eslint.d.ts +1 -1
- package/lib/cli/adapter/eslint.js +1 -1
- package/lib/cli/adapter/eslint.js.map +1 -1
- package/lib/cli/adapter/prettier.d.ts +1 -1
- package/lib/cli/adapter/prettier.js +4 -4
- package/lib/cli/adapter/prettier.js.map +2 -2
- package/lib/cli/build/assets.d.ts +1 -1
- package/lib/cli/build/assets.js +4 -4
- package/lib/cli/build/assets.js.map +1 -1
- package/lib/cli/build/esbuild.js +3 -3
- package/lib/cli/build/esbuild.js.map +1 -1
- package/lib/cli/build/index.js +6 -6
- package/lib/cli/build/index.js.map +1 -1
- package/lib/cli/build/tsc.d.ts +1 -1
- package/lib/cli/build/tsc.js +2 -2
- package/lib/cli/build/tsc.js.map +1 -1
- package/lib/cli/buildPackage/index.js +3 -3
- package/lib/cli/buildPackage/index.js.map +1 -1
- package/lib/cli/configure/analyseConfiguration.d.ts +2 -2
- package/lib/cli/configure/analyseConfiguration.js +2 -2
- package/lib/cli/configure/analyseConfiguration.js.map +1 -1
- package/lib/cli/configure/analyseDependencies.d.ts +1 -1
- package/lib/cli/configure/analyseDependencies.js +6 -6
- package/lib/cli/configure/analyseDependencies.js.map +1 -1
- package/lib/cli/configure/analysis/files.js +1 -1
- package/lib/cli/configure/analysis/files.js.map +1 -1
- package/lib/cli/configure/analysis/git.js +2 -2
- package/lib/cli/configure/analysis/git.js.map +1 -1
- package/lib/cli/configure/analysis/package.d.ts +1 -1
- package/lib/cli/configure/analysis/package.js +2 -2
- package/lib/cli/configure/analysis/package.js.map +1 -1
- package/lib/cli/configure/analysis/project.d.ts +1 -1
- package/lib/cli/configure/analysis/project.js +4 -4
- package/lib/cli/configure/analysis/project.js.map +2 -2
- package/lib/cli/configure/dependencies/index.d.ts +5 -5
- package/lib/cli/configure/dependencies/index.js +5 -5
- package/lib/cli/configure/dependencies/index.js.map +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.d.ts +2 -2
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js +1 -1
- package/lib/cli/configure/dependencies/seekDatadogCustomMetrics.js.map +1 -1
- package/lib/cli/configure/dependencies/seekKoala.d.ts +2 -2
- package/lib/cli/configure/dependencies/seekKoala.js +1 -1
- package/lib/cli/configure/dependencies/seekKoala.js.map +1 -1
- package/lib/cli/configure/dependencies/skuba.d.ts +2 -2
- package/lib/cli/configure/dependencies/skuba.js +1 -1
- package/lib/cli/configure/dependencies/skuba.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.d.ts +1 -1
- package/lib/cli/configure/dependencies/skubaDeps.js.map +1 -1
- package/lib/cli/configure/dependencies/skubaDive.d.ts +2 -2
- package/lib/cli/configure/dependencies/skubaDive.js +1 -1
- package/lib/cli/configure/dependencies/skubaDive.js.map +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.d.ts +1 -1
- package/lib/cli/configure/ensureTemplateCompletion.js +6 -6
- package/lib/cli/configure/ensureTemplateCompletion.js.map +1 -1
- package/lib/cli/configure/getEntryPoint.d.ts +2 -2
- package/lib/cli/configure/getEntryPoint.js +3 -3
- package/lib/cli/configure/getEntryPoint.js.map +1 -1
- package/lib/cli/configure/getProjectType.d.ts +2 -2
- package/lib/cli/configure/getProjectType.js +3 -3
- package/lib/cli/configure/getProjectType.js.map +1 -1
- package/lib/cli/configure/index.js +14 -14
- package/lib/cli/configure/index.js.map +1 -1
- package/lib/cli/configure/modules/eslint.d.ts +1 -1
- package/lib/cli/configure/modules/eslint.js +4 -4
- package/lib/cli/configure/modules/eslint.js.map +1 -1
- package/lib/cli/configure/modules/ignore.d.ts +1 -1
- package/lib/cli/configure/modules/ignore.js +2 -2
- package/lib/cli/configure/modules/ignore.js.map +1 -1
- package/lib/cli/configure/modules/index.d.ts +1 -1
- package/lib/cli/configure/modules/index.js +10 -10
- package/lib/cli/configure/modules/index.js.map +1 -1
- package/lib/cli/configure/modules/jest.d.ts +1 -1
- package/lib/cli/configure/modules/jest.js +4 -4
- package/lib/cli/configure/modules/jest.js.map +1 -1
- package/lib/cli/configure/modules/nodemon.d.ts +1 -1
- package/lib/cli/configure/modules/nodemon.js +1 -1
- package/lib/cli/configure/modules/nodemon.js.map +1 -1
- package/lib/cli/configure/modules/package.d.ts +1 -1
- package/lib/cli/configure/modules/package.js +4 -4
- package/lib/cli/configure/modules/package.js.map +1 -1
- package/lib/cli/configure/modules/prettier.d.ts +1 -1
- package/lib/cli/configure/modules/prettier.js +4 -4
- package/lib/cli/configure/modules/prettier.js.map +1 -1
- package/lib/cli/configure/modules/renovate.d.ts +1 -1
- package/lib/cli/configure/modules/renovate.js +5 -5
- package/lib/cli/configure/modules/renovate.js.map +1 -1
- package/lib/cli/configure/modules/serverless.d.ts +1 -1
- package/lib/cli/configure/modules/serverless.js.map +1 -1
- package/lib/cli/configure/modules/skubaDive.d.ts +1 -1
- package/lib/cli/configure/modules/skubaDive.js +4 -4
- package/lib/cli/configure/modules/skubaDive.js.map +1 -1
- package/lib/cli/configure/modules/tslint.d.ts +1 -1
- package/lib/cli/configure/modules/tslint.js +1 -1
- package/lib/cli/configure/modules/tslint.js.map +1 -1
- package/lib/cli/configure/processing/deleteFiles.d.ts +1 -1
- package/lib/cli/configure/processing/deleteFiles.js.map +1 -1
- package/lib/cli/configure/processing/json.js +2 -2
- package/lib/cli/configure/processing/json.js.map +1 -1
- package/lib/cli/configure/processing/loadFiles.d.ts +1 -1
- package/lib/cli/configure/processing/loadFiles.js.map +1 -1
- package/lib/cli/configure/processing/module.d.ts +1 -1
- package/lib/cli/configure/processing/module.js +1 -1
- package/lib/cli/configure/processing/module.js.map +1 -1
- package/lib/cli/configure/processing/package.d.ts +1 -1
- package/lib/cli/configure/processing/package.js +2 -2
- package/lib/cli/configure/processing/package.js.map +1 -1
- package/lib/cli/configure/processing/prettier.js +1 -1
- package/lib/cli/configure/processing/prettier.js.map +1 -1
- package/lib/cli/configure/processing/typescript.js +1 -1
- package/lib/cli/configure/processing/typescript.js.map +1 -1
- package/lib/cli/configure/types.d.ts +2 -2
- package/lib/cli/configure/types.js.map +1 -1
- package/lib/cli/format/index.js +5 -5
- package/lib/cli/format/index.js.map +1 -1
- package/lib/cli/help/index.js +2 -2
- package/lib/cli/help/index.js.map +1 -1
- package/lib/cli/init/getConfig.d.ts +3 -3
- package/lib/cli/init/getConfig.js +9 -9
- package/lib/cli/init/getConfig.js.map +1 -1
- package/lib/cli/init/git.js +2 -2
- package/lib/cli/init/git.js.map +1 -1
- package/lib/cli/init/index.js +15 -15
- package/lib/cli/init/index.js.map +1 -1
- package/lib/cli/init/prompts.d.ts +1 -1
- package/lib/cli/init/prompts.js +2 -2
- package/lib/cli/init/prompts.js.map +1 -1
- package/lib/cli/init/types.js +2 -2
- package/lib/cli/init/types.js.map +1 -1
- package/lib/cli/init/writePackageJson.d.ts +1 -1
- package/lib/cli/init/writePackageJson.js +2 -2
- package/lib/cli/init/writePackageJson.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js +1 -1
- package/lib/cli/lint/annotate/buildkite/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/index.d.ts +4 -4
- package/lib/cli/lint/annotate/buildkite/index.js +5 -5
- package/lib/cli/lint/annotate/buildkite/index.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js +1 -1
- package/lib/cli/lint/annotate/buildkite/internal.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js +1 -1
- package/lib/cli/lint/annotate/buildkite/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.d.ts +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js +1 -1
- package/lib/cli/lint/annotate/buildkite/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/github/eslint.d.ts +2 -2
- package/lib/cli/lint/annotate/github/eslint.js.map +1 -1
- package/lib/cli/lint/annotate/github/index.d.ts +4 -4
- package/lib/cli/lint/annotate/github/index.js +6 -6
- package/lib/cli/lint/annotate/github/index.js.map +2 -2
- package/lib/cli/lint/annotate/github/internal.d.ts +2 -2
- package/lib/cli/lint/annotate/github/internal.js.map +1 -1
- package/lib/cli/lint/annotate/github/prettier.d.ts +2 -2
- package/lib/cli/lint/annotate/github/prettier.js.map +1 -1
- package/lib/cli/lint/annotate/github/tsc.d.ts +2 -2
- package/lib/cli/lint/annotate/github/tsc.js.map +1 -1
- package/lib/cli/lint/annotate/index.d.ts +4 -4
- package/lib/cli/lint/annotate/index.js +2 -2
- package/lib/cli/lint/annotate/index.js.map +1 -1
- package/lib/cli/lint/autofix.d.ts +2 -2
- package/lib/cli/lint/autofix.js +11 -11
- package/lib/cli/lint/autofix.js.map +1 -1
- package/lib/cli/lint/eslint.d.ts +2 -2
- package/lib/cli/lint/eslint.js +3 -3
- package/lib/cli/lint/eslint.js.map +1 -1
- package/lib/cli/lint/external.d.ts +3 -3
- package/lib/cli/lint/external.js +3 -3
- package/lib/cli/lint/external.js.map +1 -1
- package/lib/cli/lint/index.js +8 -8
- package/lib/cli/lint/index.js.map +1 -1
- package/lib/cli/lint/internal.d.ts +1 -1
- package/lib/cli/lint/internal.js +5 -5
- package/lib/cli/lint/internal.js.map +1 -1
- package/lib/cli/lint/internalLints/detectBadCodeowners.d.ts +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js +2 -2
- package/lib/cli/lint/internalLints/detectBadCodeowners.js.map +1 -1
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.d.ts +2 -2
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js +2 -2
- package/lib/cli/lint/internalLints/noSkubaTemplateJs.js.map +1 -1
- package/lib/cli/lint/internalLints/patchRenovateConfig.d.ts +2 -2
- package/lib/cli/lint/internalLints/patchRenovateConfig.js +5 -5
- package/lib/cli/lint/internalLints/patchRenovateConfig.js.map +1 -1
- package/lib/cli/lint/internalLints/refreshConfigFiles.d.ts +3 -3
- package/lib/cli/lint/internalLints/refreshConfigFiles.js +7 -7
- package/lib/cli/lint/internalLints/refreshConfigFiles.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/index.d.ts +3 -3
- package/lib/cli/lint/internalLints/upgrade/index.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.0.4/removeYarnIgnoreOptionalFlags.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/migrateNpmrcToPnpmWorkspace.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/10.1.0/stopBundlingInCDKTests.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/addEmptyExports.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js +4 -4
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/index.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchDockerfile.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js +3 -3
- package/lib/cli/lint/internalLints/upgrade/patches/7.3.1/patchServerListener.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js +5 -5
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js +5 -5
- package/lib/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.js.map +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/index.js.map +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.d.ts +1 -1
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js +2 -2
- package/lib/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.js.map +2 -2
- package/lib/cli/lint/prettier.d.ts +2 -2
- package/lib/cli/lint/prettier.js +3 -3
- package/lib/cli/lint/prettier.js.map +1 -1
- package/lib/cli/lint/tsc.d.ts +1 -1
- package/lib/cli/lint/tsc.js +1 -1
- package/lib/cli/lint/tsc.js.map +1 -1
- package/lib/cli/migrate/index.js +2 -2
- package/lib/cli/migrate/index.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js +1 -1
- package/lib/cli/migrate/nodeVersion/checks.js.map +1 -1
- package/lib/cli/migrate/nodeVersion/index.js +21 -21
- package/lib/cli/migrate/nodeVersion/index.js.map +2 -2
- package/lib/cli/node/index.js +3 -3
- package/lib/cli/node/index.js.map +1 -1
- package/lib/cli/release/index.js +1 -1
- package/lib/cli/release/index.js.map +1 -1
- package/lib/cli/start/index.js +4 -4
- package/lib/cli/start/index.js.map +1 -1
- package/lib/cli/test/reporters/github/annotations.d.ts +1 -1
- package/lib/cli/test/reporters/github/annotations.js.map +1 -1
- package/lib/cli/test/reporters/github/index.js +5 -5
- package/lib/cli/test/reporters/github/index.js.map +2 -2
- package/lib/cli/version/index.js +2 -2
- package/lib/cli/version/index.js.map +1 -1
- package/lib/index.d.ts +5 -5
- package/lib/index.js +5 -5
- package/lib/index.js.map +1 -1
- package/lib/skuba.js +8 -8
- package/lib/skuba.js.map +1 -1
- package/lib/utils/args.js +1 -1
- package/lib/utils/args.js.map +1 -1
- package/lib/utils/copy.js +2 -2
- package/lib/utils/copy.js.map +1 -1
- package/lib/utils/dir.js +2 -2
- package/lib/utils/dir.js.map +1 -1
- package/lib/utils/error.js +2 -2
- package/lib/utils/error.js.map +1 -1
- package/lib/utils/exec.d.ts +1 -1
- package/lib/utils/exec.js +2 -2
- package/lib/utils/exec.js.map +1 -1
- package/lib/utils/help.js +2 -2
- package/lib/utils/help.js.map +1 -1
- package/lib/utils/logo.js +3 -3
- package/lib/utils/logo.js.map +1 -1
- package/lib/utils/manifest.js +1 -1
- package/lib/utils/manifest.js.map +1 -1
- package/lib/utils/packageManager.js +1 -1
- package/lib/utils/packageManager.js.map +1 -1
- package/lib/utils/template.js +2 -2
- package/lib/utils/template.js.map +1 -1
- package/lib/utils/version.js +2 -2
- package/lib/utils/version.js.map +1 -1
- package/lib/utils/wait.js +2 -2
- package/lib/utils/wait.js.map +1 -1
- package/lib/utils/worker.d.ts +3 -3
- package/lib/utils/worker.js +1 -1
- package/lib/utils/worker.js.map +1 -1
- package/lib/wrapper/functionHandler.js +3 -3
- package/lib/wrapper/functionHandler.js.map +1 -1
- package/lib/wrapper/http.js +1 -1
- package/lib/wrapper/http.js.map +1 -1
- package/lib/wrapper/index.js +3 -3
- package/lib/wrapper/index.js.map +1 -1
- package/lib/wrapper/main.js +2 -2
- package/lib/wrapper/main.js.map +1 -1
- package/lib/wrapper/requestListener.js +2 -2
- package/lib/wrapper/requestListener.js.map +1 -1
- package/package.json +15 -15
- package/template/express-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/express-rest-api/Dockerfile.dev-deps +1 -1
- package/template/express-rest-api/package.json +1 -1
- package/template/express-rest-api/src/app.test.ts +1 -1
- package/template/express-rest-api/src/app.ts +3 -3
- package/template/express-rest-api/src/framework/logging.ts +1 -1
- package/template/express-rest-api/src/framework/metrics.ts +2 -2
- package/template/express-rest-api/src/listen.ts +4 -4
- package/template/greeter/.buildkite/pipeline.yml +1 -1
- package/template/greeter/Dockerfile +1 -1
- package/template/greeter/package.json +2 -2
- package/template/greeter/src/app.test.ts +1 -1
- package/template/koa-rest-api/.buildkite/pipeline.yml +1 -1
- package/template/koa-rest-api/Dockerfile.dev-deps +1 -1
- package/template/koa-rest-api/package.json +7 -7
- package/template/koa-rest-api/src/api/healthCheck.ts +1 -1
- package/template/koa-rest-api/src/api/index.ts +3 -3
- package/template/koa-rest-api/src/api/jobs/getJobs.test.ts +2 -2
- package/template/koa-rest-api/src/api/jobs/getJobs.ts +4 -4
- package/template/koa-rest-api/src/api/jobs/index.ts +3 -3
- package/template/koa-rest-api/src/api/jobs/postJob.test.ts +4 -4
- package/template/koa-rest-api/src/api/jobs/postJob.ts +6 -6
- package/template/koa-rest-api/src/api/smokeTest.ts +2 -2
- package/template/koa-rest-api/src/app.test.ts +2 -2
- package/template/koa-rest-api/src/app.ts +3 -3
- package/template/koa-rest-api/src/config.ts +1 -1
- package/template/koa-rest-api/src/framework/logging.ts +22 -13
- package/template/koa-rest-api/src/framework/metrics.ts +2 -2
- package/template/koa-rest-api/src/framework/server.test.ts +95 -64
- package/template/koa-rest-api/src/framework/server.ts +3 -3
- package/template/koa-rest-api/src/framework/validation.test.ts +35 -35
- package/template/koa-rest-api/src/framework/validation.ts +15 -22
- package/template/koa-rest-api/src/listen.ts +4 -4
- package/template/koa-rest-api/src/storage/jobs.ts +1 -1
- package/template/koa-rest-api/src/testing/metrics.ts +1 -1
- package/template/koa-rest-api/src/testing/server.ts +1 -1
- package/template/koa-rest-api/src/testing/types.ts +2 -2
- package/template/koa-rest-api/src/types/jobs.ts +1 -1
- package/template/lambda-sqs-worker-cdk/.buildkite/pipeline.yml +2 -2
- package/template/lambda-sqs-worker-cdk/Dockerfile +1 -1
- package/template/lambda-sqs-worker-cdk/infra/__snapshots__/appStack.test.ts.snap +6 -0
- package/template/lambda-sqs-worker-cdk/infra/appStack.ts +1 -1
- package/template/lambda-sqs-worker-cdk/infra/index.ts +2 -2
- package/template/lambda-sqs-worker-cdk/package.json +5 -5
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +81 -22
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -7
- package/template/lambda-sqs-worker-cdk/src/config.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +38 -18
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/framework/logging.ts +23 -12
- package/template/lambda-sqs-worker-cdk/src/framework/metrics.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +8 -11
- package/template/lambda-sqs-worker-cdk/src/framework/validation.ts +3 -7
- package/template/lambda-sqs-worker-cdk/src/mapping/jobScorer.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/jobScorer.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.test.ts +3 -3
- package/template/lambda-sqs-worker-cdk/src/services/pipelineEventSender.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/handler.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/testing/services.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/testing/types.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/types/jobScorer.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/types/pipelineEvents.ts +1 -1
- package/template/oss-npm-package/src/index.test.ts +1 -1
- package/template/private-npm-package/src/index.test.ts +1 -1
- package/template/koa-rest-api/src/testing/logging.ts +0 -16
- package/template/lambda-sqs-worker-cdk/src/testing/logging.ts +0 -19
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.0.0/patchPnpmPackageManager.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\nimport { lt } from 'semver';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AACf,oBAAmB;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\nimport { lt } from 'semver';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKERFILE_COREPACK_COMMAND = 'RUN corepack enable pnpm';\nconst PACKAGE_JSON_MOUNT = `RUN --mount=type=bind,source=package.json,target=package.json \\\\\n corepack enable pnpm && corepack install`;\nconst PACKAGE_JSON_CACHE = '- package.json#.packageManager';\n\nconst BEFORE_PIPELINE_REGEX =\n /(\\s*cache-on:\\s*\\n\\s*-\\s*\\.npmrc\\s*\\n)((\\s*)-\\s*pnpm-lock\\.yaml)/gm;\nconst ECR_REGEX = /seek-oss\\/docker-ecr-cache#v([\\d\\.]+)/gm;\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchPnpmPackageManager: PatchFunction = async ({\n mode,\n manifest,\n packageManager,\n}): Promise<PatchReturnType> => {\n if (packageManager.command !== 'pnpm') {\n return {\n result: 'skip',\n reason: 'not using pnpm',\n };\n }\n\n if (\n !(\n manifest.packageJson as { packageManager?: string }\n ).packageManager?.includes('pnpm')\n ) {\n return {\n result: 'skip',\n reason: 'no packageManager declaration in package.json found',\n };\n }\n\n const [maybeDockerfiles, maybePipelines] = await Promise.all([\n fg(['Dockerfile*']),\n fg(['.buildkite/*.yml']),\n ]);\n\n if (!maybeDockerfiles.length || !maybePipelines.length) {\n return {\n result: 'skip',\n reason: 'Either dockerfiles or pipelines were not found',\n };\n }\n\n const [dockerfiles, pipelines] = await Promise.all([\n fetchFiles(maybeDockerfiles),\n fetchFiles(maybePipelines),\n ]);\n\n const dockerFilesToPatch = dockerfiles.filter(\n ({ contents }) =>\n contents.includes(DOCKERFILE_COREPACK_COMMAND) &&\n !contents.includes('target=package.json'),\n );\n\n const pipelinesToPatch = pipelines.filter(({ contents }) =>\n Boolean(BEFORE_PIPELINE_REGEX.exec(contents)),\n );\n\n if (!dockerFilesToPatch.length && !pipelinesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no pipeline or dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n if (dockerFilesToPatch.length) {\n await Promise.all(\n dockerFilesToPatch.map(async ({ file, contents }) => {\n const patchedContent = contents.replace(\n DOCKERFILE_COREPACK_COMMAND,\n PACKAGE_JSON_MOUNT,\n );\n await fs.writeFile(file, patchedContent);\n }),\n );\n }\n\n if (pipelinesToPatch.length) {\n await Promise.all(\n pipelinesToPatch.map(async ({ file, contents }) => {\n const patchedContent = contents.replace(\n BEFORE_PIPELINE_REGEX,\n `$1$3${PACKAGE_JSON_CACHE}\\n$2`,\n );\n\n const patchedEcrContent = patchedContent.replace(\n ECR_REGEX,\n (match, version) => {\n if (typeof version === 'string' && lt(version, '2.2.0')) {\n return 'seek-oss/docker-ecr-cache#v2.2.0';\n }\n return match;\n },\n );\n\n await fs.writeFile(file, patchedEcrContent);\n }),\n );\n }\n\n return { result: 'apply' };\n};\n\nexport const tryPatchPnpmPackageManager: PatchFunction = async (config) => {\n try {\n return await patchPnpmPackageManager(config);\n } catch (err) {\n log.warn('Failed to patch pnpm packageManager CI configuration.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AACf,oBAAmB;AAEnB,qBAAoB;AAGpB,MAAM,8BAA8B;AACpC,MAAM,qBAAqB;AAAA;AAE3B,MAAM,qBAAqB;AAE3B,MAAM,wBACJ;AACF,MAAM,YAAY;AAElB,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,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AAAA,EAC3B;AAEA,MAAI,mBAAmB,QAAQ;AAC7B,UAAM,QAAQ;AAAA,MACZ,mBAAmB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACnD,cAAM,iBAAiB,SAAS;AAAA,UAC9B;AAAA,UACA;AAAA,QACF;AACA,cAAM,gBAAAD,QAAG,UAAU,MAAM,cAAc;AAAA,MACzC,CAAC;AAAA,IACH;AAAA,EACF;AAEA,MAAI,iBAAiB,QAAQ;AAC3B,UAAM,QAAQ;AAAA,MACZ,iBAAiB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACjD,cAAM,iBAAiB,SAAS;AAAA,UAC9B;AAAA,UACA,OAAO,kBAAkB;AAAA;AAAA,QAC3B;AAEA,cAAM,oBAAoB,eAAe;AAAA,UACvC;AAAA,UACA,CAAC,OAAO,YAAY;AAClB,gBAAI,OAAO,YAAY,gBAAY,kBAAG,SAAS,OAAO,GAAG;AACvD,qBAAO;AAAA,YACT;AACA,mBAAO;AAAA,UACT;AAAA,QACF;AAEA,cAAM,gBAAAA,QAAG,UAAU,MAAM,iBAAiB;AAAA,MAC5C,CAAC;AAAA,IACH;AAAA,EACF;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,6BAA4C,OAAO,WAAW;AACzE,MAAI;AACF,WAAO,MAAM,wBAAwB,MAAM;AAAA,EAC7C,SAAS,KAAK;AACZ,uBAAI,KAAK,uDAAuD;AAChE,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryCollapseDuplicateMergeKeys: PatchFunction;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(collapseDuplicateMergeKeys_exports);
|
|
|
34
34
|
var import_util = require("util");
|
|
35
35
|
var import_fast_glob = require("fast-glob");
|
|
36
36
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
37
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
38
38
|
const collapseDuplicateMergeKeys = async ({
|
|
39
39
|
mode
|
|
40
40
|
}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/collapseDuplicateMergeKeys.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst collapseDuplicateMergeKeys: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const buildkiteFiles = await glob(\n ['{apps/*/,packages/*/,./}.buildkite/**/*.y*ml'],\n { onlyFiles: true },\n );\n\n if (buildkiteFiles.length === 0) {\n return { result: 'skip', reason: 'no Buildkite files found' };\n }\n\n const input = await Promise.all(\n buildkiteFiles.map((name) => fs.promises.readFile(name, 'utf-8')),\n );\n\n const replaced = input.map(collapseDuplicateMergeKeysInFile);\n\n if (replaced.every((r, i) => r === input[i])) {\n return { result: 'skip', reason: 'no duplicate merge keys found' };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await Promise.all(\n buildkiteFiles.flatMap((name, i) =>\n replaced[i] !== input[i]\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n [fs.promises.writeFile(name, replaced[i]!)]\n : [],\n ),\n );\n\n return { result: 'apply' };\n};\n\nconst collapseDuplicateMergeKeysInFile = (input: string) =>\n replaceAllUntilStable(\n input,\n /^([ \\-]*)<<: \\[?(\\*[^\\n#\\]]+)\\]?(\\s*#.*)?$\\n^( *)<<: \\[?(\\*[^\\n#\\]]+)\\]?(\\s*#.*)?$/gm,\n (match, prefixA, keyA, commentA, prefixB, keyB, commentB) => {\n if (prefixA.length === prefixB.length) {\n return [\n ...(commentA\n ? [`${' '.repeat(prefixA.length)}${commentA.trim()}`]\n : []),\n ...(commentB\n ? [`${' '.repeat(prefixA.length)}${commentB.trim()}`]\n : []),\n `${prefixA}<<: [${keyA.trim()}, ${keyB.trim()}]`,\n ].join('\\n');\n }\n return match;\n },\n );\n\nconst replaceAllUntilStable = (\n input: string,\n searchValue: RegExp,\n replacer: (substring: string, ...args: string[]) => string,\n): string => {\n let output = input;\n let previousOutput;\n\n do {\n previousOutput = output;\n output = output.replace(searchValue, replacer);\n } while (output !== previousOutput);\n\n return output;\n};\n\nexport const tryCollapseDuplicateMergeKeys: PatchFunction = async (config) => {\n try {\n return await collapseDuplicateMergeKeys(config);\n } catch (err) {\n log.warn('Failed to collapse duplicate merge keys.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,6BAA4C,OAAO;AAAA,EACvD;AACF,MAAgC;AAC9B,QAAM,iBAAiB,UAAM;AAAA,IAC3B,CAAC,8CAA8C;AAAA,IAC/C,EAAE,WAAW,KAAK;AAAA,EACpB;AAEA,MAAI,eAAe,WAAW,GAAG;AAC/B,WAAO,EAAE,QAAQ,QAAQ,QAAQ,2BAA2B;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AAI;AAEJ,KAAG;AACD,qBAAiB;AACjB,aAAS,OAAO,QAAQ,aAAa,QAAQ;AAAA,EAC/C,SAAS,WAAW;AAEpB,SAAO;AACT;AAEO,MAAM,gCAA+C,OAAO,WAAW;AAC5E,MAAI;AACF,WAAO,MAAM,2BAA2B,MAAM;AAAA,EAChD,SAAS,KAAK;AACZ,uBAAI,KAAK,0CAA0C;AACnD,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Patches } from '
|
|
1
|
+
import type { Patches } from '../../index.js';
|
|
2
2
|
export declare const patches: Patches;
|
|
@@ -21,11 +21,11 @@ __export(__exports, {
|
|
|
21
21
|
patches: () => patches
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_collapseDuplicateMergeKeys = require("./collapseDuplicateMergeKeys");
|
|
25
|
-
var import_moveNpmrcMounts = require("./moveNpmrcMounts");
|
|
26
|
-
var import_patchDockerCompose = require("./patchDockerCompose");
|
|
27
|
-
var import_patchDockerImages = require("./patchDockerImages");
|
|
28
|
-
var import_upgradeESLint = require("./upgradeESLint");
|
|
24
|
+
var import_collapseDuplicateMergeKeys = require("./collapseDuplicateMergeKeys.js");
|
|
25
|
+
var import_moveNpmrcMounts = require("./moveNpmrcMounts.js");
|
|
26
|
+
var import_patchDockerCompose = require("./patchDockerCompose.js");
|
|
27
|
+
var import_patchDockerImages = require("./patchDockerImages.js");
|
|
28
|
+
var import_upgradeESLint = require("./upgradeESLint.js");
|
|
29
29
|
const patches = [
|
|
30
30
|
{
|
|
31
31
|
apply: import_collapseDuplicateMergeKeys.tryCollapseDuplicateMergeKeys,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Patches } from '
|
|
4
|
+
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryCollapseDuplicateMergeKeys } from './collapseDuplicateMergeKeys.js';\nimport { tryMoveNpmrcMounts } from './moveNpmrcMounts.js';\nimport { tryPatchDockerComposeFiles } from './patchDockerCompose.js';\nimport { tryPatchDockerImages } from './patchDockerImages.js';\nimport { tryUpgradeESLint } from './upgradeESLint.js';\n\nexport const patches: Patches = [\n {\n apply: tryCollapseDuplicateMergeKeys,\n description: 'Collapse duplicate merge keys in .buildkite files',\n },\n {\n apply: tryUpgradeESLint,\n description: 'Upgrade to ESLint flat config',\n },\n {\n apply: tryPatchDockerComposeFiles,\n description: 'Remove version field from docker-compose files',\n },\n {\n apply: tryPatchDockerImages,\n description:\n 'Update docker image references to use public.ecr.aws and remove --platform flag',\n },\n {\n apply: tryMoveNpmrcMounts,\n description: 'Move .npmrc mounts from tmp/.npmrc to /tmp/.npmrc',\n },\n];\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,wCAA8C;AAC9C,6BAAmC;AACnC,gCAA2C;AAC3C,+BAAqC;AACrC,2BAAiC;AAE1B,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aACE;AAAA,EACJ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryMoveNpmrcMounts: PatchFunction;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(moveNpmrcMounts_exports);
|
|
|
34
34
|
var import_util = require("util");
|
|
35
35
|
var import_fast_glob = require("fast-glob");
|
|
36
36
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
37
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
38
38
|
const moveNpmrcMounts = async ({
|
|
39
39
|
mode
|
|
40
40
|
}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/moveNpmrcMounts.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport { glob } from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst moveNpmrcMounts: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const buildkiteFiles = await glob(\n ['{apps/*/,packages/*/,./}.buildkite/**/*.y*ml'],\n { onlyFiles: true },\n );\n\n if (buildkiteFiles.length === 0) {\n return { result: 'skip', reason: 'no Buildkite files found' };\n }\n\n const input = await Promise.all(\n buildkiteFiles.map((name) => fs.promises.readFile(name, 'utf-8')),\n );\n\n const replaced = input.map(moveNpmrcMountsInFile);\n\n if (replaced.every((r, i) => r === input[i])) {\n return {\n result: 'skip',\n reason: 'no .npmrc mounts found need to be updated',\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await Promise.all(\n buildkiteFiles.flatMap((name, i) =>\n replaced[i] !== input[i]\n ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n [fs.promises.writeFile(name, replaced[i]!)]\n : [],\n ),\n );\n\n return { result: 'apply' };\n};\n\nconst secret = /^(\\s*)secrets: id=npm,src=tmp\\/\\.npmrc(\\s*#?.*)$/gm;\nconst outputPath = /^(\\s*)output-path: tmp\\/(\\s*#?.*)$/gm;\n\nconst moveNpmrcMountsInFile = (input: string) => {\n if (!secret.test(input) || !outputPath.test(input)) {\n return input;\n }\n\n return input\n .replaceAll(secret, '$1secrets: id=npm,src=/tmp/.npmrc$2')\n .replaceAll(outputPath, '$1output-path: /tmp/$2');\n};\n\nexport const tryMoveNpmrcMounts: PatchFunction = async (config) => {\n try {\n return await moveNpmrcMounts(config);\n } catch (err) {\n log.warn('Failed to move .npmrc mounts');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAqB;AACrB,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,kBAAiC,OAAO;AAAA,EAC5C;AACF,MAAgC;AAC9B,QAAM,iBAAiB,UAAM;AAAA,IAC3B,CAAC,8CAA8C;AAAA,IAC/C,EAAE,WAAW,KAAK;AAAA,EACpB;AAEA,MAAI,eAAe,WAAW,GAAG;AAC/B,WAAO,EAAE,QAAQ,QAAQ,QAAQ,2BAA2B;AAAA,EAC9D;AAEA,QAAM,QAAQ,MAAM,QAAQ;AAAA,IAC1B,eAAe,IAAI,CAAC,SAAS,gBAAAA,QAAG,SAAS,SAAS,MAAM,OAAO,CAAC;AAAA,EAClE;AAEA,QAAM,WAAW,MAAM,IAAI,qBAAqB;AAEhD,MAAI,SAAS,MAAM,CAAC,GAAG,MAAM,MAAM,MAAM,CAAC,CAAC,GAAG;AAC5C,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,QAAM,QAAQ;AAAA,IACZ,eAAe;AAAA,MAAQ,CAAC,MAAM,MAC5B,SAAS,CAAC,MAAM,MAAM,CAAC;AAAA;AAAA,QAEnB,CAAC,gBAAAA,QAAG,SAAS,UAAU,MAAM,SAAS,CAAC,CAAE,CAAC;AAAA,UAC1C,CAAC;AAAA,IACP;AAAA,EACF;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEA,MAAM,SAAS;AACf,MAAM,aAAa;AAEnB,MAAM,wBAAwB,CAAC,UAAkB;AAC/C,MAAI,CAAC,OAAO,KAAK,KAAK,KAAK,CAAC,WAAW,KAAK,KAAK,GAAG;AAClD,WAAO;AAAA,EACT;AAEA,SAAO,MACJ,WAAW,QAAQ,qCAAqC,EACxD,WAAW,YAAY,wBAAwB;AACpD;AAEO,MAAM,qBAAoC,OAAO,WAAW;AACjE,MAAI;AACF,WAAO,MAAM,gBAAgB,MAAM;AAAA,EACrC,SAAS,KAAK;AACZ,uBAAI,KAAK,8BAA8B;AACvC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryPatchDockerComposeFiles: PatchFunction;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(patchDockerCompose_exports);
|
|
|
34
34
|
var import_util = require("util");
|
|
35
35
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
36
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
37
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
38
38
|
const DOCKER_COMPOSE_VERSION_REGEX = /^version: ['"]?\d+(\.\d+)*['"]?\n*/m;
|
|
39
39
|
const fetchFiles = async (files) => Promise.all(
|
|
40
40
|
files.map(async (file) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerCompose.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_COMPOSE_VERSION_REGEX = /^version: ['\"]?\\d+(\\.\\d+)*['\"]?\\n*/m;\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchDockerComposeFiles: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const maybeDockerComposeFiles = await fg(['docker-compose*.yml']);\n\n if (!maybeDockerComposeFiles.length) {\n return {\n result: 'skip',\n reason: 'no docker-compose files found',\n };\n }\n\n const dockerComposeFiles = await fetchFiles(maybeDockerComposeFiles);\n\n const dockerComposeFilesToPatch = dockerComposeFiles.filter(({ contents }) =>\n DOCKER_COMPOSE_VERSION_REGEX.exec(contents),\n );\n\n if (!dockerComposeFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no docker-compose files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerComposeFilesToPatch.map(async ({ file, contents }) => {\n const patchedContents = contents.replace(\n DOCKER_COMPOSE_VERSION_REGEX,\n '',\n );\n await fs.writeFile(file, patchedContents);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const tryPatchDockerComposeFiles: PatchFunction = async (config) => {\n try {\n return await patchDockerComposeFiles(config);\n } catch (err) {\n log.warn('Failed to patch pnpm packageManager CI configuration.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,+BAA+B;AAErC,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,gBAAAA,QAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,0BAAyC,OAAO;AAAA,EACpD;AACF,MAAgC;AAC9B,QAAM,0BAA0B,UAAM,iBAAAC,SAAG,CAAC,qBAAqB,CAAC;AAEhE,MAAI,CAAC,wBAAwB,QAAQ;AACnC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,qBAAqB,MAAM,WAAW,uBAAuB;AAEnE,QAAM,4BAA4B,mBAAmB;AAAA,IAAO,CAAC,EAAE,SAAS,MACtE,6BAA6B,KAAK,QAAQ;AAAA,EAC5C;AAEA,MAAI,CAAC,0BAA0B,QAAQ;AACrC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,0BAA0B,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AAC1D,YAAM,kBAAkB,SAAS;AAAA,QAC/B;AAAA,QACA;AAAA,MACF;AACA,YAAM,gBAAAD,QAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,6BAA4C,OAAO,WAAW;AACzE,MAAI;AACF,WAAO,MAAM,wBAAwB,MAAM;AAAA,EAC7C,SAAS,KAAK;AACZ,uBAAI,KAAK,uDAAuD;AAChE,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryPatchDockerImages: PatchFunction;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(patchDockerImages_exports);
|
|
|
34
34
|
var import_util = require("util");
|
|
35
35
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
36
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
37
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
38
38
|
const DOCKER_IMAGE_REGEX = /^(FROM\s?.*)(\s)(node|python)(:.*)/gm;
|
|
39
39
|
const DOCKER_IMAGE_PLATFORM_REGEX = /^(FROM\s?.*)(--platform=[^\s]+) /gm;
|
|
40
40
|
const DOCKER_COMPOSE_IMAGE_REGEX = /^(\s+image:\s)(node|python)(:.*)/gm;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/patchDockerImages.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_IMAGE_REGEX = /^(FROM\\s?.*)(\\s)(node|python)(:.*)/gm;\nconst DOCKER_IMAGE_PLATFORM_REGEX = /^(FROM\\s?.*)(--platform=[^\\s]+) /gm;\nconst DOCKER_COMPOSE_IMAGE_REGEX = /^(\\s+image:\\s)(node|python)(:.*)/gm;\nconst PUBLIC_ECR = 'public.ecr.aws/docker/library/';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst isInvalidPlatformFlagUsage = (contents: string) => {\n const matches = [...contents.matchAll(DOCKER_IMAGE_PLATFORM_REGEX)];\n\n if (!matches.length) {\n return false;\n }\n\n const uniquePlatforms = [\n ...new Set(matches.map(([, , platform]) => platform as string)),\n ];\n\n // Multiple --platform flags are used which may indicate a multi arch build\n if (uniquePlatforms.length > 1) {\n return false;\n }\n\n // Avoid patching as they may be using args to set the platform\n if (uniquePlatforms[0]?.startsWith('--platform=$')) {\n return false;\n }\n\n return true;\n};\n\nconst patchDockerImages: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const [maybeDockerFilesPaths, maybeDockerComposePaths] = await Promise.all([\n fg(['Dockerfile*']),\n fg(['docker-compose*.y*ml']),\n ]);\n\n if (!maybeDockerFilesPaths.length && !maybeDockerComposePaths.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfile or docker-compose files found',\n };\n }\n\n const [dockerFiles, dockerComposeFiles] = await Promise.all([\n fetchFiles(maybeDockerFilesPaths),\n fetchFiles(maybeDockerComposePaths),\n ]);\n\n const dockerFilesToPatch = dockerFiles.filter(\n ({ contents }) =>\n DOCKER_IMAGE_REGEX.exec(contents) ?? isInvalidPlatformFlagUsage(contents),\n );\n\n const dockerComposeFilesToPatch = dockerComposeFiles.filter(({ contents }) =>\n DOCKER_COMPOSE_IMAGE_REGEX.exec(contents),\n );\n\n if (!dockerFilesToPatch.length && !dockerComposeFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfile or docker-compose files to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n const dockerFilePatches = dockerFilesToPatch.map(\n async ({ file, contents }) => {\n let patchedContents = contents.replace(\n DOCKER_IMAGE_REGEX,\n `$1$2${PUBLIC_ECR}$3$4`,\n );\n\n if (isInvalidPlatformFlagUsage(contents)) {\n patchedContents = patchedContents.replace(\n DOCKER_IMAGE_PLATFORM_REGEX,\n '$1',\n );\n }\n\n await fs.writeFile(file, patchedContents);\n },\n );\n\n const dockerComposeFilePatches = dockerComposeFilesToPatch.map(\n async ({ file, contents }) => {\n const patchedContents = contents.replace(\n DOCKER_COMPOSE_IMAGE_REGEX,\n `$1${PUBLIC_ECR}$2$3`,\n );\n await fs.writeFile(file, patchedContents);\n },\n );\n\n await Promise.all([...dockerFilePatches, ...dockerComposeFilePatches]);\n\n return { result: 'apply' };\n};\n\nexport const tryPatchDockerImages: PatchFunction = async (config) => {\n try {\n return await patchDockerImages(config);\n } catch (err) {\n log.warn('Failed to patch Docker images');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;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I,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryUpgradeESLint: PatchFunction;
|
|
@@ -35,11 +35,11 @@ var fsp = __toESM(require("fs/promises"));
|
|
|
35
35
|
var import_path = __toESM(require("path"));
|
|
36
36
|
var import_util = require("util");
|
|
37
37
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
38
|
-
var import_exec = require("../../../../../../utils/exec");
|
|
39
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
40
|
-
var import_project = require("../../../../../configure/analysis/project");
|
|
41
|
-
var import_configFile = require("../../../../../configure/processing/configFile");
|
|
42
|
-
var import_prettier = require("../../../../../configure/processing/prettier");
|
|
38
|
+
var import_exec = require("../../../../../../utils/exec.js");
|
|
39
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
40
|
+
var import_project = require("../../../../../configure/analysis/project.js");
|
|
41
|
+
var import_configFile = require("../../../../../configure/processing/configFile.js");
|
|
42
|
+
var import_prettier = require("../../../../../configure/processing/prettier.js");
|
|
43
43
|
const IGNORE_FILE = ".eslintignore";
|
|
44
44
|
const OLD_CONFIG_FILE = ".eslintrc.js";
|
|
45
45
|
const NEW_CONFIG_FILE_CJS = "eslint.config.cjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/8.2.1/upgradeESLint.ts"],
|
|
4
|
-
"sourcesContent": ["// eslint-disable-next-line no-restricted-imports -- fs-extra is mocked\nimport * as fsp from 'fs/promises';\nimport path from 'path';\nimport { inspect } from 'util';\n\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,UAAqB;AACrB,kBAAiB;AACjB,kBAAwB;AAExB,sBAAe;
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line no-restricted-imports -- fs-extra is mocked\nimport * as fsp from 'fs/promises';\nimport path from 'path';\nimport { inspect } from 'util';\n\nimport fs from 'fs-extra';\n\nimport { createExec } from '../../../../../../utils/exec.js';\nimport { log } from '../../../../../../utils/logging.js';\nimport { createDestinationFileReader } from '../../../../../configure/analysis/project.js';\nimport { mergeWithConfigFile } from '../../../../../configure/processing/configFile.js';\nimport { formatPrettier } from '../../../../../configure/processing/prettier.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst IGNORE_FILE = '.eslintignore';\nconst OLD_CONFIG_FILE = '.eslintrc.js';\nconst NEW_CONFIG_FILE_CJS = 'eslint.config.cjs';\nconst NEW_CONFIG_FILE_JS = 'eslint.config.js';\n\nconst upgradeESLint: PatchFunction = async ({\n mode,\n dir: cwd = process.cwd(),\n}): Promise<PatchReturnType> => {\n const readFile = createDestinationFileReader(cwd);\n const [ignoreFileContents, oldConfig] = await Promise.all([\n readFile(IGNORE_FILE),\n readFile(OLD_CONFIG_FILE),\n ]);\n\n if (oldConfig === undefined) {\n return {\n result: 'skip',\n reason: `no ${OLD_CONFIG_FILE} - have you already migrated?`,\n };\n }\n\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n const ignoreContentsWithoutSkubaManaged = mergeWithConfigFile(\n '',\n 'ignore',\n )(ignoreFileContents);\n\n const exec = createExec({\n cwd: process.cwd(),\n stdio: 'ignore',\n });\n\n // eslint-migrate-config require()s the file, so for testability, put it in a temporary location\n const dir = await writeTemporaryFiles({\n [OLD_CONFIG_FILE]: oldConfig,\n ...(ignoreContentsWithoutSkubaManaged.trim().length > 0\n ? { [IGNORE_FILE]: ignoreContentsWithoutSkubaManaged }\n : {}),\n });\n try {\n await exec(\n 'eslint-migrate-config',\n path.join(dir, OLD_CONFIG_FILE),\n '--commonjs',\n );\n\n const output = fiddleWithOutput(\n await fsp.readFile(path.join(dir, NEW_CONFIG_FILE_CJS), 'utf-8'),\n );\n await fs.promises.writeFile(\n NEW_CONFIG_FILE_JS,\n await formatPrettier(output, { filepath: NEW_CONFIG_FILE_JS }),\n );\n\n await Promise.all([\n ignoreFileContents === undefined\n ? Promise.resolve()\n : fs.promises.rm(IGNORE_FILE),\n fs.promises.rm(OLD_CONFIG_FILE),\n ]);\n\n return { result: 'apply' };\n } finally {\n await fsp.rm(dir, { recursive: true });\n }\n};\n\nconst writeTemporaryFiles = async (contents: Record<string, string>) => {\n const dir = await fsp.mkdtemp('eslint-migrate-config');\n\n await Promise.all(\n Object.entries(contents).map(([file, content]) =>\n fsp.writeFile(path.join(dir, file), content),\n ),\n );\n\n return dir;\n};\n\nconst fiddleWithOutput = (input: string) => {\n let output = input.replace(/compat.extends\\([\"']skuba[\"']\\)/, 'skuba');\n\n if (!output.includes('eslint-config-skuba')) {\n output = `const skuba = require('eslint-config-skuba');\\n\\n${output}`;\n }\n\n if (!output.includes('compat.')) {\n output = output.replace(/const compat = new FlatCompat\\(\\{[^}]+\\}\\);/m, '');\n output = output.replace(\n /const \\{\\s*FlatCompat,?\\s*\\}\\s*=\\s*require\\([\"']@eslint\\/eslintrc[\"']\\);/m,\n '',\n );\n }\n\n if (!output.includes('js.')) {\n output = output.replace(/const js = require\\(['\"]@eslint\\/js['\"]\\);/, '');\n }\n\n output = output.replace(\n /^const skuba = require\\('eslint-config-skuba'\\);\\s*module.exports = \\[...skuba\\];$/m,\n \"module.exports = require('eslint-config-skuba');\",\n );\n\n return output;\n};\n\nexport const tryUpgradeESLint: PatchFunction = async (config) => {\n try {\n return await upgradeESLint(config);\n } catch (err) {\n log.warn('Failed to upgrade ESLint to flat config.');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";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AAM,cAAc,MAAM;AAAA,EACnC,SAAS,KAAK;AACZ,uBAAI,KAAK,0CAA0C;AACnD,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["path", "fs"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Patches } from '
|
|
1
|
+
import type { Patches } from '../../index.js';
|
|
2
2
|
export declare const patches: Patches;
|
|
@@ -21,7 +21,7 @@ __export(__exports, {
|
|
|
21
21
|
patches: () => patches
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_patchPnpmDockerImages = require("./patchPnpmDockerImages");
|
|
24
|
+
var import_patchPnpmDockerImages = require("./patchPnpmDockerImages.js");
|
|
25
25
|
const patches = [
|
|
26
26
|
{
|
|
27
27
|
apply: import_patchPnpmDockerImages.tryPatchPnpmDockerImages,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.0.1/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Patches } from '
|
|
4
|
+
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryPatchPnpmDockerImages } from './patchPnpmDockerImages.js';\n\nexport const patches: Patches = [\n {\n apply: tryPatchPnpmDockerImages,\n description: 'Use pinned pnpm version in Dockerfiles',\n },\n];\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mCAAyC;AAElC,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryPatchPnpmDockerImages: PatchFunction;
|
|
@@ -34,7 +34,7 @@ module.exports = __toCommonJS(patchPnpmDockerImages_exports);
|
|
|
34
34
|
var import_util = require("util");
|
|
35
35
|
var import_fast_glob = __toESM(require("fast-glob"));
|
|
36
36
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
37
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
37
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
38
38
|
const DOCKER_IMAGE_CONFIG_REGEX = /^(RUN --mount=type=bind,source=package.json,target=package.json \\\n(\s+)corepack enable pnpm && corepack install(?:.|\n)+?RUN )(pnpm config set store-dir \/root\/.pnpm-store)/gm;
|
|
39
39
|
const DOCKER_IMAGE_FETCH_REGEX = /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\n)((?:(?!--mount=type=bind,source=package\.json,target=package\.json)[\s\S])+?\n(\s+)pnpm (fetch|install))/gm;
|
|
40
40
|
const PACKAGE_JSON_MOUNT = "--mount=type=bind,source=package.json,target=package.json \\\n";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.0.1/patchPnpmDockerImages.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport fg from 'fast-glob';\nimport fs from 'fs-extra';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst DOCKER_IMAGE_CONFIG_REGEX =\n /^(RUN --mount=type=bind,source=package.json,target=package.json \\\\\\n(\\s+)corepack enable pnpm && corepack install(?:.|\\n)+?RUN )(pnpm config set store-dir \\/root\\/.pnpm-store)/gm;\nconst DOCKER_IMAGE_FETCH_REGEX =\n /^(RUN --mount=type=bind,source=.npmrc,target=.npmrc \\\\\\n)((?:(?!--mount=type=bind,source=package\\.json,target=package\\.json)[\\s\\S])+?\\n(\\s+)pnpm (fetch|install))/gm;\n\nconst PACKAGE_JSON_MOUNT =\n '--mount=type=bind,source=package.json,target=package.json \\\\\\n';\n\nconst fetchFiles = async (files: string[]) =>\n Promise.all(\n files.map(async (file) => {\n const contents = await fs.readFile(file, 'utf8');\n\n return {\n file,\n contents,\n };\n }),\n );\n\nconst patchPnpmDockerImages: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n const maybeDockerFilesPaths = await fg(['Dockerfile*']);\n\n if (!maybeDockerFilesPaths.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles found',\n };\n }\n\n const dockerFiles = await fetchFiles(maybeDockerFilesPaths);\n\n const dockerFilesToPatch = dockerFiles.filter(\n ({ contents }) =>\n DOCKER_IMAGE_CONFIG_REGEX.exec(contents) ??\n DOCKER_IMAGE_FETCH_REGEX.exec(contents),\n );\n\n if (!dockerFilesToPatch.length) {\n return {\n result: 'skip',\n reason: 'no Dockerfiles to patch',\n };\n }\n\n if (mode === 'lint') {\n return {\n result: 'apply',\n };\n }\n\n await Promise.all(\n dockerFilesToPatch.map(async ({ file, contents }) => {\n const patchedContents = contents\n .replace(\n DOCKER_IMAGE_CONFIG_REGEX,\n (_, earlyCommands, whitespace, pnpmSetConfigLine) =>\n `${earlyCommands}${PACKAGE_JSON_MOUNT}${whitespace}${pnpmSetConfigLine}`,\n )\n .replace(\n DOCKER_IMAGE_FETCH_REGEX,\n (_, npmrcLine, rest, whitespace) =>\n `${npmrcLine}${whitespace}${PACKAGE_JSON_MOUNT}${rest}`,\n );\n\n await fs.writeFile(file, patchedContents);\n }),\n );\n\n return { result: 'apply' };\n};\n\nexport const tryPatchPnpmDockerImages: PatchFunction = async (config) => {\n try {\n return await patchPnpmDockerImages(config);\n } catch (err) {\n log.warn('Failed to patch Docker images');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,uBAAe;AACf,sBAAe;AAEf,qBAAoB;AAGpB,MAAM,4BACJ;AACF,MAAM,2BACJ;AAEF,MAAM,qBACJ;AAEF,MAAM,aAAa,OAAO,UACxB,QAAQ;AAAA,EACN,MAAM,IAAI,OAAO,SAAS;AACxB,UAAM,WAAW,MAAM,gBAAAA,QAAG,SAAS,MAAM,MAAM;AAE/C,WAAO;AAAA,MACL;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEF,MAAM,wBAAuC,OAAO;AAAA,EAClD;AACF,MAAgC;AAC9B,QAAM,wBAAwB,UAAM,iBAAAC,SAAG,CAAC,aAAa,CAAC;AAEtD,MAAI,CAAC,sBAAsB,QAAQ;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,cAAc,MAAM,WAAW,qBAAqB;AAE1D,QAAM,qBAAqB,YAAY;AAAA,IACrC,CAAC,EAAE,SAAS,MACV,0BAA0B,KAAK,QAAQ,KACvC,yBAAyB,KAAK,QAAQ;AAAA,EAC1C;AAEA,MAAI,CAAC,mBAAmB,QAAQ;AAC9B,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,MAAI,SAAS,QAAQ;AACnB,WAAO;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAEA,QAAM,QAAQ;AAAA,IACZ,mBAAmB,IAAI,OAAO,EAAE,MAAM,SAAS,MAAM;AACnD,YAAM,kBAAkB,SACrB;AAAA,QACC;AAAA,QACA,CAAC,GAAG,eAAe,YAAY,sBAC7B,GAAG,aAAa,GAAG,kBAAkB,GAAG,UAAU,GAAG,iBAAiB;AAAA,MAC1E,EACC;AAAA,QACC;AAAA,QACA,CAAC,GAAG,WAAW,MAAM,eACnB,GAAG,SAAS,GAAG,UAAU,GAAG,kBAAkB,GAAG,IAAI;AAAA,MACzD;AAEF,YAAM,gBAAAD,QAAG,UAAU,MAAM,eAAe;AAAA,IAC1C,CAAC;AAAA,EACH;AAEA,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,2BAA0C,OAAO,WAAW;AACvE,MAAI;AACF,WAAO,MAAM,sBAAsB,MAAM;AAAA,EAC3C,SAAS,KAAK;AACZ,uBAAI,KAAK,+BAA+B;AACxC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": ["fs", "fg"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Patches } from '
|
|
1
|
+
import type { Patches } from '../../index.js';
|
|
2
2
|
export declare const patches: Patches;
|
|
@@ -21,7 +21,7 @@ __export(__exports, {
|
|
|
21
21
|
patches: () => patches
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(__exports);
|
|
24
|
-
var import_upgradeNode = require("./upgradeNode");
|
|
24
|
+
var import_upgradeNode = require("./upgradeNode.js");
|
|
25
25
|
const patches = [
|
|
26
26
|
{
|
|
27
27
|
apply: import_upgradeNode.tryUpgradeNode,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.1.0/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Patches } from '
|
|
4
|
+
"sourcesContent": ["import type { Patches } from '../../index.js';\n\nimport { tryUpgradeNode } from './upgradeNode.js';\n\nexport const patches: Patches = [\n {\n apply: tryUpgradeNode,\n description: 'Upgrade Node.js to version 22',\n },\n];\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,yBAA+B;AAExB,MAAM,UAAmB;AAAA,EAC9B;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,EACf;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { PatchFunction } from '
|
|
1
|
+
import type { PatchFunction } from '../../index.js';
|
|
2
2
|
export declare const tryUpgradeNode: PatchFunction;
|
|
@@ -22,8 +22,8 @@ __export(upgradeNode_exports, {
|
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(upgradeNode_exports);
|
|
24
24
|
var import_util = require("util");
|
|
25
|
-
var import_logging = require("../../../../../../utils/logging");
|
|
26
|
-
var import_nodeVersion = require("../../../../../migrate/nodeVersion");
|
|
25
|
+
var import_logging = require("../../../../../../utils/logging.js");
|
|
26
|
+
var import_nodeVersion = require("../../../../../migrate/nodeVersion/index.js");
|
|
27
27
|
const upgradeNode = async ({
|
|
28
28
|
mode
|
|
29
29
|
}) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../../src/cli/lint/internalLints/upgrade/patches/9.1.0/upgradeNode.ts"],
|
|
4
|
-
"sourcesContent": ["import { inspect } from 'util';\n\nimport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;
|
|
4
|
+
"sourcesContent": ["import { inspect } from 'util';\n\nimport { log } from '../../../../../../utils/logging.js';\nimport { nodeVersionMigration } from '../../../../../migrate/nodeVersion/index.js';\nimport type { PatchFunction, PatchReturnType } from '../../index.js';\n\nconst upgradeNode: PatchFunction = async ({\n mode,\n}): Promise<PatchReturnType> => {\n if (process.env.SKIP_NODE_UPGRADE) {\n return {\n result: 'skip',\n reason: 'SKIP_NODE_UPGRADE environment variable set',\n };\n }\n if (mode === 'lint') {\n return { result: 'apply' };\n }\n\n await nodeVersionMigration({\n nodeVersion: 22,\n ECMAScriptVersion: 'ES2024',\n });\n\n return { result: 'apply' };\n};\n\nexport const tryUpgradeNode: PatchFunction = async (config) => {\n try {\n return await upgradeNode(config);\n } catch (err) {\n log.warn('Failed to upgrade node version');\n log.subtle(inspect(err));\n return { result: 'skip', reason: 'due to an error' };\n }\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAwB;AAExB,qBAAoB;AACpB,yBAAqC;AAGrC,MAAM,cAA6B,OAAO;AAAA,EACxC;AACF,MAAgC;AAC9B,MAAI,QAAQ,IAAI,mBAAmB;AACjC,WAAO;AAAA,MACL,QAAQ;AAAA,MACR,QAAQ;AAAA,IACV;AAAA,EACF;AACA,MAAI,SAAS,QAAQ;AACnB,WAAO,EAAE,QAAQ,QAAQ;AAAA,EAC3B;AAEA,YAAM,yCAAqB;AAAA,IACzB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AAED,SAAO,EAAE,QAAQ,QAAQ;AAC3B;AAEO,MAAM,iBAAgC,OAAO,WAAW;AAC7D,MAAI;AACF,WAAO,MAAM,YAAY,MAAM;AAAA,EACjC,SAAS,KAAK;AACZ,uBAAI,KAAK,gCAAgC;AACzC,uBAAI,WAAO,qBAAQ,GAAG,CAAC;AACvB,WAAO,EAAE,QAAQ,QAAQ,QAAQ,kBAAkB;AAAA,EACrD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PrettierOutput } from '../adapter/prettier';
|
|
2
|
-
import type { Input } from './types';
|
|
1
|
+
import { type PrettierOutput } from '../adapter/prettier.js';
|
|
2
|
+
import type { Input } from './types.js';
|
|
3
3
|
export declare const runPrettierInCurrentThread: ({ debug }: Input) => Promise<PrettierOutput>;
|
|
4
4
|
export declare const runPrettierInWorkerThread: (input: Input) => Promise<PrettierOutput>;
|
package/lib/cli/lint/prettier.js
CHANGED
|
@@ -35,9 +35,9 @@ module.exports = __toCommonJS(prettier_exports);
|
|
|
35
35
|
var import_path = __toESM(require("path"));
|
|
36
36
|
var import_worker_threads = require("worker_threads");
|
|
37
37
|
var import_chalk = __toESM(require("chalk"));
|
|
38
|
-
var import_logging = require("../../utils/logging");
|
|
39
|
-
var import_worker = require("../../utils/worker");
|
|
40
|
-
var import_prettier = require("../adapter/prettier");
|
|
38
|
+
var import_logging = require("../../utils/logging.js");
|
|
39
|
+
var import_worker = require("../../utils/worker.js");
|
|
40
|
+
var import_prettier = require("../adapter/prettier.js");
|
|
41
41
|
const LOG_PREFIX = import_chalk.default.cyan("Prettier \u2502");
|
|
42
42
|
const runPrettierInCurrentThread = ({ debug }) => (0, import_prettier.runPrettier)("lint", (0, import_logging.createLogger)({ debug, prefixes: [LOG_PREFIX] }));
|
|
43
43
|
const runPrettierInWorkerThread = (input) => (0, import_worker.execWorkerThread)(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/lint/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport chalk from 'chalk';\n\nimport { createLogger } from '../../utils/logging';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker';\nimport { type PrettierOutput, runPrettier } from '../adapter/prettier';\n\nimport type { Input } from './types';\n\nconst LOG_PREFIX = chalk.cyan('Prettier \u2502');\n\nexport const runPrettierInCurrentThread = ({ debug }: Input) =>\n runPrettier('lint', createLogger({ debug, prefixes: [LOG_PREFIX] }));\n\nexport const runPrettierInWorkerThread = (input: Input) =>\n execWorkerThread<Input, PrettierOutput>(\n path.posix.join(__dirname, 'prettier.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runPrettierInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
|
|
4
|
+
"sourcesContent": ["import path from 'path';\nimport { isMainThread } from 'worker_threads';\n\nimport chalk from 'chalk';\n\nimport { createLogger } from '../../utils/logging.js';\nimport { execWorkerThread, postWorkerOutput } from '../../utils/worker.js';\nimport { type PrettierOutput, runPrettier } from '../adapter/prettier.js';\n\nimport type { Input } from './types.js';\n\nconst LOG_PREFIX = chalk.cyan('Prettier \u2502');\n\nexport const runPrettierInCurrentThread = ({ debug }: Input) =>\n runPrettier('lint', createLogger({ debug, prefixes: [LOG_PREFIX] }));\n\nexport const runPrettierInWorkerThread = (input: Input) =>\n execWorkerThread<Input, PrettierOutput>(\n path.posix.join(__dirname, 'prettier.js'),\n input,\n );\n\nif (!isMainThread) {\n postWorkerOutput(\n runPrettierInCurrentThread,\n createLogger({ debug: false, prefixes: [LOG_PREFIX] }),\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AACjB,4BAA6B;AAE7B,mBAAkB;AAElB,qBAA6B;AAC7B,oBAAmD;AACnD,sBAAiD;AAIjD,MAAM,aAAa,aAAAA,QAAM,KAAK,iBAAY;AAEnC,MAAM,6BAA6B,CAAC,EAAE,MAAM,UACjD,6BAAY,YAAQ,6BAAa,EAAE,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC;AAE9D,MAAM,4BAA4B,CAAC,cACxC;AAAA,EACE,YAAAC,QAAK,MAAM,KAAK,WAAW,aAAa;AAAA,EACxC;AACF;AAEF,IAAI,CAAC,oCAAc;AACjB;AAAA,IACE;AAAA,QACA,6BAAa,EAAE,OAAO,OAAO,UAAU,CAAC,UAAU,EAAE,CAAC;AAAA,EACvD;AACF;",
|
|
6
6
|
"names": ["chalk", "path"]
|
|
7
7
|
}
|
package/lib/cli/lint/tsc.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Input } from './types';
|
|
1
|
+
import type { Input } from './types.js';
|
|
2
2
|
export declare const runTscInNewProcess: ({ debug, tscOutputStream, }: Input) => Promise<boolean>;
|
package/lib/cli/lint/tsc.js
CHANGED
|
@@ -21,7 +21,7 @@ __export(tsc_exports, {
|
|
|
21
21
|
runTscInNewProcess: () => runTscInNewProcess
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(tsc_exports);
|
|
24
|
-
var import_exec = require("../../utils/exec");
|
|
24
|
+
var import_exec = require("../../utils/exec.js");
|
|
25
25
|
const runTscInNewProcess = async ({
|
|
26
26
|
debug,
|
|
27
27
|
tscOutputStream
|
package/lib/cli/lint/tsc.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/lint/tsc.ts"],
|
|
4
|
-
"sourcesContent": ["import { execConcurrently } from '../../utils/exec';\n\nimport type { Input } from './types';\n\nexport const runTscInNewProcess = async ({\n debug,\n tscOutputStream,\n}: Input): Promise<boolean> => {\n const command = [\n 'tsc',\n ...(debug ? ['--extendedDiagnostics'] : []),\n '--noEmit',\n ].join(' ');\n\n try {\n // Misappropriate `concurrently` as a stdio prefixer.\n // We can use our regular console logger once we decide on an approach for\n // compiling in-process, whether by interacting with the TypeScript Compiler\n // API directly or using a higher-level tool like esbuild.\n await execConcurrently(\n [\n {\n command,\n name: 'tsc',\n prefixColor: 'blue',\n },\n ],\n {\n maxProcesses: 1,\n nameLength: 'Prettier'.length,\n outputStream: tscOutputStream,\n },\n );\n\n return true;\n } catch {\n return false;\n }\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { execConcurrently } from '../../utils/exec.js';\n\nimport type { Input } from './types.js';\n\nexport const runTscInNewProcess = async ({\n debug,\n tscOutputStream,\n}: Input): Promise<boolean> => {\n const command = [\n 'tsc',\n ...(debug ? ['--extendedDiagnostics'] : []),\n '--noEmit',\n ].join(' ');\n\n try {\n // Misappropriate `concurrently` as a stdio prefixer.\n // We can use our regular console logger once we decide on an approach for\n // compiling in-process, whether by interacting with the TypeScript Compiler\n // API directly or using a higher-level tool like esbuild.\n await execConcurrently(\n [\n {\n command,\n name: 'tsc',\n prefixColor: 'blue',\n },\n ],\n {\n maxProcesses: 1,\n nameLength: 'Prettier'.length,\n outputStream: tscOutputStream,\n },\n );\n\n return true;\n } catch {\n return false;\n }\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiC;AAI1B,MAAM,qBAAqB,OAAO;AAAA,EACvC;AAAA,EACA;AACF,MAA+B;AAC7B,QAAM,UAAU;AAAA,IACd;AAAA,IACA,GAAI,QAAQ,CAAC,uBAAuB,IAAI,CAAC;AAAA,IACzC;AAAA,EACF,EAAE,KAAK,GAAG;AAEV,MAAI;AAKF,cAAM;AAAA,MACJ;AAAA,QACE;AAAA,UACE;AAAA,UACA,MAAM;AAAA,UACN,aAAa;AAAA,QACf;AAAA,MACF;AAAA,MACA;AAAA,QACE,cAAc;AAAA,QACd,YAAY,WAAW;AAAA,QACvB,cAAc;AAAA,MAChB;AAAA,IACF;AAEA,WAAO;AAAA,EACT,QAAQ;AACN,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/lib/cli/migrate/index.js
CHANGED
|
@@ -21,8 +21,8 @@ __export(migrate_exports, {
|
|
|
21
21
|
migrate: () => migrate
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(migrate_exports);
|
|
24
|
-
var import_logging = require("../../utils/logging");
|
|
25
|
-
var import_nodeVersion = require("./nodeVersion");
|
|
24
|
+
var import_logging = require("../../utils/logging.js");
|
|
25
|
+
var import_nodeVersion = require("./nodeVersion/index.js");
|
|
26
26
|
const migrations = {
|
|
27
27
|
node20: () => (0, import_nodeVersion.nodeVersionMigration)({
|
|
28
28
|
nodeVersion: 20,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/cli/migrate/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { log } from '../../utils/logging';\n\nimport { nodeVersionMigration } from './nodeVersion';\n\nconst migrations: Record<string, () => Promise<void>> = {\n node20: () =>\n nodeVersionMigration({\n nodeVersion: 20,\n ECMAScriptVersion: 'ES2023',\n }),\n node22: () =>\n nodeVersionMigration({\n nodeVersion: 22,\n ECMAScriptVersion: 'ES2024',\n }),\n};\n\nconst logAvailableMigrations = () => {\n log.ok('Available migrations:');\n Object.keys(migrations).forEach((migration) => {\n log.ok(`- ${migration}`);\n });\n};\n\nexport const migrate = async (args = process.argv.slice(2)) => {\n if (!args[0]) {\n log.err('Provide a migration to run.');\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n if (args.includes('--help') || args.includes('-h') || args[0] === 'help') {\n logAvailableMigrations();\n return;\n }\n\n const migration = migrations[args[0]];\n\n if (!migration) {\n log.err(`Migration \"${args[0]}\" is not a valid option.`);\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n await migration();\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { log } from '../../utils/logging.js';\n\nimport { nodeVersionMigration } from './nodeVersion/index.js';\n\nconst migrations: Record<string, () => Promise<void>> = {\n node20: () =>\n nodeVersionMigration({\n nodeVersion: 20,\n ECMAScriptVersion: 'ES2023',\n }),\n node22: () =>\n nodeVersionMigration({\n nodeVersion: 22,\n ECMAScriptVersion: 'ES2024',\n }),\n};\n\nconst logAvailableMigrations = () => {\n log.ok('Available migrations:');\n Object.keys(migrations).forEach((migration) => {\n log.ok(`- ${migration}`);\n });\n};\n\nexport const migrate = async (args = process.argv.slice(2)) => {\n if (!args[0]) {\n log.err('Provide a migration to run.');\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n if (args.includes('--help') || args.includes('-h') || args[0] === 'help') {\n logAvailableMigrations();\n return;\n }\n\n const migration = migrations[args[0]];\n\n if (!migration) {\n log.err(`Migration \"${args[0]}\" is not a valid option.`);\n logAvailableMigrations();\n process.exitCode = 1;\n return;\n }\n\n await migration();\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAoB;AAEpB,yBAAqC;AAErC,MAAM,aAAkD;AAAA,EACtD,QAAQ,UACN,yCAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AAAA,EACH,QAAQ,UACN,yCAAqB;AAAA,IACnB,aAAa;AAAA,IACb,mBAAmB;AAAA,EACrB,CAAC;AACL;AAEA,MAAM,yBAAyB,MAAM;AACnC,qBAAI,GAAG,uBAAuB;AAC9B,SAAO,KAAK,UAAU,EAAE,QAAQ,CAAC,cAAc;AAC7C,uBAAI,GAAG,KAAK,SAAS,EAAE;AAAA,EACzB,CAAC;AACH;AAEO,MAAM,UAAU,OAAO,OAAO,QAAQ,KAAK,MAAM,CAAC,MAAM;AAC7D,MAAI,CAAC,KAAK,CAAC,GAAG;AACZ,uBAAI,IAAI,6BAA6B;AACrC,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,MAAI,KAAK,SAAS,QAAQ,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,CAAC,MAAM,QAAQ;AACxE,2BAAuB;AACvB;AAAA,EACF;AAEA,QAAM,YAAY,WAAW,KAAK,CAAC,CAAC;AAEpC,MAAI,CAAC,WAAW;AACd,uBAAI,IAAI,cAAc,KAAK,CAAC,CAAC,0BAA0B;AACvD,2BAAuB;AACvB,YAAQ,WAAW;AACnB;AAAA,EACF;AAEA,QAAM,UAAU;AAClB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -38,7 +38,7 @@ var import_find_up = __toESM(require("find-up"));
|
|
|
38
38
|
var import_fs_extra = __toESM(require("fs-extra"));
|
|
39
39
|
var import_semver = require("semver");
|
|
40
40
|
var import_zod = require("zod");
|
|
41
|
-
var import_logging = require("../../../utils/logging");
|
|
41
|
+
var import_logging = require("../../../utils/logging.js");
|
|
42
42
|
const getParentFile = async (file, cwd = process.cwd()) => {
|
|
43
43
|
const path = await (0, import_find_up.default)(file, { cwd });
|
|
44
44
|
if (!path) {
|