@checkdigit/typescript-config 10.1.0 → 10.1.1-PR.92-7c0e
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/bin/builder.mjs
CHANGED
|
@@ -50,6 +50,7 @@ function analyze(metafile) {
|
|
|
50
50
|
import { strict as assert2 } from "node:assert";
|
|
51
51
|
import { promises as fs } from "node:fs";
|
|
52
52
|
import path from "node:path";
|
|
53
|
+
import { fileURLToPath } from "node:url";
|
|
53
54
|
import typescript from "typescript";
|
|
54
55
|
import { build } from "esbuild";
|
|
55
56
|
|
|
@@ -58,6 +59,9 @@ var tsconfig_default = {
|
|
|
58
59
|
compilerOptions: {
|
|
59
60
|
target: "esnext",
|
|
60
61
|
moduleResolution: "bundler",
|
|
62
|
+
paths: {
|
|
63
|
+
"@js-temporal/polyfill": ["./src/types/js-temporal-polyfill.d.ts"]
|
|
64
|
+
},
|
|
61
65
|
sourceMap: true,
|
|
62
66
|
inlineSources: true,
|
|
63
67
|
declaration: true,
|
|
@@ -169,7 +173,8 @@ async function compile_default({
|
|
|
169
173
|
const compilerOptions = typescript.parseJsonConfigFileContent(
|
|
170
174
|
tsconfig_default,
|
|
171
175
|
typescript.sys,
|
|
172
|
-
|
|
176
|
+
// @checkdigit/typescript-config package root:
|
|
177
|
+
path.dirname(path.dirname(fileURLToPath(import.meta.url)))
|
|
173
178
|
).options;
|
|
174
179
|
const program = typescript.createProgram(productionSourceFiles, {
|
|
175
180
|
...compilerOptions,
|
|
@@ -222,6 +227,8 @@ async function compile_default({
|
|
|
222
227
|
platform: "node",
|
|
223
228
|
format: "esm",
|
|
224
229
|
treeShaking: true,
|
|
230
|
+
tsconfigRaw: {},
|
|
231
|
+
// we don't need esbuild dealing with typing issues
|
|
225
232
|
write: false,
|
|
226
233
|
metafile: outFile2 !== void 0,
|
|
227
234
|
sourcesContent: false,
|
package/dist-mjs/compile.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { strict as assert } from "node:assert";
|
|
3
3
|
import { promises as fs } from "node:fs";
|
|
4
4
|
import path from "node:path";
|
|
5
|
+
import { fileURLToPath } from "node:url";
|
|
5
6
|
import typescript from "typescript";
|
|
6
7
|
import { build } from "esbuild";
|
|
7
8
|
import tsConfigJson from "../tsconfig.json" with { type: "json" };
|
|
@@ -82,7 +83,8 @@ async function compile_default({
|
|
|
82
83
|
const compilerOptions = typescript.parseJsonConfigFileContent(
|
|
83
84
|
tsConfigJson,
|
|
84
85
|
typescript.sys,
|
|
85
|
-
|
|
86
|
+
// @checkdigit/typescript-config package root:
|
|
87
|
+
path.dirname(path.dirname(fileURLToPath(import.meta.url)))
|
|
86
88
|
).options;
|
|
87
89
|
const program = typescript.createProgram(productionSourceFiles, {
|
|
88
90
|
...compilerOptions,
|
|
@@ -135,6 +137,8 @@ async function compile_default({
|
|
|
135
137
|
platform: "node",
|
|
136
138
|
format: "esm",
|
|
137
139
|
treeShaking: true,
|
|
140
|
+
tsconfigRaw: {},
|
|
141
|
+
// we don't need esbuild dealing with typing issues
|
|
138
142
|
write: false,
|
|
139
143
|
metafile: outFile !== void 0,
|
|
140
144
|
sourcesContent: false,
|
|
@@ -179,4 +183,4 @@ async function compile_default({
|
|
|
179
183
|
export {
|
|
180
184
|
compile_default as default
|
|
181
185
|
};
|
|
182
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
186
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbXBpbGUudHMiXSwKICAibWFwcGluZ3MiOiAiO0FBRUEsU0FBUyxVQUFVLGNBQWM7QUFDakMsU0FBUyxZQUFZLFVBQVU7QUFDL0IsT0FBTyxVQUFVO0FBQ2pCLFNBQVMscUJBQXFCO0FBRTlCLE9BQU8sZ0JBQWdCO0FBQ3ZCLFNBQVMsYUFBK0I7QUFFeEMsT0FBTyxrQkFBa0IsbUJBQW1CLEtBQUssRUFBRSxNQUFNL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O0FBQUEsUUFDaEM7QUFBQSxNQUNGO0FBQUEsSUFDRixJQUNBO0FBQUE7QUFBQSxNQUVFLFNBQVMsS0FBSyxLQUFLLFFBQVEsT0FBTztBQUFBLE1BQ2xDLGVBQWU7QUFBQSxNQUNmO0FBQUEsTUFDQSxTQUFTO0FBQUEsUUFDUDtBQUFBLFVBQ0UsTUFBTTtBQUFBO0FBQUE7QUFBQSxVQUdOLE9BQU8sa0JBQWtCLGNBQWM7QUFBQSxRQUN6QztBQUFBLE1BQ0Y7QUFBQSxJQUNGO0FBQUEsRUFDTixDQUFDO0FBRUQsV0FBUztBQUFBLElBQ1AsR0FBRyxZQUFZLE9BQU8sSUFBSSxDQUFDLFVBQVUsa0JBQWtCLE1BQU0sSUFBSSxFQUFFO0FBQUEsRUFDckU7QUFDQSxNQUFJLFNBQVMsU0FBUyxHQUFHO0FBQ3ZCLFVBQU0sSUFBSSxNQUFNLGtCQUFrQixLQUFLLFVBQVUsUUFBUSxDQUFDLEVBQUU7QUFBQSxFQUM5RDtBQUVBLFNBQU87QUFDVDsiLAogICJuYW1lcyI6IFtdCn0K
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFtdLAogICJtYXBwaW5ncyI6ICIiLAogICJuYW1lcyI6IFtdCn0K
|
package/package.json
CHANGED
|
@@ -1,93 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@checkdigit/typescript-config",
|
|
3
|
-
"version": "10.1.0",
|
|
4
|
-
"description": "Check Digit standard Typescript configuration",
|
|
5
|
-
"homepage": "https://github.com/checkdigit/typescript-config#readme",
|
|
6
|
-
"bugs": {
|
|
7
|
-
"url": "https://github.com/checkdigit/typescript-config/issues"
|
|
8
|
-
},
|
|
9
|
-
"repository": {
|
|
10
|
-
"type": "git",
|
|
11
|
-
"url": "git+https://github.com/checkdigit/typescript-config.git"
|
|
12
|
-
},
|
|
13
|
-
"license": "MIT",
|
|
14
|
-
"author": "Check Digit, LLC",
|
|
15
|
-
"type": "module",
|
|
16
|
-
"exports": {
|
|
17
|
-
".": {
|
|
18
|
-
"types": "./dist-types/index.d.ts",
|
|
19
|
-
"import": "./dist-mjs/index.mjs",
|
|
20
|
-
"default": "./tsconfig.json"
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
|
-
"bin": {
|
|
24
|
-
"builder": "./bin/builder.mjs"
|
|
25
|
-
},
|
|
26
|
-
"files": [
|
|
27
|
-
"bin",
|
|
28
|
-
"tsconfig.json",
|
|
29
|
-
"src",
|
|
30
|
-
"dist-types",
|
|
31
|
-
"dist-mjs",
|
|
32
|
-
"!src/**/test/**",
|
|
33
|
-
"!src/**/*.test.ts",
|
|
34
|
-
"!src/**/*.spec.ts",
|
|
35
|
-
"!dist-types/**/test/**",
|
|
36
|
-
"!dist-types/**/*.test.d.ts",
|
|
37
|
-
"!dist-types/**/*.spec.d.ts",
|
|
38
|
-
"!dist-mjs/**/test/**",
|
|
39
|
-
"!dist-mjs/**/*.test.mjs",
|
|
40
|
-
"!dist-mjs/**/*.spec.mjs",
|
|
41
|
-
"SECURITY.md"
|
|
42
|
-
],
|
|
43
|
-
"scripts": {
|
|
44
|
-
"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",
|
|
45
|
-
"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",
|
|
46
|
-
"build:dist-mjs": "rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs",
|
|
47
|
-
"build:dist-types": "rimraf dist-types && npx builder --type=types --outDir=dist-types",
|
|
48
|
-
"build:mjs": "rimraf build-mjs && bin/builder.mjs --type=module --outDir=build-mjs",
|
|
49
|
-
"build:mjs-bundle": "rimraf build-mjs-bundle && bin/builder.mjs --type=module --outDir=build-mjs-bundle --entryPoint=index.test.ts --outFile=index.test.mjs",
|
|
50
|
-
"build:mjs-bundle-minify": "rimraf build-mjs-bundle-minify && bin/builder.mjs --type=module --minify --outDir=build-mjs-bundle-minify --entryPoint=index.test.ts --outFile=index.test.mjs",
|
|
51
|
-
"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=index.test.ts --outFile=index.test.mjs --minify",
|
|
52
|
-
"build:types": "rimraf build-types && bin/builder.mjs --type=types --outDir=build-types",
|
|
53
|
-
"ci:compile": "tsc --noEmit --rootDir src",
|
|
54
|
-
"ci:lint": "npm run lint",
|
|
55
|
-
"ci:style": "npm run prettier",
|
|
56
|
-
"ci:test": "npm run build && npm run test:node && npm run test:mjs && npm run test:mjs-bundle && npm run test:mjs-bundle-no-external",
|
|
57
|
-
"lint": "eslint . --max-warnings=0 --concurrency=auto",
|
|
58
|
-
"lint:fix": "eslint . --fix --concurrency=auto",
|
|
59
|
-
"prepare": "",
|
|
60
|
-
"prepublishOnly": "npm run build:builder && npm run build:dist-types && npm run build:dist-mjs",
|
|
61
|
-
"prettier": "prettier --ignore-path .gitignore --list-different .",
|
|
62
|
-
"prettier:fix": "prettier --ignore-path .gitignore --write .",
|
|
63
|
-
"test": "npm run ci:compile && npm run ci:test && npm run ci:lint && npm run ci:style",
|
|
64
|
-
"test:mjs": "node --test build-mjs/test/index.mjs",
|
|
65
|
-
"test:mjs-bundle": "node --test build-mjs-bundle/index.test.mjs",
|
|
66
|
-
"test:mjs-bundle-minify": "node --test build-mjs-bundle-minify/index.test.mjs",
|
|
67
|
-
"test:mjs-bundle-no-external": "node --test build-mjs-bundle-no-external/index.test.mjs",
|
|
68
|
-
"test:node": "node --disable-warning ExperimentalWarning --experimental-strip-types --test-timeout 600000 --test \"src/**/*.spec.ts\""
|
|
69
|
-
},
|
|
70
|
-
"prettier": "@checkdigit/prettier-config",
|
|
71
|
-
"devDependencies": {
|
|
72
|
-
"@checkdigit/prettier-config": "^8.0.0",
|
|
73
|
-
"@eslint/js": "^9.39.4",
|
|
74
|
-
"@eslint/json": "^1.2.0",
|
|
75
|
-
"@eslint/markdown": "^8.0.1",
|
|
76
|
-
"eslint": "^9.39.4",
|
|
77
|
-
"eslint-config-prettier": "^10.1.8",
|
|
78
|
-
"eslint-plugin-import": "^2.32.0",
|
|
79
|
-
"eslint-plugin-yml": "^3.3.2",
|
|
80
|
-
"rimraf": "^6.1.3",
|
|
81
|
-
"typescript-eslint": "^8.59.2"
|
|
82
|
-
},
|
|
83
|
-
"peerDependencies": {
|
|
84
|
-
"@swc-node/register": "1.11.1",
|
|
85
|
-
"@types/node": ">=24",
|
|
86
|
-
"esbuild": "0.28.0",
|
|
87
|
-
"oxc-resolver": "11.13.2",
|
|
88
|
-
"typescript": ">=6.0.3 <7"
|
|
89
|
-
},
|
|
90
|
-
"engines": {
|
|
91
|
-
"node": ">=24.14.1 <25 || >=26"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
1
|
+
{"name":"@checkdigit/typescript-config","version":"10.1.1-PR.92-7c0e","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=index.test.ts --outFile=index.test.mjs","build:mjs-bundle-minify":"rimraf build-mjs-bundle-minify && bin/builder.mjs --type=module --minify --outDir=build-mjs-bundle-minify --entryPoint=index.test.ts --outFile=index.test.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=index.test.ts --outFile=index.test.mjs --minify","build:types":"rimraf build-types && bin/builder.mjs --type=types --outDir=build-types","ci:compile":"tsc --noEmit --rootDir src","ci:lint":"npm run lint","ci:style":"npm run prettier","ci:test":"npm run build && npm run test:node && npm run test:mjs && npm run test:mjs-bundle && npm run test:mjs-bundle-no-external","lint":"eslint . --max-warnings=0 --concurrency=auto","lint:fix":"eslint . --fix --concurrency=auto","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:mjs":"node --test build-mjs/test/index.mjs","test:mjs-bundle":"node --test build-mjs-bundle/index.test.mjs","test:mjs-bundle-minify":"node --test build-mjs-bundle-minify/index.test.mjs","test:mjs-bundle-no-external":"node --test build-mjs-bundle-no-external/index.test.mjs","test:node":"node --disable-warning ExperimentalWarning --experimental-strip-types --test-timeout 600000 --test \"src/**/*.spec.ts\""},"prettier":"@checkdigit/prettier-config","devDependencies":{"@checkdigit/prettier-config":"^8.0.0","@eslint/js":"^9.39.4","@eslint/json":"^2.0.0","@eslint/markdown":"^8.0.2","@js-temporal/polyfill":"^0.5.1","eslint":"^9.39.4","eslint-config-prettier":"^10.1.8","eslint-plugin-import":"^2.32.0","eslint-plugin-yml":"^3.5.0","rimraf":"^6.1.3","typescript-eslint":"^8.62.0"},"peerDependencies":{"@swc-node/register":"1.11.1","@types/node":">=24","esbuild":"0.28.1","oxc-resolver":"11.13.2","typescript":">=6.0.3 <7"},"engines":{"node":">=24.14.1 <25 || >=26"}}
|
package/src/compile.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { strict as assert } from 'node:assert';
|
|
4
4
|
import { promises as fs } from 'node:fs';
|
|
5
5
|
import path from 'node:path';
|
|
6
|
+
import { fileURLToPath } from 'node:url';
|
|
6
7
|
|
|
7
8
|
import typescript from 'typescript';
|
|
8
9
|
import { build, type PluginBuild } from 'esbuild';
|
|
@@ -220,7 +221,8 @@ export default async function ({
|
|
|
220
221
|
const compilerOptions = typescript.parseJsonConfigFileContent(
|
|
221
222
|
tsConfigJson,
|
|
222
223
|
typescript.sys,
|
|
223
|
-
|
|
224
|
+
// @checkdigit/typescript-config package root:
|
|
225
|
+
path.dirname(path.dirname(fileURLToPath(import.meta.url))),
|
|
224
226
|
).options;
|
|
225
227
|
const program = typescript.createProgram(productionSourceFiles, {
|
|
226
228
|
...compilerOptions,
|
|
@@ -279,6 +281,7 @@ export default async function ({
|
|
|
279
281
|
platform: 'node',
|
|
280
282
|
format: 'esm',
|
|
281
283
|
treeShaking: true,
|
|
284
|
+
tsconfigRaw: {}, // we don't need esbuild dealing with typing issues
|
|
282
285
|
write: false,
|
|
283
286
|
metafile: outFile !== undefined,
|
|
284
287
|
sourcesContent: false,
|