skuba 11.1.0-jest30-20250619234954 → 12.0.0-enforce-file-extensions-20250618112549
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/jest/transform.js +15 -1
- package/jest-preset.js +7 -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.d.ts +1 -1
- package/lib/cli/configure/processing/prettier.js +6 -8
- package/lib/cli/configure/processing/prettier.js.map +3 -3
- 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 +3 -3
- package/lib/cli/migrate/nodeVersion/index.js.map +1 -1
- 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/test/reporters/prettier/index.d.ts +4 -0
- package/lib/cli/test/reporters/prettier/index.js +67 -0
- package/lib/cli/test/reporters/prettier/index.js.map +7 -0
- 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 +12 -12
- 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/package.json +1 -1
- package/template/greeter/src/app.test.ts +1 -1
- 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 +3 -3
- 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/framework/logging.ts +1 -1
- package/template/koa-rest-api/src/framework/metrics.ts +2 -2
- package/template/koa-rest-api/src/framework/server.test.ts +5 -5
- package/template/koa-rest-api/src/framework/server.ts +3 -3
- package/template/koa-rest-api/src/framework/validation.test.ts +4 -4
- package/template/koa-rest-api/src/framework/validation.ts +1 -1
- 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/logging.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 +1 -1
- package/template/koa-rest-api/tsconfig.json +18 -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 +1 -1
- package/template/lambda-sqs-worker-cdk/src/app.test.ts +6 -6
- package/template/lambda-sqs-worker-cdk/src/app.ts +10 -7
- package/template/lambda-sqs-worker-cdk/src/framework/handler.test.ts +4 -4
- package/template/lambda-sqs-worker-cdk/src/framework/handler.ts +2 -2
- package/template/lambda-sqs-worker-cdk/src/framework/logging.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/metrics.ts +1 -1
- package/template/lambda-sqs-worker-cdk/src/framework/validation.test.ts +2 -2
- 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/logging.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 +1 -1
- package/template/oss-npm-package/src/index.test.ts +1 -1
- package/template/private-npm-package/src/index.test.ts +1 -1
|
@@ -21,8 +21,8 @@ __export(ignore_exports, {
|
|
|
21
21
|
ignoreModule: () => ignoreModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(ignore_exports);
|
|
24
|
-
var import_template = require("../../../utils/template");
|
|
25
|
-
var import_configFile = require("../processing/configFile");
|
|
24
|
+
var import_template = require("../../../utils/template.js");
|
|
25
|
+
var import_configFile = require("../processing/configFile.js");
|
|
26
26
|
const ignoreModule = async () => {
|
|
27
27
|
const [dockerFile, gitFile] = await Promise.all([
|
|
28
28
|
(0, import_template.readBaseTemplateFile)("_.dockerignore"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/ignore.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { mergeWithConfigFile } from '../processing/configFile';\nimport type { Module } from '../types';\n\nexport const ignoreModule = async (): Promise<Module> => {\n const [dockerFile, gitFile] = await Promise.all([\n readBaseTemplateFile('_.dockerignore'),\n readBaseTemplateFile('_.gitignore'),\n ]);\n\n return {\n '.dockerignore': mergeWithConfigFile(dockerFile),\n\n '.gitignore': mergeWithConfigFile(gitFile),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport type { Module } from '../types.js';\n\nexport const ignoreModule = async (): Promise<Module> => {\n const [dockerFile, gitFile] = await Promise.all([\n readBaseTemplateFile('_.dockerignore'),\n readBaseTemplateFile('_.gitignore'),\n ]);\n\n return {\n '.dockerignore': mergeWithConfigFile(dockerFile),\n\n '.gitignore': mergeWithConfigFile(gitFile),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,wBAAoC;AAG7B,MAAM,eAAe,YAA6B;AACvD,QAAM,CAAC,YAAY,OAAO,IAAI,MAAM,QAAQ,IAAI;AAAA,QAC9C,sCAAqB,gBAAgB;AAAA,QACrC,sCAAqB,aAAa;AAAA,EACpC,CAAC;AAED,SAAO;AAAA,IACL,qBAAiB,uCAAoB,UAAU;AAAA,IAE/C,kBAAc,uCAAoB,OAAO;AAAA,EAC3C;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const loadModules: (opts: Options) => Promise<Module[]>;
|
|
@@ -21,16 +21,16 @@ __export(modules_exports, {
|
|
|
21
21
|
loadModules: () => loadModules
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(modules_exports);
|
|
24
|
-
var import_eslint = require("./eslint");
|
|
25
|
-
var import_ignore = require("./ignore");
|
|
26
|
-
var import_jest = require("./jest");
|
|
27
|
-
var import_nodemon = require("./nodemon");
|
|
28
|
-
var import_package = require("./package");
|
|
29
|
-
var import_prettier = require("./prettier");
|
|
30
|
-
var import_renovate = require("./renovate");
|
|
31
|
-
var import_serverless = require("./serverless");
|
|
32
|
-
var import_skubaDive = require("./skubaDive");
|
|
33
|
-
var import_tslint = require("./tslint");
|
|
24
|
+
var import_eslint = require("./eslint.js");
|
|
25
|
+
var import_ignore = require("./ignore.js");
|
|
26
|
+
var import_jest = require("./jest.js");
|
|
27
|
+
var import_nodemon = require("./nodemon.js");
|
|
28
|
+
var import_package = require("./package.js");
|
|
29
|
+
var import_prettier = require("./prettier.js");
|
|
30
|
+
var import_renovate = require("./renovate.js");
|
|
31
|
+
var import_serverless = require("./serverless.js");
|
|
32
|
+
var import_skubaDive = require("./skubaDive.js");
|
|
33
|
+
var import_tslint = require("./tslint.js");
|
|
34
34
|
const loadModules = (opts) => Promise.all(
|
|
35
35
|
[
|
|
36
36
|
import_eslint.eslintModule,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/index.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module, Options } from '../types';\n\nimport { eslintModule } from './eslint';\nimport { ignoreModule } from './ignore';\nimport { jestModule } from './jest';\nimport { nodemonModule } from './nodemon';\nimport { packageModule } from './package';\nimport { prettierModule } from './prettier';\nimport { renovateModule } from './renovate';\nimport { serverlessModule } from './serverless';\nimport { skubaDiveModule } from './skubaDive';\nimport { tslintModule } from './tslint';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n jestModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n skubaDiveModule,\n tslintModule,\n ].map((createModule) => createModule(opts)),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module, Options } from '../types.js';\n\nimport { eslintModule } from './eslint.js';\nimport { ignoreModule } from './ignore.js';\nimport { jestModule } from './jest.js';\nimport { nodemonModule } from './nodemon.js';\nimport { packageModule } from './package.js';\nimport { prettierModule } from './prettier.js';\nimport { renovateModule } from './renovate.js';\nimport { serverlessModule } from './serverless.js';\nimport { skubaDiveModule } from './skubaDive.js';\nimport { tslintModule } from './tslint.js';\n\nexport const loadModules = (opts: Options): Promise<Module[]> =>\n Promise.all(\n [\n eslintModule,\n ignoreModule,\n jestModule,\n nodemonModule,\n packageModule,\n prettierModule,\n renovateModule,\n serverlessModule,\n skubaDiveModule,\n tslintModule,\n ].map((createModule) => createModule(opts)),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBAA6B;AAC7B,oBAA6B;AAC7B,kBAA2B;AAC3B,qBAA8B;AAC9B,qBAA8B;AAC9B,sBAA+B;AAC/B,sBAA+B;AAC/B,wBAAiC;AACjC,uBAAgC;AAChC,oBAA6B;AAEtB,MAAM,cAAc,CAAC,SAC1B,QAAQ;AAAA,EACN;AAAA,IACE;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,EAAE,IAAI,CAAC,iBAAiB,aAAa,IAAI,CAAC;AAC5C;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const jestModule: () => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(jest_exports, {
|
|
|
21
21
|
jestModule: () => jestModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(jest_exports);
|
|
24
|
-
var import_template = require("../../../utils/template");
|
|
25
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
26
|
-
var import_package = require("../processing/package");
|
|
27
|
-
var import_typescript = require("../processing/typescript");
|
|
24
|
+
var import_template = require("../../../utils/template.js");
|
|
25
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
26
|
+
var import_package = require("../processing/package.js");
|
|
27
|
+
var import_typescript = require("../processing/typescript.js");
|
|
28
28
|
const OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [
|
|
29
29
|
`
|
|
30
30
|
globals: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/jest.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport {\n createPropAppender,\n createPropFilter,\n readModuleExports,\n transformModuleImportsAndExports,\n} from '../processing/typescript';\nimport type { Module } from '../types';\n\nconst OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [\n `\n globals: {\n 'ts-jest': {\n // seek-oss/skuba#626\n isolatedModules: true,\n },\n },`,\n `\n globals: {\n 'ts-jest': {\n isolatedModules: true,\n },\n },`,\n];\n\n// Jest options to preserve during migration\nconst filterProps = createPropFilter([\n 'collectCoverageFrom',\n 'coverageThreshold',\n 'globalSetup',\n 'globalTeardown',\n 'setupFiles',\n 'setupFilesAfterEnv',\n]);\n\nexport const jestModule = async (): Promise<Module> => {\n const [configFile, setupFile] = await Promise.all([\n readBaseTemplateFile('jest.config.ts'),\n readBaseTemplateFile('jest.setup.ts'),\n ]);\n\n return {\n ...deleteFiles('jest.config.js', 'jest.setup.js'),\n\n 'jest.config.ts': async (tsFile, currentFiles, initialFiles) => {\n // Allow customised TS Jest config that extends skuba\n if (tsFile?.includes('skuba')) {\n return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(\n (acc, snippet) => acc.replace(snippet, ''),\n tsFile,\n );\n }\n\n const jsFile = initialFiles['jest.config.js'];\n\n // Migrate a JS config that extends skuba, retaining all existing props\n if (jsFile?.includes('skuba')) {\n return transformModuleImportsAndExports(jsFile, (_, p) => p);\n }\n\n currentFiles['jest.setup.ts'] ??=\n initialFiles['jest.setup.js'] ?? setupFile;\n\n const inputFile = tsFile ?? jsFile;\n\n const props =\n inputFile === undefined\n ? undefined\n : await readModuleExports(inputFile);\n\n if (props === undefined) {\n return configFile;\n }\n\n const filteredProps = filterProps(null, props);\n\n const appendProps = createPropAppender(filteredProps);\n\n // Append a subset of custom props to our base `jest.config.ts`\n return transformModuleImportsAndExports(configFile, appendProps);\n },\n\n 'package.json': withPackage(({ jest, ...data }) => data),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport {\n createPropAppender,\n createPropFilter,\n readModuleExports,\n transformModuleImportsAndExports,\n} from '../processing/typescript.js';\nimport type { Module } from '../types.js';\n\nconst OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS = [\n `\n globals: {\n 'ts-jest': {\n // seek-oss/skuba#626\n isolatedModules: true,\n },\n },`,\n `\n globals: {\n 'ts-jest': {\n isolatedModules: true,\n },\n },`,\n];\n\n// Jest options to preserve during migration\nconst filterProps = createPropFilter([\n 'collectCoverageFrom',\n 'coverageThreshold',\n 'globalSetup',\n 'globalTeardown',\n 'setupFiles',\n 'setupFilesAfterEnv',\n]);\n\nexport const jestModule = async (): Promise<Module> => {\n const [configFile, setupFile] = await Promise.all([\n readBaseTemplateFile('jest.config.ts'),\n readBaseTemplateFile('jest.setup.ts'),\n ]);\n\n return {\n ...deleteFiles('jest.config.js', 'jest.setup.js'),\n\n 'jest.config.ts': async (tsFile, currentFiles, initialFiles) => {\n // Allow customised TS Jest config that extends skuba\n if (tsFile?.includes('skuba')) {\n return OUTDATED_ISOLATED_MODULES_CONFIG_SNIPPETS.reduce(\n (acc, snippet) => acc.replace(snippet, ''),\n tsFile,\n );\n }\n\n const jsFile = initialFiles['jest.config.js'];\n\n // Migrate a JS config that extends skuba, retaining all existing props\n if (jsFile?.includes('skuba')) {\n return transformModuleImportsAndExports(jsFile, (_, p) => p);\n }\n\n currentFiles['jest.setup.ts'] ??=\n initialFiles['jest.setup.js'] ?? setupFile;\n\n const inputFile = tsFile ?? jsFile;\n\n const props =\n inputFile === undefined\n ? undefined\n : await readModuleExports(inputFile);\n\n if (props === undefined) {\n return configFile;\n }\n\n const filteredProps = filterProps(null, props);\n\n const appendProps = createPropAppender(filteredProps);\n\n // Append a subset of custom props to our base `jest.config.ts`\n return transformModuleImportsAndExports(configFile, appendProps);\n },\n\n 'package.json': withPackage(({ jest, ...data }) => data),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,wBAKO;AAGP,MAAM,4CAA4C;AAAA,EAChD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA;AAAA;AAAA;AAAA;AAAA;AAAA;AAMF;AAGA,MAAM,kBAAc,oCAAiB;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AAEM,MAAM,aAAa,YAA6B;AACrD,QAAM,CAAC,YAAY,SAAS,IAAI,MAAM,QAAQ,IAAI;AAAA,QAChD,sCAAqB,gBAAgB;AAAA,QACrC,sCAAqB,eAAe;AAAA,EACtC,CAAC;AAED,SAAO;AAAA,IACL,OAAG,gCAAY,kBAAkB,eAAe;AAAA,IAEhD,kBAAkB,OAAO,QAAQ,cAAc,iBAAiB;AAE9D,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,eAAO,0CAA0C;AAAA,UAC/C,CAAC,KAAK,YAAY,IAAI,QAAQ,SAAS,EAAE;AAAA,UACzC;AAAA,QACF;AAAA,MACF;AAEA,YAAM,SAAS,aAAa,gBAAgB;AAG5C,UAAI,QAAQ,SAAS,OAAO,GAAG;AAC7B,mBAAO,oDAAiC,QAAQ,CAAC,GAAG,MAAM,CAAC;AAAA,MAC7D;AAEA,mBAAa,eAAe,MAC1B,aAAa,eAAe,KAAK;AAEnC,YAAM,YAAY,UAAU;AAE5B,YAAM,QACJ,cAAc,SACV,SACA,UAAM,qCAAkB,SAAS;AAEvC,UAAI,UAAU,QAAW;AACvB,eAAO;AAAA,MACT;AAEA,YAAM,gBAAgB,YAAY,MAAM,KAAK;AAE7C,YAAM,kBAAc,sCAAmB,aAAa;AAGpD,iBAAO,oDAAiC,YAAY,WAAW;AAAA,IACjE;AAAA,IAEA,oBAAgB,4BAAY,CAAC,EAAE,MAAM,GAAG,KAAK,MAAM,IAAI;AAAA,EACzD;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const nodemonModule: () => Module;
|
|
@@ -21,7 +21,7 @@ __export(nodemon_exports, {
|
|
|
21
21
|
nodemonModule: () => nodemonModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(nodemon_exports);
|
|
24
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
24
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
25
25
|
const nodemonModule = () => (0, import_deleteFiles.deleteFiles)("nodemon.json");
|
|
26
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
27
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/nodemon.ts"],
|
|
4
|
-
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles';\nimport type { Module } from '../types';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
|
|
4
|
+
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const nodemonModule = (): Module => deleteFiles('nodemon.json');\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,gBAAgB,UAAc,gCAAY,cAAc;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const packageModule: ({ entryPoint, packageManager, type, }: Options) => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(package_exports, {
|
|
|
21
21
|
packageModule: () => packageModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(package_exports);
|
|
24
|
-
var import_version = require("../../../utils/version");
|
|
25
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
26
|
-
var import_package = require("../processing/package");
|
|
27
|
-
var import_record = require("../processing/record");
|
|
24
|
+
var import_version = require("../../../utils/version.js");
|
|
25
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
26
|
+
var import_package = require("../processing/package.js");
|
|
27
|
+
var import_record = require("../processing/record.js");
|
|
28
28
|
const DEFAULT_PACKAGE_FILES = [
|
|
29
29
|
"lib*/**/*.d.ts",
|
|
30
30
|
"lib*/**/*.js",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/package.ts"],
|
|
4
|
-
"sourcesContent": ["import { getSkubaVersion } from '../../../utils/version';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport { merge } from '../processing/record';\nimport type { Module, Options } from '../types';\n\nconst DEFAULT_PACKAGE_FILES = [\n 'lib*/**/*.d.ts',\n 'lib*/**/*.js',\n 'lib*/**/*.js.map',\n 'lib*/**/*.json',\n];\n\nexport const packageModule = async ({\n entryPoint,\n packageManager,\n type,\n}: Options): Promise<Module> => {\n const version = await getSkubaVersion();\n\n const initialData = {\n private: type !== 'package',\n\n scripts: {\n build: type === 'package' ? 'skuba build-package' : 'skuba build',\n format: 'skuba format',\n lint: 'skuba lint',\n ...(type === 'package' ? {} : { start: 'skuba start' }),\n test: 'skuba test --coverage',\n 'test:watch': 'skuba test --watch',\n },\n skuba: {\n entryPoint,\n template: null,\n type,\n version,\n },\n };\n\n const recurringData = {\n skuba: {\n entryPoint,\n type,\n version,\n },\n };\n\n return {\n ...deleteFiles('.npmignore', 'package-lock.json'),\n\n 'package.json': (inputFile) =>\n withPackage((inputData) => {\n const outputData = merge(\n inputData,\n 'skuba' in inputData ? recurringData : initialData,\n );\n\n outputData.license ??= 'UNLICENSED';\n outputData.scripts ??= {};\n\n // Workspaces can only be enabled in private projects\n if (outputData.workspaces && !outputData.private) {\n outputData.private = true;\n }\n\n delete outputData.scripts.commit;\n delete outputData.scripts['format:check'];\n delete outputData.scripts['lint:build'];\n delete outputData.scripts['lint:compile'];\n delete outputData.scripts['lint:eslint'];\n delete outputData.scripts['lint:prettier'];\n delete outputData.scripts['lint:tslint'];\n delete outputData.scripts['test:build'];\n delete outputData.scripts['test:jest'];\n delete outputData.typings;\n\n if (type === 'package') {\n outputData.files = (\n outputData.files ?? DEFAULT_PACKAGE_FILES\n ).flatMap((filePattern) =>\n filePattern === 'lib' ? DEFAULT_PACKAGE_FILES : [filePattern],\n );\n\n outputData.version ??= '0.0.0-semantically-released';\n\n // User-defined pre- and post-scripts are confusing and dropped by e.g.\n // Yarn 2.\n outputData.scripts.release = [\n outputData.scripts.prepublish,\n outputData.scripts.prerelease,\n outputData.scripts.release ?? 'skuba release',\n ]\n .filter((script): script is string => typeof script === 'string')\n .map((script) =>\n script\n .replace(\n /^smt build$/,\n `${packageManager.print.runSilent} build`,\n )\n .replace(/^smt /, 'skuba ')\n .trim(),\n )\n .filter(Boolean)\n .join(' && ');\n\n // Align with the required syntax for package.json#/paths\n if (outputData.scripts.build === 'skuba build-package') {\n outputData.main = './lib-commonjs/index.js';\n outputData.module = './lib-es2015/index.js';\n outputData.types = './lib-types/index.d.ts';\n } else {\n outputData.main = './lib/index.js';\n outputData.module = './lib/index.js';\n outputData.types = './lib/index.d.ts';\n }\n\n delete outputData.scripts.prepublish;\n delete outputData.scripts.prerelease;\n }\n\n return outputData;\n })(inputFile),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { getSkubaVersion } from '../../../utils/version.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { merge } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst DEFAULT_PACKAGE_FILES = [\n 'lib*/**/*.d.ts',\n 'lib*/**/*.js',\n 'lib*/**/*.js.map',\n 'lib*/**/*.json',\n];\n\nexport const packageModule = async ({\n entryPoint,\n packageManager,\n type,\n}: Options): Promise<Module> => {\n const version = await getSkubaVersion();\n\n const initialData = {\n private: type !== 'package',\n\n scripts: {\n build: type === 'package' ? 'skuba build-package' : 'skuba build',\n format: 'skuba format',\n lint: 'skuba lint',\n ...(type === 'package' ? {} : { start: 'skuba start' }),\n test: 'skuba test --coverage',\n 'test:watch': 'skuba test --watch',\n },\n skuba: {\n entryPoint,\n template: null,\n type,\n version,\n },\n };\n\n const recurringData = {\n skuba: {\n entryPoint,\n type,\n version,\n },\n };\n\n return {\n ...deleteFiles('.npmignore', 'package-lock.json'),\n\n 'package.json': (inputFile) =>\n withPackage((inputData) => {\n const outputData = merge(\n inputData,\n 'skuba' in inputData ? recurringData : initialData,\n );\n\n outputData.license ??= 'UNLICENSED';\n outputData.scripts ??= {};\n\n // Workspaces can only be enabled in private projects\n if (outputData.workspaces && !outputData.private) {\n outputData.private = true;\n }\n\n delete outputData.scripts.commit;\n delete outputData.scripts['format:check'];\n delete outputData.scripts['lint:build'];\n delete outputData.scripts['lint:compile'];\n delete outputData.scripts['lint:eslint'];\n delete outputData.scripts['lint:prettier'];\n delete outputData.scripts['lint:tslint'];\n delete outputData.scripts['test:build'];\n delete outputData.scripts['test:jest'];\n delete outputData.typings;\n\n if (type === 'package') {\n outputData.files = (\n outputData.files ?? DEFAULT_PACKAGE_FILES\n ).flatMap((filePattern) =>\n filePattern === 'lib' ? DEFAULT_PACKAGE_FILES : [filePattern],\n );\n\n outputData.version ??= '0.0.0-semantically-released';\n\n // User-defined pre- and post-scripts are confusing and dropped by e.g.\n // Yarn 2.\n outputData.scripts.release = [\n outputData.scripts.prepublish,\n outputData.scripts.prerelease,\n outputData.scripts.release ?? 'skuba release',\n ]\n .filter((script): script is string => typeof script === 'string')\n .map((script) =>\n script\n .replace(\n /^smt build$/,\n `${packageManager.print.runSilent} build`,\n )\n .replace(/^smt /, 'skuba ')\n .trim(),\n )\n .filter(Boolean)\n .join(' && ');\n\n // Align with the required syntax for package.json#/paths\n if (outputData.scripts.build === 'skuba build-package') {\n outputData.main = './lib-commonjs/index.js';\n outputData.module = './lib-es2015/index.js';\n outputData.types = './lib-types/index.d.ts';\n } else {\n outputData.main = './lib/index.js';\n outputData.module = './lib/index.js';\n outputData.types = './lib/index.d.ts';\n }\n\n delete outputData.scripts.prepublish;\n delete outputData.scripts.prerelease;\n }\n\n return outputData;\n })(inputFile),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAgC;AAChC,yBAA4B;AAC5B,qBAA4B;AAC5B,oBAAsB;AAGtB,MAAM,wBAAwB;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,gBAAgB,OAAO;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AACF,MAAgC;AAC9B,QAAM,UAAU,UAAM,gCAAgB;AAEtC,QAAM,cAAc;AAAA,IAClB,SAAS,SAAS;AAAA,IAElB,SAAS;AAAA,MACP,OAAO,SAAS,YAAY,wBAAwB;AAAA,MACpD,QAAQ;AAAA,MACR,MAAM;AAAA,MACN,GAAI,SAAS,YAAY,CAAC,IAAI,EAAE,OAAO,cAAc;AAAA,MACrD,MAAM;AAAA,MACN,cAAc;AAAA,IAChB;AAAA,IACA,OAAO;AAAA,MACL;AAAA,MACA,UAAU;AAAA,MACV;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,QAAM,gBAAgB;AAAA,IACpB,OAAO;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AAAA,IACL,OAAG,gCAAY,cAAc,mBAAmB;AAAA,IAEhD,gBAAgB,CAAC,kBACf,4BAAY,CAAC,cAAc;AACzB,YAAM,iBAAa;AAAA,QACjB;AAAA,QACA,WAAW,YAAY,gBAAgB;AAAA,MACzC;AAEA,iBAAW,YAAY;AACvB,iBAAW,YAAY,CAAC;AAGxB,UAAI,WAAW,cAAc,CAAC,WAAW,SAAS;AAChD,mBAAW,UAAU;AAAA,MACvB;AAEA,aAAO,WAAW,QAAQ;AAC1B,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,cAAc;AACxC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,eAAe;AACzC,aAAO,WAAW,QAAQ,aAAa;AACvC,aAAO,WAAW,QAAQ,YAAY;AACtC,aAAO,WAAW,QAAQ,WAAW;AACrC,aAAO,WAAW;AAElB,UAAI,SAAS,WAAW;AACtB,mBAAW,SACT,WAAW,SAAS,uBACpB;AAAA,UAAQ,CAAC,gBACT,gBAAgB,QAAQ,wBAAwB,CAAC,WAAW;AAAA,QAC9D;AAEA,mBAAW,YAAY;AAIvB,mBAAW,QAAQ,UAAU;AAAA,UAC3B,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ;AAAA,UACnB,WAAW,QAAQ,WAAW;AAAA,QAChC,EACG,OAAO,CAAC,WAA6B,OAAO,WAAW,QAAQ,EAC/D;AAAA,UAAI,CAAC,WACJ,OACG;AAAA,YACC;AAAA,YACA,GAAG,eAAe,MAAM,SAAS;AAAA,UACnC,EACC,QAAQ,SAAS,QAAQ,EACzB,KAAK;AAAA,QACV,EACC,OAAO,OAAO,EACd,KAAK,MAAM;AAGd,YAAI,WAAW,QAAQ,UAAU,uBAAuB;AACtD,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB,OAAO;AACL,qBAAW,OAAO;AAClB,qBAAW,SAAS;AACpB,qBAAW,QAAQ;AAAA,QACrB;AAEA,eAAO,WAAW,QAAQ;AAC1B,eAAO,WAAW,QAAQ;AAAA,MAC5B;AAEA,aAAO;AAAA,IACT,CAAC,EAAE,SAAS;AAAA,EAChB;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const prettierModule: () => Promise<Module>;
|
|
@@ -21,10 +21,10 @@ __export(prettier_exports, {
|
|
|
21
21
|
prettierModule: () => prettierModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(prettier_exports);
|
|
24
|
-
var import_template = require("../../../utils/template");
|
|
25
|
-
var import_configFile = require("../processing/configFile");
|
|
26
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
27
|
-
var import_package = require("../processing/package");
|
|
24
|
+
var import_template = require("../../../utils/template.js");
|
|
25
|
+
var import_configFile = require("../processing/configFile.js");
|
|
26
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
27
|
+
var import_package = require("../processing/package.js");
|
|
28
28
|
const prettierModule = async () => {
|
|
29
29
|
const [configFile, ignoreFile] = await Promise.all([
|
|
30
30
|
(0, import_template.readBaseTemplateFile)("_.prettierrc.js"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { mergeWithConfigFile } from '../processing/configFile';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport type { Module } from '../types';\n\nexport const prettierModule = async (): Promise<Module> => {\n const [configFile, ignoreFile] = await Promise.all([\n readBaseTemplateFile('_.prettierrc.js'),\n readBaseTemplateFile('_.prettierignore'),\n ]);\n\n return {\n ...deleteFiles(\n '.prettierrc',\n '.prettierrc.json',\n '.prettierrc.toml',\n '.prettierrc.yaml',\n '.prettierrc.yml',\n 'prettier.config.js',\n ),\n\n '.prettierignore': mergeWithConfigFile(ignoreFile),\n\n // enforce skuba opinions as there's no value in customising Prettier configs\n '.prettierrc.js': () => configFile,\n\n 'package.json': withPackage(({ prettier, ...data }) => data),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { mergeWithConfigFile } from '../processing/configFile.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport type { Module } from '../types.js';\n\nexport const prettierModule = async (): Promise<Module> => {\n const [configFile, ignoreFile] = await Promise.all([\n readBaseTemplateFile('_.prettierrc.js'),\n readBaseTemplateFile('_.prettierignore'),\n ]);\n\n return {\n ...deleteFiles(\n '.prettierrc',\n '.prettierrc.json',\n '.prettierrc.toml',\n '.prettierrc.yaml',\n '.prettierrc.yml',\n 'prettier.config.js',\n ),\n\n '.prettierignore': mergeWithConfigFile(ignoreFile),\n\n // enforce skuba opinions as there's no value in customising Prettier configs\n '.prettierrc.js': () => configFile,\n\n 'package.json': withPackage(({ prettier, ...data }) => data),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,wBAAoC;AACpC,yBAA4B;AAC5B,qBAA4B;AAGrB,MAAM,iBAAiB,YAA6B;AACzD,QAAM,CAAC,YAAY,UAAU,IAAI,MAAM,QAAQ,IAAI;AAAA,QACjD,sCAAqB,iBAAiB;AAAA,QACtC,sCAAqB,kBAAkB;AAAA,EACzC,CAAC;AAED,SAAO;AAAA,IACL,OAAG;AAAA,MACD;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IAEA,uBAAmB,uCAAoB,UAAU;AAAA;AAAA,IAGjD,kBAAkB,MAAM;AAAA,IAExB,oBAAgB,4BAAY,CAAC,EAAE,UAAU,GAAG,KAAK,MAAM,IAAI;AAAA,EAC7D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,11 +22,11 @@ __export(renovate_exports, {
|
|
|
22
22
|
renovateModule: () => renovateModule
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(renovate_exports);
|
|
25
|
-
var import_template = require("../../../utils/template");
|
|
26
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
27
|
-
var import_package = require("../processing/package");
|
|
28
|
-
var import_prettier = require("../processing/prettier");
|
|
29
|
-
var import_record = require("../processing/record");
|
|
25
|
+
var import_template = require("../../../utils/template.js");
|
|
26
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
27
|
+
var import_package = require("../processing/package.js");
|
|
28
|
+
var import_prettier = require("../processing/prettier.js");
|
|
29
|
+
var import_record = require("../processing/record.js");
|
|
30
30
|
const OTHER_CONFIG_FILENAMES = [
|
|
31
31
|
".github/renovate.json",
|
|
32
32
|
".renovaterc",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/renovate.ts"],
|
|
4
|
-
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template';\nimport { deleteFiles } from '../processing/deleteFiles';\nimport { withPackage } from '../processing/package';\nimport { formatPrettier } from '../processing/prettier';\nimport { getFirstDefined } from '../processing/record';\nimport type { Module, Options } from '../types';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(({ private: _, renovate, ...data }) => ({\n ...data,\n private: type !== 'package',\n })),\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { readBaseTemplateFile } from '../../../utils/template.js';\nimport { deleteFiles } from '../processing/deleteFiles.js';\nimport { withPackage } from '../processing/package.js';\nimport { formatPrettier } from '../processing/prettier.js';\nimport { getFirstDefined } from '../processing/record.js';\nimport type { Module, Options } from '../types.js';\n\nconst OTHER_CONFIG_FILENAMES = [\n '.github/renovate.json',\n '.renovaterc',\n '.renovaterc.json',\n 'renovate.json',\n 'renovate.json5',\n];\n\nexport const RENOVATE_CONFIG_FILENAMES = [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n];\n\nexport const renovateModule = async ({ type }: Options): Promise<Module> => {\n const configFile = await readBaseTemplateFile('.github/renovate.json5');\n\n return {\n ...deleteFiles(...OTHER_CONFIG_FILENAMES),\n\n '.github/renovate.json5': (_inputFile, _files, initialFiles) => {\n // allow migration from other Renovate config files\n const inputFile = getFirstDefined(initialFiles, [\n '.github/renovate.json5',\n ...OTHER_CONFIG_FILENAMES,\n ]);\n\n // allow customised Renovate configs that extend a SEEK configuration\n return inputFile?.includes('seek')\n ? formatPrettier(inputFile, { parser: 'json5' })\n : configFile;\n },\n\n /**\n * Ensure Renovate correctly detects the project as an application/library.\n *\n * @see {@link https://docs.renovatebot.com/configuration-options/#rangestrategy }\n * @see {@link https://github.com/renovatebot/renovate/blob/8c361082842bb157d85ca39ecf4f6075730e74bb/lib/manager/npm/extract/type.ts#L3 }\n */\n 'package.json': withPackage(({ private: _, renovate, ...data }) => ({\n ...data,\n private: type !== 'package',\n })),\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqC;AACrC,yBAA4B;AAC5B,qBAA4B;AAC5B,sBAA+B;AAC/B,oBAAgC;AAGhC,MAAM,yBAAyB;AAAA,EAC7B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA,GAAG;AACL;AAEO,MAAM,iBAAiB,OAAO,EAAE,KAAK,MAAgC;AAC1E,QAAM,aAAa,UAAM,sCAAqB,wBAAwB;AAEtE,SAAO;AAAA,IACL,OAAG,gCAAY,GAAG,sBAAsB;AAAA,IAExC,0BAA0B,CAAC,YAAY,QAAQ,iBAAiB;AAE9D,YAAM,gBAAY,+BAAgB,cAAc;AAAA,QAC9C;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAGD,aAAO,WAAW,SAAS,MAAM,QAC7B,gCAAe,WAAW,EAAE,QAAQ,QAAQ,CAAC,IAC7C;AAAA,IACN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQA,oBAAgB,4BAAY,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,KAAK,OAAO;AAAA,MAClE,GAAG;AAAA,MACH,SAAS,SAAS;AAAA,IACpB,EAAE;AAAA,EACJ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const serverlessModule: ({}: Options) => Module;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/serverless.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module, Options } from '../types';\n\nexport const serverlessModule = ({}: Options): Module => ({\n '**/serverless*.yml': (inputFile, _files, _initialFiles) => {\n if (!inputFile) {\n // Only configure files that exist.\n return;\n }\n\n return (\n inputFile\n // Rewire packaging patterns.\n .replace(/- (\\.?\\/)?dist\\//g, '- lib/')\n // Rewire handler paths.\n .replace(/handler: (\\.?\\/)?dist\\//g, 'handler: lib/')\n );\n },\n});\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module, Options } from '../types.js';\n\nexport const serverlessModule = ({}: Options): Module => ({\n '**/serverless*.yml': (inputFile, _files, _initialFiles) => {\n if (!inputFile) {\n // Only configure files that exist.\n return;\n }\n\n return (\n inputFile\n // Rewire packaging patterns.\n .replace(/- (\\.?\\/)?dist\\//g, '- lib/')\n // Rewire handler paths.\n .replace(/handler: (\\.?\\/)?dist\\//g, 'handler: lib/')\n );\n },\n});\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,MAAM,mBAAmB,CAAC,CAAC,OAAwB;AAAA,EACxD,sBAAsB,CAAC,WAAW,QAAQ,kBAAkB;AAC1D,QAAI,CAAC,WAAW;AAEd;AAAA,IACF;AAEA,WACE,UAEG,QAAQ,qBAAqB,QAAQ,EAErC,QAAQ,4BAA4B,eAAe;AAAA,EAE1D;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module, Options } from '../types';
|
|
1
|
+
import type { Module, Options } from '../types.js';
|
|
2
2
|
export declare const skubaDiveModule: ({ entryPoint, type }: Options) => Module;
|
|
@@ -32,10 +32,10 @@ __export(skubaDive_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(skubaDive_exports);
|
|
34
34
|
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_skubaDive = require("../dependencies/skubaDive");
|
|
36
|
-
var import_javascript = require("../processing/javascript");
|
|
37
|
-
var import_loadFiles = require("../processing/loadFiles");
|
|
38
|
-
var import_package = require("../processing/package");
|
|
35
|
+
var import_skubaDive = require("../dependencies/skubaDive.js");
|
|
36
|
+
var import_javascript = require("../processing/javascript.js");
|
|
37
|
+
var import_loadFiles = require("../processing/loadFiles.js");
|
|
38
|
+
var import_package = require("../processing/package.js");
|
|
39
39
|
const DEFAULT_FILENAME = "src/register.ts";
|
|
40
40
|
const skubaDiveModule = ({ entryPoint, type }) => {
|
|
41
41
|
if (type === "package") {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/skubaDive.ts"],
|
|
4
|
-
"sourcesContent": ["import path from 'path';\n\nimport { SKUBA_DIVE_HOOKS } from '../dependencies/skubaDive';\nimport { prependImport, stripImports } from '../processing/javascript';\nimport { loadFiles } from '../processing/loadFiles';\nimport { parsePackage } from '../processing/package';\nimport type { Module, Options } from '../types';\n\nconst DEFAULT_FILENAME = 'src/register.ts';\n\nexport const skubaDiveModule = ({ entryPoint, type }: Options): Module => {\n // skuba-dive is a runtime component; it's not appropriate for packages\n if (type === 'package') {\n return {};\n }\n\n return {\n ...loadFiles(DEFAULT_FILENAME, 'package.json'),\n\n [entryPoint]: (inputFile, files) => {\n const packageJson = parsePackage(files['package.json']);\n\n const registerFile = files[DEFAULT_FILENAME];\n\n if (\n !packageJson?.dependencies?.['skuba-dive'] ||\n inputFile === undefined ||\n inputFile.includes('skuba-dive/register') ||\n registerFile?.includes('skuba-dive/register')\n ) {\n return inputFile;\n }\n\n const outputFile = stripImports(SKUBA_DIVE_HOOKS, inputFile);\n\n const relativeToSrc = path.posix.relative(\n path.join(entryPoint, '..'),\n 'src',\n );\n\n // import skuba-dive directly from the entry point\n if (relativeToSrc === '') {\n return prependImport('skuba-dive/register', outputFile);\n }\n\n // import skuba-dive via src/register.ts\n files[DEFAULT_FILENAME] = prependImport(\n 'skuba-dive/register',\n registerFile,\n );\n\n return prependImport(`${relativeToSrc}/register`, outputFile);\n },\n };\n};\n"],
|
|
4
|
+
"sourcesContent": ["import path from 'path';\n\nimport { SKUBA_DIVE_HOOKS } from '../dependencies/skubaDive.js';\nimport { prependImport, stripImports } from '../processing/javascript.js';\nimport { loadFiles } from '../processing/loadFiles.js';\nimport { parsePackage } from '../processing/package.js';\nimport type { Module, Options } from '../types.js';\n\nconst DEFAULT_FILENAME = 'src/register.ts';\n\nexport const skubaDiveModule = ({ entryPoint, type }: Options): Module => {\n // skuba-dive is a runtime component; it's not appropriate for packages\n if (type === 'package') {\n return {};\n }\n\n return {\n ...loadFiles(DEFAULT_FILENAME, 'package.json'),\n\n [entryPoint]: (inputFile, files) => {\n const packageJson = parsePackage(files['package.json']);\n\n const registerFile = files[DEFAULT_FILENAME];\n\n if (\n !packageJson?.dependencies?.['skuba-dive'] ||\n inputFile === undefined ||\n inputFile.includes('skuba-dive/register') ||\n registerFile?.includes('skuba-dive/register')\n ) {\n return inputFile;\n }\n\n const outputFile = stripImports(SKUBA_DIVE_HOOKS, inputFile);\n\n const relativeToSrc = path.posix.relative(\n path.join(entryPoint, '..'),\n 'src',\n );\n\n // import skuba-dive directly from the entry point\n if (relativeToSrc === '') {\n return prependImport('skuba-dive/register', outputFile);\n }\n\n // import skuba-dive via src/register.ts\n files[DEFAULT_FILENAME] = prependImport(\n 'skuba-dive/register',\n registerFile,\n );\n\n return prependImport(`${relativeToSrc}/register`, outputFile);\n },\n };\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAiB;AAEjB,uBAAiC;AACjC,wBAA4C;AAC5C,uBAA0B;AAC1B,qBAA6B;AAG7B,MAAM,mBAAmB;AAElB,MAAM,kBAAkB,CAAC,EAAE,YAAY,KAAK,MAAuB;AAExE,MAAI,SAAS,WAAW;AACtB,WAAO,CAAC;AAAA,EACV;AAEA,SAAO;AAAA,IACL,OAAG,4BAAU,kBAAkB,cAAc;AAAA,IAE7C,CAAC,UAAU,GAAG,CAAC,WAAW,UAAU;AAClC,YAAM,kBAAc,6BAAa,MAAM,cAAc,CAAC;AAEtD,YAAM,eAAe,MAAM,gBAAgB;AAE3C,UACE,CAAC,aAAa,eAAe,YAAY,KACzC,cAAc,UACd,UAAU,SAAS,qBAAqB,KACxC,cAAc,SAAS,qBAAqB,GAC5C;AACA,eAAO;AAAA,MACT;AAEA,YAAM,iBAAa,gCAAa,mCAAkB,SAAS;AAE3D,YAAM,gBAAgB,YAAAA,QAAK,MAAM;AAAA,QAC/B,YAAAA,QAAK,KAAK,YAAY,IAAI;AAAA,QAC1B;AAAA,MACF;AAGA,UAAI,kBAAkB,IAAI;AACxB,mBAAO,iCAAc,uBAAuB,UAAU;AAAA,MACxD;AAGA,YAAM,gBAAgB,QAAI;AAAA,QACxB;AAAA,QACA;AAAA,MACF;AAEA,iBAAO,iCAAc,GAAG,aAAa,aAAa,UAAU;AAAA,IAC9D;AAAA,EACF;AACF;",
|
|
6
6
|
"names": ["path"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { Module } from '../types';
|
|
1
|
+
import type { Module } from '../types.js';
|
|
2
2
|
export declare const tslintModule: () => Module;
|
|
@@ -21,7 +21,7 @@ __export(tslint_exports, {
|
|
|
21
21
|
tslintModule: () => tslintModule
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(tslint_exports);
|
|
24
|
-
var import_deleteFiles = require("../processing/deleteFiles");
|
|
24
|
+
var import_deleteFiles = require("../processing/deleteFiles.js");
|
|
25
25
|
const tslintModule = () => (0, import_deleteFiles.deleteFiles)("tslint.json", "tslint.yaml");
|
|
26
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
27
|
0 && (module.exports = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/modules/tslint.ts"],
|
|
4
|
-
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles';\nimport type { Module } from '../types';\n\nexport const tslintModule = (): Module =>\n deleteFiles('tslint.json', 'tslint.yaml');\n"],
|
|
4
|
+
"sourcesContent": ["import { deleteFiles } from '../processing/deleteFiles.js';\nimport type { Module } from '../types.js';\n\nexport const tslintModule = (): Module =>\n deleteFiles('tslint.json', 'tslint.yaml');\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B;AAGrB,MAAM,eAAe,UAC1B,gCAAY,eAAe,aAAa;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/deleteFiles.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module } from '../types';\n\n/**\n * Load files into cache and schedule them for deletion.\n */\nexport const deleteFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, () => undefined] as const),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module } from '../types.js';\n\n/**\n * Load files into cache and schedule them for deletion.\n */\nexport const deleteFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, () => undefined] as const),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,cAAc,IAAI,cAC7B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,MAAM,MAAS,CAAU;AAClE;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -22,8 +22,8 @@ __export(json_exports, {
|
|
|
22
22
|
parseObject: () => parseObject
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(json_exports);
|
|
25
|
-
var import_validation = require("../../../utils/validation");
|
|
26
|
-
var import_prettier = require("./prettier");
|
|
25
|
+
var import_validation = require("../../../utils/validation.js");
|
|
26
|
+
var import_prettier = require("./prettier.js");
|
|
27
27
|
const formatObject = (data, filepath) => {
|
|
28
28
|
const sortedData = Object.fromEntries(
|
|
29
29
|
Object.entries(data).sort(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/json.ts"],
|
|
4
|
-
"sourcesContent": ["import { isObject } from '../../../utils/validation';\n\nimport { formatPrettier } from './prettier';\n\nexport const formatObject = (\n data: Record<Exclude<PropertyKey, symbol>, unknown>,\n filepath?: string,\n) => {\n const sortedData = Object.fromEntries(\n Object.entries(data).sort(([keyA], [keyB]) =>\n String(keyA).localeCompare(String(keyB)),\n ),\n );\n\n const output = JSON.stringify(sortedData, null, 2);\n\n return formatPrettier(\n output,\n filepath === undefined ? { parser: 'json' } : { filepath },\n );\n};\n\nexport const parseObject = (\n input: string | undefined,\n): Record<Exclude<PropertyKey, symbol>, unknown> | undefined => {\n if (input === undefined) {\n return;\n }\n\n try {\n const data = JSON.parse(input) as unknown;\n\n if (isObject(data)) {\n return data;\n }\n } catch {}\n\n return;\n};\n"],
|
|
4
|
+
"sourcesContent": ["import { isObject } from '../../../utils/validation.js';\n\nimport { formatPrettier } from './prettier.js';\n\nexport const formatObject = (\n data: Record<Exclude<PropertyKey, symbol>, unknown>,\n filepath?: string,\n) => {\n const sortedData = Object.fromEntries(\n Object.entries(data).sort(([keyA], [keyB]) =>\n String(keyA).localeCompare(String(keyB)),\n ),\n );\n\n const output = JSON.stringify(sortedData, null, 2);\n\n return formatPrettier(\n output,\n filepath === undefined ? { parser: 'json' } : { filepath },\n );\n};\n\nexport const parseObject = (\n input: string | undefined,\n): Record<Exclude<PropertyKey, symbol>, unknown> | undefined => {\n if (input === undefined) {\n return;\n }\n\n try {\n const data = JSON.parse(input) as unknown;\n\n if (isObject(data)) {\n return data;\n }\n } catch {}\n\n return;\n};\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAAyB;AAEzB,sBAA+B;AAExB,MAAM,eAAe,CAC1B,MACA,aACG;AACH,QAAM,aAAa,OAAO;AAAA,IACxB,OAAO,QAAQ,IAAI,EAAE;AAAA,MAAK,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,MACtC,OAAO,IAAI,EAAE,cAAc,OAAO,IAAI,CAAC;AAAA,IACzC;AAAA,EACF;AAEA,QAAM,SAAS,KAAK,UAAU,YAAY,MAAM,CAAC;AAEjD,aAAO;AAAA,IACL;AAAA,IACA,aAAa,SAAY,EAAE,QAAQ,OAAO,IAAI,EAAE,SAAS;AAAA,EAC3D;AACF;AAEO,MAAM,cAAc,CACzB,UAC8D;AAC9D,MAAI,UAAU,QAAW;AACvB;AAAA,EACF;AAEA,MAAI;AACF,UAAM,OAAO,KAAK,MAAM,KAAK;AAE7B,YAAI,4BAAS,IAAI,GAAG;AAClB,aAAO;AAAA,IACT;AAAA,EACF,QAAQ;AAAA,EAAC;AAET;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/loadFiles.ts"],
|
|
4
|
-
"sourcesContent": ["import type { Module } from '../types';\n\n/**\n * Load files into cache to perform side effects in another module.\n */\nexport const loadFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, (file?: string) => file] as const),\n );\n"],
|
|
4
|
+
"sourcesContent": ["import type { Module } from '../types.js';\n\n/**\n * Load files into cache to perform side effects in another module.\n */\nexport const loadFiles = (...filenames: string[]): Module =>\n Object.fromEntries(\n filenames.map((filename) => [filename, (file?: string) => file] as const),\n );\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKO,MAAM,YAAY,IAAI,cAC3B,OAAO;AAAA,EACL,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,SAAkB,IAAI,CAAU;AAC1E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -21,7 +21,7 @@ __export(module_exports, {
|
|
|
21
21
|
replacePackageReferences: () => replacePackageReferences
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(module_exports);
|
|
24
|
-
var import_copy = require("../../../utils/copy");
|
|
24
|
+
var import_copy = require("../../../utils/copy.js");
|
|
25
25
|
const replacePackageReferences = (props) => (0, import_copy.createStringReplacer)([
|
|
26
26
|
{
|
|
27
27
|
input: new RegExp(`(['"])${props.old.packageName}(['"/])`, "g"),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/module.ts"],
|
|
4
|
-
"sourcesContent": ["import { createStringReplacer } from '../../../utils/copy';\n\nexport const replacePackageReferences = (props: {\n old: {\n packageName: string;\n repoSlug: string;\n };\n new: {\n packageName: string;\n repoSlug: string;\n };\n}) =>\n createStringReplacer([\n {\n input: new RegExp(`(['\"])${props.old.packageName}(['\"/])`, 'g'),\n output: `$1${props.new.packageName}$2`,\n },\n {\n input: new RegExp(props.old.repoSlug, 'ig'),\n output: props.new.repoSlug,\n },\n ]);\n"],
|
|
4
|
+
"sourcesContent": ["import { createStringReplacer } from '../../../utils/copy.js';\n\nexport const replacePackageReferences = (props: {\n old: {\n packageName: string;\n repoSlug: string;\n };\n new: {\n packageName: string;\n repoSlug: string;\n };\n}) =>\n createStringReplacer([\n {\n input: new RegExp(`(['\"])${props.old.packageName}(['\"/])`, 'g'),\n output: `$1${props.new.packageName}$2`,\n },\n {\n input: new RegExp(props.old.repoSlug, 'ig'),\n output: props.new.repoSlug,\n },\n ]);\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqC;AAE9B,MAAM,2BAA2B,CAAC,cAUvC,kCAAqB;AAAA,EACnB;AAAA,IACE,OAAO,IAAI,OAAO,SAAS,MAAM,IAAI,WAAW,WAAW,GAAG;AAAA,IAC9D,QAAQ,KAAK,MAAM,IAAI,WAAW;AAAA,EACpC;AAAA,EACA;AAAA,IACE,OAAO,IAAI,OAAO,MAAM,IAAI,UAAU,IAAI;AAAA,IAC1C,QAAQ,MAAM,IAAI;AAAA,EACpB;AACF,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { PackageJson } from '../types';
|
|
1
|
+
import type { PackageJson } from '../types.js';
|
|
2
2
|
export declare const formatPackage: (rawData: PackageJson) => Promise<string>;
|
|
3
3
|
export declare const parsePackage: (input: string | undefined) => PackageJson | undefined;
|
|
4
4
|
export declare const createDependencyFilter: (names: readonly string[], type: "dependencies" | "devDependencies") => (data: PackageJson) => {
|
|
@@ -35,8 +35,8 @@ __export(package_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(package_exports);
|
|
37
37
|
var import_normalize_package_data = __toESM(require("normalize-package-data"));
|
|
38
|
-
var import_json = require("./json");
|
|
39
|
-
var import_prettier = require("./prettier");
|
|
38
|
+
var import_json = require("./json.js");
|
|
39
|
+
var import_prettier = require("./prettier.js");
|
|
40
40
|
const formatPackage = async (rawData) => {
|
|
41
41
|
(0, import_normalize_package_data.default)(rawData);
|
|
42
42
|
delete rawData._id;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/package.ts"],
|
|
4
|
-
"sourcesContent": ["import normalizeData from 'normalize-package-data';\n\nimport type { PackageJson } from '../types';\n\nimport { parseObject } from './json';\nimport { formatPrettier } from './prettier';\n\nexport const formatPackage = async (rawData: PackageJson) => {\n normalizeData(rawData);\n\n // normalize-package-data fields that aren't useful for applications\n\n delete rawData._id;\n\n if (rawData.name === '') {\n delete rawData.name;\n }\n\n if (rawData.readme === 'ERROR: No README data found!') {\n delete rawData.readme;\n }\n\n if (rawData.version === '') {\n delete rawData.version;\n }\n\n return formatPrettier(JSON.stringify(rawData), {\n filepath: 'package.json',\n });\n};\n\nexport const parsePackage = (\n input: string | undefined,\n): PackageJson | undefined => {\n const data = parseObject(input);\n\n if (data === undefined) {\n return;\n }\n\n normalizeData(data);\n\n return data;\n};\n\nexport const createDependencyFilter = (\n names: readonly string[],\n type: 'dependencies' | 'devDependencies',\n) => {\n const set = new Set(names);\n\n return (data: PackageJson) => ({\n ...data,\n [type]: Object.fromEntries(\n Object.entries(data[type] ?? {}).filter(([name]) => !set.has(name)),\n ),\n });\n};\n\nexport const withPackage =\n (fn: (data: PackageJson) => PackageJson) => (input: string | undefined) => {\n const inputObject = parsePackage(input);\n\n const outputObject = fn(inputObject ?? {});\n\n return formatPackage(outputObject);\n };\n"],
|
|
4
|
+
"sourcesContent": ["import normalizeData from 'normalize-package-data';\n\nimport type { PackageJson } from '../types.js';\n\nimport { parseObject } from './json.js';\nimport { formatPrettier } from './prettier.js';\n\nexport const formatPackage = async (rawData: PackageJson) => {\n normalizeData(rawData);\n\n // normalize-package-data fields that aren't useful for applications\n\n delete rawData._id;\n\n if (rawData.name === '') {\n delete rawData.name;\n }\n\n if (rawData.readme === 'ERROR: No README data found!') {\n delete rawData.readme;\n }\n\n if (rawData.version === '') {\n delete rawData.version;\n }\n\n return formatPrettier(JSON.stringify(rawData), {\n filepath: 'package.json',\n });\n};\n\nexport const parsePackage = (\n input: string | undefined,\n): PackageJson | undefined => {\n const data = parseObject(input);\n\n if (data === undefined) {\n return;\n }\n\n normalizeData(data);\n\n return data;\n};\n\nexport const createDependencyFilter = (\n names: readonly string[],\n type: 'dependencies' | 'devDependencies',\n) => {\n const set = new Set(names);\n\n return (data: PackageJson) => ({\n ...data,\n [type]: Object.fromEntries(\n Object.entries(data[type] ?? {}).filter(([name]) => !set.has(name)),\n ),\n });\n};\n\nexport const withPackage =\n (fn: (data: PackageJson) => PackageJson) => (input: string | undefined) => {\n const inputObject = parsePackage(input);\n\n const outputObject = fn(inputObject ?? {});\n\n return formatPackage(outputObject);\n };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oCAA0B;AAI1B,kBAA4B;AAC5B,sBAA+B;AAExB,MAAM,gBAAgB,OAAO,YAAyB;AAC3D,oCAAAA,SAAc,OAAO;AAIrB,SAAO,QAAQ;AAEf,MAAI,QAAQ,SAAS,IAAI;AACvB,WAAO,QAAQ;AAAA,EACjB;AAEA,MAAI,QAAQ,WAAW,gCAAgC;AACrD,WAAO,QAAQ;AAAA,EACjB;AAEA,MAAI,QAAQ,YAAY,IAAI;AAC1B,WAAO,QAAQ;AAAA,EACjB;AAEA,aAAO,gCAAe,KAAK,UAAU,OAAO,GAAG;AAAA,IAC7C,UAAU;AAAA,EACZ,CAAC;AACH;AAEO,MAAM,eAAe,CAC1B,UAC4B;AAC5B,QAAM,WAAO,yBAAY,KAAK;AAE9B,MAAI,SAAS,QAAW;AACtB;AAAA,EACF;AAEA,oCAAAA,SAAc,IAAI;AAElB,SAAO;AACT;AAEO,MAAM,yBAAyB,CACpC,OACA,SACG;AACH,QAAM,MAAM,IAAI,IAAI,KAAK;AAEzB,SAAO,CAAC,UAAuB;AAAA,IAC7B,GAAG;AAAA,IACH,CAAC,IAAI,GAAG,OAAO;AAAA,MACb,OAAO,QAAQ,KAAK,IAAI,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC;AAAA,IACpE;AAAA,EACF;AACF;AAEO,MAAM,cACX,CAAC,OAA2C,CAAC,UAA8B;AACzE,QAAM,cAAc,aAAa,KAAK;AAEtC,QAAM,eAAe,GAAG,eAAe,CAAC,CAAC;AAEzC,SAAO,cAAc,YAAY;AACnC;",
|
|
6
6
|
"names": ["normalizeData"]
|
|
7
7
|
}
|
|
@@ -31,14 +31,12 @@ __export(prettier_exports, {
|
|
|
31
31
|
formatPrettier: () => formatPrettier
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(prettier_exports);
|
|
34
|
-
var import_prettier = __toESM(require("
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
});
|
|
41
|
-
};
|
|
34
|
+
var import_prettier = __toESM(require("prettier"));
|
|
35
|
+
var import_prettier2 = __toESM(require("../../../../config/prettier.js"));
|
|
36
|
+
const formatPrettier = (source, options) => import_prettier.default.format(source, {
|
|
37
|
+
...options,
|
|
38
|
+
...import_prettier2.default
|
|
39
|
+
});
|
|
42
40
|
// Annotate the CommonJS export names for ESM import in node:
|
|
43
41
|
0 && (module.exports = {
|
|
44
42
|
formatPrettier
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../src/cli/configure/processing/prettier.ts"],
|
|
4
|
-
"sourcesContent": ["import
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
6
|
-
"names": ["prettierConfig"]
|
|
4
|
+
"sourcesContent": ["import prettier from 'prettier';\n\nimport prettierConfig from '../../../../config/prettier.js';\n\ntype Options = Pick<prettier.Options, 'filepath' | 'parser'>;\n\nexport const formatPrettier = (source: string, options: Options) =>\n prettier.format(source, {\n ...options,\n ...prettierConfig,\n });\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sBAAqB;AAErB,IAAAA,mBAA2B;AAIpB,MAAM,iBAAiB,CAAC,QAAgB,YAC7C,gBAAAC,QAAS,OAAO,QAAQ;AAAA,EACtB,GAAG;AAAA,EACH,GAAG,iBAAAC;AACL,CAAC;",
|
|
6
|
+
"names": ["import_prettier", "prettier", "prettierConfig"]
|
|
7
7
|
}
|
|
@@ -35,7 +35,7 @@ __export(typescript_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(typescript_exports);
|
|
37
37
|
var import_typescript = __toESM(require("typescript"));
|
|
38
|
-
var import_prettier = require("./prettier");
|
|
38
|
+
var import_prettier = require("./prettier.js");
|
|
39
39
|
const BLANK_LINE_PLACEHOLDER = " __BLANK_LINE_PLACEHOLDER__";
|
|
40
40
|
const BLANK_LINE_REGEXP = new RegExp(`//${BLANK_LINE_PLACEHOLDER}`, "g");
|
|
41
41
|
const withLeadingBlankLinePlaceholder = (node) => import_typescript.default.addSyntheticLeadingComment(
|