@checkdigit/typescript-config 8.1.0-PR.68-c5c2 → 9.0.0-PR.68-e44d
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/bin/builder.mjs +4 -0
- package/dist-mjs/compile.mjs +5 -1
- package/package.json +1 -1
- package/src/compile.ts +5 -0
- package/tsconfig.json +2 -1
package/README.md
CHANGED
@@ -10,7 +10,7 @@ This module contains the standard Check Digit Typescript configuration, along wi
|
|
10
10
|
|
11
11
|
## Typescript Configuration
|
12
12
|
|
13
|
-
- currently requires Node
|
13
|
+
- currently requires Node 22.11 or above.
|
14
14
|
- emits `esnext`, with the default libraries, to avoid down-leveling. It is intended that application spec tests pick
|
15
15
|
up any issues with using newer features unavailable in a particular environment. Browsers and Node.js are fast-moving
|
16
16
|
targets, and can add language features at any time.
|
package/bin/builder.mjs
CHANGED
@@ -85,6 +85,9 @@ function resolveTypescriptPaths() {
|
|
85
85
|
}
|
86
86
|
let newPath = resolved.path;
|
87
87
|
newPath += isDirectory ? `/index.mjs` : `.mjs`;
|
88
|
+
if (newPath.endsWith(".ts.mjs")) {
|
89
|
+
newPath = `${newPath.slice(0, -".ts.mjs".length)}.mjs`;
|
90
|
+
}
|
88
91
|
return { path: newPath, external: true };
|
89
92
|
});
|
90
93
|
};
|
@@ -138,6 +141,7 @@ async function compile_default({
|
|
138
141
|
useUnknownInCatchVariables: true,
|
139
142
|
exactOptionalPropertyTypes: true,
|
140
143
|
isolatedDeclarations: false,
|
144
|
+
allowImportingTsExtensions: true,
|
141
145
|
noEmit: type2 !== "types",
|
142
146
|
emitDeclarationOnly: type2 === "types",
|
143
147
|
rootDir: inDir2,
|
package/dist-mjs/compile.mjs
CHANGED
@@ -51,6 +51,9 @@ function resolveTypescriptPaths() {
|
|
51
51
|
}
|
52
52
|
let newPath = resolved.path;
|
53
53
|
newPath += isDirectory ? `/index.mjs` : `.mjs`;
|
54
|
+
if (newPath.endsWith(".ts.mjs")) {
|
55
|
+
newPath = `${newPath.slice(0, -".ts.mjs".length)}.mjs`;
|
56
|
+
}
|
54
57
|
return { path: newPath, external: true };
|
55
58
|
});
|
56
59
|
};
|
@@ -104,6 +107,7 @@ async function compile_default({
|
|
104
107
|
useUnknownInCatchVariables: true,
|
105
108
|
exactOptionalPropertyTypes: true,
|
106
109
|
isolatedDeclarations: false,
|
110
|
+
allowImportingTsExtensions: true,
|
107
111
|
noEmit: type !== "types",
|
108
112
|
emitDeclarationOnly: type === "types",
|
109
113
|
rootDir: inDir,
|
@@ -183,4 +187,4 @@ async function compile_default({
|
|
183
187
|
export {
|
184
188
|
compile_default as default
|
185
189
|
};
|
186
|
-
//# sourceMappingURL=data:application/json;base64,
|
190
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbXBpbGUudHMiXSwKICAibWFwcGluZ3MiOiAiO0FBRUEsU0FBUyxVQUFVLGNBQWM7QUFDakMsU0FBUyxZQUFZLFVBQVU7QUFDL0IsT0FBTyxVQUFVO0FBRWpCLE9BQU8sZ0JBQWdCO0FBQ3ZCLFNBQVMsYUFBK0I7QUFFeEMsSUFBTSw4QkFBOEI7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBb0hwQyxlQUFlLFNBQVMsV0FBc0M7QUFDNUQsUUFBTSxVQUFVLE1BQU0sR0FBRyxRQUFRLFdBQVcsRUFBRSxlQUFlLEtBQUssQ0FBQztBQUNuRSxRQUFNLFFBQVEsTUFBTSxRQUFRO0FBQUEsSUFDMUIsUUFBUSxJQUFJLENBQUMsVUFBVTtBQUNyQixZQUFNLFNBQVMsS0FBSyxRQUFRLFdBQVcsTUFBTSxJQUFJO0FBQ2pELGFBQU8sTUFBTSxZQUFZLElBQUksU0FBUyxNQUFNLElBQUk7QUFBQSxJQUNsRCxDQUFDO0FBQUEsRUFDSDtBQUNBLFNBQU8sTUFBTSxLQUFLO0FBQ3BCO0FBRUEsU0FBUyxrQkFBa0IsUUFBZ0I7QUFDekMsU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tBQUFBLElBQ0YsSUFDQTtBQUFBO0FBQUEsTUFFRSxTQUFTLEtBQUssS0FBSyxRQUFRLE9BQU87QUFBQSxNQUNsQyxlQUFlO0FBQUEsTUFDZjtBQUFBLE1BQ0EsU0FBUztBQUFBLFFBQ1A7QUFBQSxVQUNFLE1BQU07QUFBQSxVQUNOLE9BQU8sa0JBQWtCLGVBQWU7QUFBQSxRQUMxQztBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsRUFDTixDQUFDO0FBRUQsV0FBUyxLQUFLLEdBQUcsWUFBWSxPQUFPLElBQUksQ0FBQyxVQUFVLGtCQUFrQixNQUFNLElBQUksRUFBRSxDQUFDO0FBQ2xGLE1BQUksU0FBUyxTQUFTLEdBQUc7QUFDdkIsVUFBTSxJQUFJLE1BQU0sa0JBQWtCLEtBQUssVUFBVSxRQUFRLENBQUMsRUFBRTtBQUFBLEVBQzlEO0FBRUEsU0FBTztBQUNUOyIsCiAgIm5hbWVzIjogW10KfQo=
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@checkdigit/typescript-config","version":"
|
1
|
+
{"name":"@checkdigit/typescript-config","version":"9.0.0-PR.68-e44d","description":"Check Digit standard Typescript configuration","homepage":"https://github.com/checkdigit/typescript-config#readme","bugs":{"url":"https://github.com/checkdigit/typescript-config/issues"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/typescript-config.git"},"license":"MIT","author":"Check Digit, LLC","type":"module","exports":{".":{"types":"./dist-types/index.d.ts","import":"./dist-mjs/index.mjs","default":"./tsconfig.json"}},"bin":{"builder":"./bin/builder.mjs"},"files":["bin","tsconfig.json","src","dist-types","dist-mjs","!src/**/test/**","!src/**/*.test.ts","!src/**/*.spec.ts","!dist-types/**/test/**","!dist-types/**/*.test.d.ts","!dist-types/**/*.spec.d.ts","!dist-mjs/**/test/**","!dist-mjs/**/*.test.mjs","!dist-mjs/**/*.spec.mjs","SECURITY.md"],"scripts":{"build":"npm run build:builder && npm run build:types && npm run build:mjs && npm run build:mjs-bundle && npm run build:mjs-bundle-minify && npm run build:mjs-bundle-no-external","build:builder":"esbuild src/builder.ts --bundle --platform=node --format=esm --external:typescript --external:esbuild --outfile=build-builder/builder.mjs && mkdir -p bin && { echo '#!/usr/bin/env node'; cat build-builder/builder.mjs; } > bin/builder.mjs && chmod +x bin/builder.mjs","build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","build:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","build:mjs":"rimraf build-mjs && bin/builder.mjs --type=module --outDir=build-mjs","build:mjs-bundle":"rimraf build-mjs-bundle && bin/builder.mjs --type=module --outDir=build-mjs-bundle --entryPoint=test/index.ts --outFile=test/index.mjs","build:mjs-bundle-minify":"rimraf build-mjs-bundle-minify && bin/builder.mjs --type=module --minify --outDir=build-mjs-bundle-minify --entryPoint=test/index.ts --outFile=test/index.mjs","build:mjs-bundle-no-external":"rimraf build-mjs-bundle-no-external && bin/builder.mjs --type=module --external=./node_modules/* --outDir=build-mjs-bundle-no-external --entryPoint=test/index.ts --outFile=test/index.mjs --minify","build:types":"rimraf build-types && bin/builder.mjs --type=types --outDir=build-types","ci:compile":"tsc --noEmit","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"npm run build && npm run test:jest-mjs && npm run test:mjs && npm run test:mjs-bundle && npm run test:mjs-bundle-no-external","lint":"eslint --max-warnings 0 .","lint:fix":"eslint . --fix","prepare":"","prepublishOnly":"npm run build:builder && npm run build:dist-types && npm run build:dist-mjs","prettier":"prettier --ignore-path .gitignore --list-different .","prettier:fix":"prettier --ignore-path .gitignore --write .","test":"npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style","test:jest-mjs":"NODE_OPTIONS=\"--disable-warning ExperimentalWarning --experimental-vm-modules\" jest --coverage=false","test:mjs":"node --test build-mjs/test/index.mjs","test:mjs-bundle":"node --test build-mjs-bundle/test/index.mjs","test:mjs-bundle-minify":"node --test build-mjs-bundle-minify/test/index.mjs","test:mjs-bundle-no-external":"node --test build-mjs-bundle-no-external/test/index.mjs"},"prettier":"@checkdigit/prettier-config","jest":{"collectCoverageFrom":["<rootDir>/src/**"],"extensionsToTreatAsEsm":[".ts"],"moduleFileExtensions":["js","mjs","cjs","ts","json","node"],"testMatch":["<rootDir>/src/**/*.spec.ts"],"transform":{"^.+\\.ts$":["ts-jest",{"isolatedModules":true,"diagnostics":false,"useESM":true}]}},"devDependencies":{"@checkdigit/prettier-config":"^5.5.1","@eslint/js":"^9.15.0","@eslint/json":"^0.7.0","@eslint/markdown":"^6.2.1","@jest/globals":"^29.7.0","@types/uuid":"^10.0.0","@typescript-eslint/parser":"^8.15.0","eslint":"^9.15.0","eslint-config-prettier":"^9.1.0","eslint-plugin-jest":"^28.9.0","eslint-plugin-yml":"^1.15.0","jest":"^29.7.0","rimraf":"^6.0.1","ts-jest":"^29.2.5","typescript-eslint":"^8.15.0","uuid":"^11.0.3"},"peerDependencies":{"@types/node":">=22","esbuild":"0.24.0","typescript":"5.7.1-rc"},"engines":{"node":">=22.11"},"overrides":{"typescript":"5.7.1-rc"}}
|
package/src/compile.ts
CHANGED
@@ -173,6 +173,10 @@ function resolveTypescriptPaths() {
|
|
173
173
|
}
|
174
174
|
let newPath = resolved.path;
|
175
175
|
newPath += isDirectory ? `/index.mjs` : `.mjs`;
|
176
|
+
// we need to trim the .ts out, now that "allowImportingTsExtensions": true
|
177
|
+
if (newPath.endsWith('.ts.mjs')) {
|
178
|
+
newPath = `${newPath.slice(0, -'.ts.mjs'.length)}.mjs`;
|
179
|
+
}
|
176
180
|
return { path: newPath, external: true };
|
177
181
|
});
|
178
182
|
};
|
@@ -235,6 +239,7 @@ export default async function ({
|
|
235
239
|
useUnknownInCatchVariables: true,
|
236
240
|
exactOptionalPropertyTypes: true,
|
237
241
|
isolatedDeclarations: false,
|
242
|
+
allowImportingTsExtensions: true,
|
238
243
|
noEmit: type !== 'types',
|
239
244
|
emitDeclarationOnly: type === 'types',
|
240
245
|
rootDir: inDir,
|