@checkdigit/typescript-config 7.1.0-PR.58-be3b → 7.1.0-PR.58-27dc
Sign up to get free protection for your applications and to get access to all the features.
- package/dist-mjs/compile.mjs +1 -1
- package/dist-types/compile.d.ts +24 -30
- package/package.json +1 -1
- package/src/compile.ts +16 -14
package/dist-mjs/compile.mjs
CHANGED
@@ -190,4 +190,4 @@ async function compile_default({
|
|
190
190
|
export {
|
191
191
|
compile_default as default
|
192
192
|
};
|
193
|
-
//# sourceMappingURL=data:application/json;base64,
|
193
|
+
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vc3JjL2NvbXBpbGUudHMiXSwKICAibWFwcGluZ3MiOiAiO0FBRUEsU0FBUyxVQUFVLGNBQWM7QUFDakMsU0FBUyxZQUFZLFVBQVU7QUFDL0IsT0FBTyxVQUFVO0FBRWpCLE9BQU8sZ0JBQWdCO0FBQ3ZCLFNBQTJCLGFBQWE7QUFFeEMsSUFBTSw4QkFBOEI7QUFBQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBb0hwQyxlQUFlLFNBQVMsV0FBc0M7QUFDNUQsUUFBTSxVQUFVLE1BQU0sR0FBRyxRQUFRLFdBQVcsRUFBRSxlQUFlLEtBQUssQ0FBQztBQUNuRSxRQUFNLFFBQVEsTUFBTSxRQUFRO0FBQUEsSUFDMUIsUUFBUSxJQUFJLENBQUMsVUFBVTtBQUNyQixZQUFNLFNBQVMsS0FBSyxRQUFRLFdBQVcsTUFBTSxJQUFJO0FBQ2pELGFBQU8sTUFBTSxZQUFZLElBQUksU0FBUyxNQUFNLElBQUk7QUFBQSxJQUNsRCxDQUFDO0FBQUEsRUFDSDtBQUNBLFNBQU8sTUFBTSxLQUFLO0FBQ3BCO0FBRUEsU0FBUyxrQkFBa0IsUUFBZ0I7QUFDekMsU0FBTyxDQUFDLGdCQUE2QjtBQUVuQyxnQkFBWSxPQUFPLEVBQUUsT0FBTyxHQUFHLE9BQU8sU0FBUztBQUM3Qy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Q04sT0FBTyxrQkFBa0IsZUFBZTtBQUFBLFFBQzFDO0FBQUEsTUFDRjtBQUFBLElBQ0Y7QUFBQSxFQUNOLENBQUM7QUFFRCxXQUFTLEtBQUssR0FBRyxZQUFZLE9BQU8sSUFBSSxDQUFDLFVBQVUsa0JBQWtCLE1BQU0sSUFBSSxFQUFFLENBQUM7QUFDbEYsV0FBUyxLQUFLLEdBQUcsWUFBWSxTQUFTLElBQUksQ0FBQyxZQUFZLG9CQUFvQixRQUFRLElBQUksRUFBRSxDQUFDO0FBQzFGLE1BQUksU0FBUyxTQUFTLEdBQUc7QUFDdkIsVUFBTSxJQUFJLE1BQU0sa0JBQWtCLEtBQUssVUFBVSxRQUFRLENBQUMsRUFBRTtBQUFBLEVBQzlEO0FBRUEsU0FBTztBQUNUOyIsCiAgIm5hbWVzIjogW10KfQo=
|
package/dist-types/compile.d.ts
CHANGED
@@ -1,35 +1,29 @@
|
|
1
1
|
export type ImportKind = 'entry-point' | 'import-statement' | 'require-call' | 'dynamic-import' | 'require-resolve' | 'import-rule' | 'composes-from' | 'url-token';
|
2
2
|
export interface Metafile {
|
3
|
-
inputs: {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
}[];
|
28
|
-
exports: string[];
|
29
|
-
entryPoint?: string;
|
30
|
-
cssBundle?: string;
|
31
|
-
};
|
32
|
-
};
|
3
|
+
inputs: Record<string, {
|
4
|
+
bytes: number;
|
5
|
+
imports: {
|
6
|
+
path: string;
|
7
|
+
kind: ImportKind;
|
8
|
+
external?: boolean;
|
9
|
+
original?: string;
|
10
|
+
}[];
|
11
|
+
format?: 'cjs' | 'esm';
|
12
|
+
}>;
|
13
|
+
outputs: Record<string, {
|
14
|
+
bytes: number;
|
15
|
+
inputs: Record<string, {
|
16
|
+
bytesInOutput: number;
|
17
|
+
}>;
|
18
|
+
imports: {
|
19
|
+
path: string;
|
20
|
+
kind: ImportKind | 'file-loader';
|
21
|
+
external?: boolean;
|
22
|
+
}[];
|
23
|
+
exports: string[];
|
24
|
+
entryPoint?: string;
|
25
|
+
cssBundle?: string;
|
26
|
+
}>;
|
33
27
|
}
|
34
28
|
export interface OutputFile {
|
35
29
|
path: string;
|
package/package.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"name":"@checkdigit/typescript-config","version":"7.1.0-PR.58-
|
1
|
+
{"name":"@checkdigit/typescript-config","version":"7.1.0-PR.58-27dc","description":"Check Digit standard Typescript configuration","prettier":"@checkdigit/prettier-config","engines":{"node":">=20.12"},"type":"module","exports":{".":{"types":"./dist-types/index.d.ts","import":"./dist-mjs/index.mjs","default":"./tsconfig.json"}},"bin":{"builder":"./bin/builder.mjs"},"peerDependencies":{"@types/node":">=20.12","esbuild":"0.21.1","typescript":"5.5.0-beta"},"repository":{"type":"git","url":"git+https://github.com/checkdigit/typescript-config.git"},"author":"Check Digit, LLC","license":"MIT","bugs":{"url":"https://github.com/checkdigit/typescript-config/issues"},"homepage":"https://github.com/checkdigit/typescript-config#readme","scripts":{"prepare":"","prepublishOnly":"npm run build:builder && npm run build:dist-types && npm run build:dist-mjs","lint:fix":"eslint . --fix","lint":"eslint --max-warnings 0 .","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","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:dist-types":"rimraf dist-types && npx builder --type=types --outDir=dist-types","build:dist-mjs":"rimraf dist-mjs && npx builder --type=module --sourceMap --outDir=dist-mjs && node dist-mjs/index.mjs","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:types":"rimraf build-types && bin/builder.mjs --type=types --outDir=build-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","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","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","ci:compile":"tsc --noEmit","ci:lint":"npm run lint","ci:style":"npm run prettier"},"devDependencies":{"@apidevtools/json-schema-ref-parser":"^11.6.1","@checkdigit/prettier-config":"^5.3.0","@eslint/js":"^9.2.0","@jest/globals":"^29.7.0","@types/uuid":"^9.0.8","@typescript-eslint/eslint-plugin":"^7.8.0","@typescript-eslint/parser":"^7.8.0","eslint":"9.2.0","eslint-config-prettier":"^9.1.0","jest":"^29.7.0","rimraf":"^5.0.5","ts-jest":"^29.1.2","typescript-eslint":"^7.8.0","uuid":"^9.0.1"},"jest":{"moduleFileExtensions":["js","mjs","cjs","ts","json","node"],"extensionsToTreatAsEsm":[".ts"],"transform":{"^.+\\.ts$":["ts-jest",{"isolatedModules":true,"diagnostics":false,"useESM":true}]},"collectCoverageFrom":["<rootDir>/src/**"],"testMatch":["<rootDir>/src/**/*.spec.ts"]},"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"],"overrides":{"typescript":"5.5.0-beta","eslint":"9.2.0"}}
|
package/src/compile.ts
CHANGED
@@ -25,8 +25,9 @@ export type ImportKind =
|
|
25
25
|
| 'url-token';
|
26
26
|
|
27
27
|
export interface Metafile {
|
28
|
-
inputs:
|
29
|
-
|
28
|
+
inputs: Record<
|
29
|
+
string,
|
30
|
+
{
|
30
31
|
bytes: number;
|
31
32
|
imports: {
|
32
33
|
path: string;
|
@@ -35,16 +36,18 @@ export interface Metafile {
|
|
35
36
|
original?: string;
|
36
37
|
}[];
|
37
38
|
format?: 'cjs' | 'esm';
|
38
|
-
}
|
39
|
-
|
40
|
-
outputs:
|
41
|
-
|
39
|
+
}
|
40
|
+
>;
|
41
|
+
outputs: Record<
|
42
|
+
string,
|
43
|
+
{
|
42
44
|
bytes: number;
|
43
|
-
inputs:
|
44
|
-
|
45
|
+
inputs: Record<
|
46
|
+
string,
|
47
|
+
{
|
45
48
|
bytesInOutput: number;
|
46
|
-
}
|
47
|
-
|
49
|
+
}
|
50
|
+
>;
|
48
51
|
imports: {
|
49
52
|
path: string;
|
50
53
|
kind: ImportKind | 'file-loader';
|
@@ -53,8 +56,8 @@ export interface Metafile {
|
|
53
56
|
exports: string[];
|
54
57
|
entryPoint?: string;
|
55
58
|
cssBundle?: string;
|
56
|
-
}
|
57
|
-
|
59
|
+
}
|
60
|
+
>;
|
58
61
|
}
|
59
62
|
|
60
63
|
export interface OutputFile {
|
@@ -175,7 +178,7 @@ function resolveTypescriptPaths() {
|
|
175
178
|
};
|
176
179
|
}
|
177
180
|
|
178
|
-
// eslint-disable-next-line
|
181
|
+
// eslint-disable-next-line max-lines-per-function,max-statements
|
179
182
|
export default async function ({
|
180
183
|
type,
|
181
184
|
entryPoint,
|
@@ -259,7 +262,6 @@ export default async function ({
|
|
259
262
|
const message = typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n');
|
260
263
|
messages.push(`tsc: ${diagnostic.file.fileName} (${line + 1},${character + 1}): ${message}`);
|
261
264
|
} else {
|
262
|
-
// eslint-disable-next-line no-console
|
263
265
|
messages.push(`tsc: ${typescript.flattenDiagnosticMessageText(diagnostic.messageText, '\n')}`);
|
264
266
|
}
|
265
267
|
}
|