@nx/js 19.5.0-beta.0 → 19.5.0-beta.1
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/migrations.json +13 -0
- package/package.json +4 -4
- package/src/executors/node/lib/kill-tree.d.ts +0 -1
- package/src/executors/node/lib/kill-tree.js +1 -2
- package/src/executors/node/node.impl.js +1 -2
- package/src/executors/release-publish/extract-npm-publish-json-data.js +1 -2
- package/src/executors/release-publish/release-publish.impl.js +1 -1
- package/src/executors/swc/swc.impl.js +1 -2
- package/src/executors/tsc/lib/batch/build-task-info-per-tsconfig-map.js +1 -2
- package/src/executors/tsc/lib/batch/normalize-tasks-options.js +1 -2
- package/src/executors/tsc/lib/batch/watch.js +2 -3
- package/src/executors/tsc/lib/get-custom-transformers-factory.js +1 -2
- package/src/executors/tsc/lib/get-task-options.js +1 -2
- package/src/executors/tsc/lib/get-tsconfig.js +1 -2
- package/src/executors/tsc/lib/normalize-options.js +1 -2
- package/src/executors/tsc/lib/typescript-compilation.js +7 -4
- package/src/executors/tsc/lib/typescript-diagnostic-reporters.js +2 -3
- package/src/executors/tsc/tsc.batch-impl.js +1 -2
- package/src/executors/tsc/tsc.impl.js +3 -4
- package/src/executors/verdaccio/verdaccio.impl.js +1 -2
- package/src/generators/convert-to-swc/convert-to-swc.js +1 -2
- package/src/generators/init/init.js +1 -2
- package/src/generators/library/library.js +3 -4
- package/src/generators/release-version/release-version.js +1 -2
- package/src/generators/release-version/test-utils/create-workspace-with-package-dependencies.js +1 -2
- package/src/generators/release-version/utils/resolve-local-package-dependencies.js +1 -2
- package/src/generators/release-version/utils/resolve-version-spec.js +1 -2
- package/src/generators/release-version/utils/sort-projects-topologically.js +1 -2
- package/src/generators/release-version/utils/update-lock-file.js +1 -2
- package/src/generators/setup-build/generator.js +1 -2
- package/src/generators/setup-verdaccio/generator.js +1 -2
- package/src/generators/sync/sync.js +1 -2
- package/src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages.js +1 -1
- package/src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps.js +1 -1
- package/src/migrations/update-16-8-2/update-swcrc.js +1 -1
- package/src/migrations/update-17-0-0/remove-deprecated-build-options.js +1 -1
- package/src/plugins/jest/start-local-registry.js +1 -2
- package/src/plugins/rollup/type-definitions.js +1 -2
- package/src/plugins/typescript/plugin.d.ts +5 -1
- package/src/plugins/typescript/plugin.js +58 -40
- package/src/utils/add-babel-inputs.js +1 -2
- package/src/utils/add-local-registry-scripts.js +1 -2
- package/src/utils/assets/assets.js +1 -2
- package/src/utils/assets/index.js +1 -2
- package/src/utils/buildable-libs-utils.js +9 -10
- package/src/utils/check-dependencies.js +1 -2
- package/src/utils/code-frames/highlight.js +1 -2
- package/src/utils/code-frames/identifiers.js +2 -3
- package/src/utils/compiler-helper-dependency.js +3 -3
- package/src/utils/find-npm-dependencies.js +1 -2
- package/src/utils/generate-globs.js +1 -2
- package/src/utils/get-import-path.js +1 -2
- package/src/utils/get-main-file-dir.js +1 -2
- package/src/utils/inline.js +4 -5
- package/src/utils/is-valid-variable.js +1 -2
- package/src/utils/npm-config.js +3 -4
- package/src/utils/package-json/create-entry-points.js +1 -2
- package/src/utils/package-json/get-npm-scope.js +1 -2
- package/src/utils/package-json/index.js +1 -2
- package/src/utils/package-json/update-package-json.js +3 -4
- package/src/utils/prettier.js +1 -2
- package/src/utils/swc/add-swc-config.js +2 -2
- package/src/utils/swc/add-swc-dependencies.js +2 -3
- package/src/utils/swc/compile-swc.js +2 -3
- package/src/utils/swc/get-swcrc-path.js +1 -2
- package/src/utils/swc/inline.js +1 -2
- package/src/utils/typescript/add-tslib-dependencies.js +1 -2
- package/src/utils/typescript/ast-utils.js +12 -13
- package/src/utils/typescript/compile-typescript-files.js +1 -2
- package/src/utils/typescript/create-ts-config.js +2 -2
- package/src/utils/typescript/ensure-typescript.js +1 -2
- package/src/utils/typescript/get-source-nodes.js +1 -2
- package/src/utils/typescript/load-ts-transformers.js +1 -2
- package/src/utils/typescript/print-diagnostics.js +1 -2
- package/src/utils/typescript/run-type-check.js +3 -4
- package/src/utils/typescript/ts-config.js +7 -8
- package/src/utils/typescript/tsnode-register.js +1 -2
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +2 -2
- package/src/utils/watch-for-single-file-changes.js +1 -2
- package/typescript.d.ts +1 -1
- package/typescript.js +2 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.compileSwc = compileSwc;
|
|
4
|
+
exports.compileSwcWatch = compileSwcWatch;
|
|
4
5
|
const devkit_1 = require("@nx/devkit");
|
|
5
6
|
const node_child_process_1 = require("node:child_process");
|
|
6
7
|
const node_path_1 = require("node:path");
|
|
@@ -80,7 +81,6 @@ async function compileSwc(context, normalizedOptions, postCompilationCallback) {
|
|
|
80
81
|
outfile: normalizedOptions.mainOutputPath,
|
|
81
82
|
};
|
|
82
83
|
}
|
|
83
|
-
exports.compileSwc = compileSwc;
|
|
84
84
|
async function* compileSwcWatch(context, normalizedOptions, postCompilationCallback) {
|
|
85
85
|
const getResult = (success) => ({
|
|
86
86
|
success,
|
|
@@ -164,7 +164,6 @@ async function* compileSwcWatch(context, normalizedOptions, postCompilationCallb
|
|
|
164
164
|
swcWatcher.on('exit', watcherOnExit);
|
|
165
165
|
});
|
|
166
166
|
}
|
|
167
|
-
exports.compileSwcWatch = compileSwcWatch;
|
|
168
167
|
function delay(ms) {
|
|
169
168
|
let timerId = undefined;
|
|
170
169
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSwcrcPath =
|
|
3
|
+
exports.getSwcrcPath = getSwcrcPath;
|
|
4
4
|
const path_1 = require("path");
|
|
5
5
|
function getSwcrcPath(options, contextRoot, projectRoot) {
|
|
6
6
|
const swcrcPath = options.swcrc
|
|
@@ -12,4 +12,3 @@ function getSwcrcPath(options, contextRoot, projectRoot) {
|
|
|
12
12
|
tmpSwcrcPath,
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
exports.getSwcrcPath = getSwcrcPath;
|
package/src/utils/swc/inline.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateTmpSwcrc =
|
|
3
|
+
exports.generateTmpSwcrc = generateTmpSwcrc;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
function generateTmpSwcrc(inlineProjectGraph, swcrcPath, tmpSwcrcPath) {
|
|
6
6
|
const swcrc = (0, devkit_1.readJsonFile)(swcrcPath);
|
|
@@ -12,4 +12,3 @@ function generateTmpSwcrc(inlineProjectGraph, swcrcPath, tmpSwcrcPath) {
|
|
|
12
12
|
(0, devkit_1.writeJsonFile)(tmpSwcrcPath, swcrc);
|
|
13
13
|
return tmpSwcrcPath;
|
|
14
14
|
}
|
|
15
|
-
exports.generateTmpSwcrc = generateTmpSwcrc;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addTsLibDependencies =
|
|
3
|
+
exports.addTsLibDependencies = addTsLibDependencies;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../versions");
|
|
6
6
|
function addTsLibDependencies(tree) {
|
|
@@ -8,4 +8,3 @@ function addTsLibDependencies(tree) {
|
|
|
8
8
|
tslib: versions_1.tsLibVersion,
|
|
9
9
|
}, {});
|
|
10
10
|
}
|
|
11
|
-
exports.addTsLibDependencies = addTsLibDependencies;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.resolveModuleByImport = resolveModuleByImport;
|
|
4
|
+
exports.insertChange = insertChange;
|
|
5
|
+
exports.replaceChange = replaceChange;
|
|
6
|
+
exports.removeChange = removeChange;
|
|
7
|
+
exports.insertImport = insertImport;
|
|
8
|
+
exports.addGlobal = addGlobal;
|
|
9
|
+
exports.getImport = getImport;
|
|
10
|
+
exports.replaceNodeValue = replaceNodeValue;
|
|
11
|
+
exports.addParameterToConstructor = addParameterToConstructor;
|
|
12
|
+
exports.addMethod = addMethod;
|
|
13
|
+
exports.findClass = findClass;
|
|
14
|
+
exports.findNodes = findNodes;
|
|
4
15
|
const ensure_typescript_1 = require("./ensure-typescript");
|
|
5
16
|
const devkit_1 = require("@nx/devkit");
|
|
6
17
|
const path_1 = require("path");
|
|
@@ -26,7 +37,6 @@ function resolveModuleByImport(importExpr, filePath, tsConfigPath) {
|
|
|
26
37
|
return resolvedModule.resolvedFileName.replace(`${normalizedAppRoot}/`, '');
|
|
27
38
|
}
|
|
28
39
|
}
|
|
29
|
-
exports.resolveModuleByImport = resolveModuleByImport;
|
|
30
40
|
function getCompilerHost(tsConfigPath) {
|
|
31
41
|
const options = readTsConfigOptions(tsConfigPath);
|
|
32
42
|
const host = tsModule.createCompilerHost(options, true);
|
|
@@ -66,7 +76,6 @@ function insertChange(host, sourceFile, filePath, insertPosition, contentToInser
|
|
|
66
76
|
host.write(filePath, `${prefix}${contentToInsert}${suffix}`);
|
|
67
77
|
return updateTsSourceFile(host, sourceFile, filePath);
|
|
68
78
|
}
|
|
69
|
-
exports.insertChange = insertChange;
|
|
70
79
|
function replaceChange(host, sourceFile, filePath, insertPosition, contentToInsert, oldContent) {
|
|
71
80
|
const content = host.read(filePath, 'utf-8');
|
|
72
81
|
const prefix = content.substring(0, insertPosition);
|
|
@@ -78,7 +87,6 @@ function replaceChange(host, sourceFile, filePath, insertPosition, contentToInse
|
|
|
78
87
|
host.write(filePath, `${prefix}${contentToInsert}${suffix}`);
|
|
79
88
|
return updateTsSourceFile(host, sourceFile, filePath);
|
|
80
89
|
}
|
|
81
|
-
exports.replaceChange = replaceChange;
|
|
82
90
|
function removeChange(host, sourceFile, filePath, removePosition, contentToRemove) {
|
|
83
91
|
const content = host.read(filePath).toString();
|
|
84
92
|
const prefix = content.substring(0, removePosition);
|
|
@@ -86,7 +94,6 @@ function removeChange(host, sourceFile, filePath, removePosition, contentToRemov
|
|
|
86
94
|
host.write(filePath, `${prefix}${suffix}`);
|
|
87
95
|
return updateTsSourceFile(host, sourceFile, filePath);
|
|
88
96
|
}
|
|
89
|
-
exports.removeChange = removeChange;
|
|
90
97
|
function insertImport(host, source, fileToEdit, symbolName, fileName, isDefault = false) {
|
|
91
98
|
if (!tsModule) {
|
|
92
99
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
@@ -140,7 +147,6 @@ function insertImport(host, source, fileToEdit, symbolName, fileName, isDefault
|
|
|
140
147
|
` from '${fileName}'${insertAtBeginning ? ';\n' : ''}`;
|
|
141
148
|
return insertAfterLastOccurrence(host, source, allImports, toInsert, fileToEdit, fallbackPos, tsModule.SyntaxKind.StringLiteral);
|
|
142
149
|
}
|
|
143
|
-
exports.insertImport = insertImport;
|
|
144
150
|
function insertAfterLastOccurrence(host, sourceFile, nodes, toInsert, pathToFile, fallbackPos, syntaxKind) {
|
|
145
151
|
// sort() has a side effect, so make a copy so that we won't overwrite the parent's object.
|
|
146
152
|
let lastItem = [...nodes].sort(nodesByPosition).pop();
|
|
@@ -169,7 +175,6 @@ function addGlobal(host, source, modulePath, statement) {
|
|
|
169
175
|
return insertChange(host, source, modulePath, 0, `${statement}\n`);
|
|
170
176
|
}
|
|
171
177
|
}
|
|
172
|
-
exports.addGlobal = addGlobal;
|
|
173
178
|
function getImport(source, predicate) {
|
|
174
179
|
if (!tsModule) {
|
|
175
180
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
@@ -189,11 +194,9 @@ function getImport(source, predicate) {
|
|
|
189
194
|
return { moduleSpec, bindings };
|
|
190
195
|
});
|
|
191
196
|
}
|
|
192
|
-
exports.getImport = getImport;
|
|
193
197
|
function replaceNodeValue(host, sourceFile, modulePath, node, content) {
|
|
194
198
|
return replaceChange(host, sourceFile, modulePath, node.getStart(node.getSourceFile()), content, node.getText());
|
|
195
199
|
}
|
|
196
|
-
exports.replaceNodeValue = replaceNodeValue;
|
|
197
200
|
function addParameterToConstructor(tree, source, modulePath, opts) {
|
|
198
201
|
if (!tsModule) {
|
|
199
202
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
@@ -208,7 +211,6 @@ function addParameterToConstructor(tree, source, modulePath, opts) {
|
|
|
208
211
|
methodHeader: `constructor(${opts.param})`,
|
|
209
212
|
});
|
|
210
213
|
}
|
|
211
|
-
exports.addParameterToConstructor = addParameterToConstructor;
|
|
212
214
|
function addMethod(tree, source, modulePath, opts) {
|
|
213
215
|
const clazz = findClass(source, opts.className);
|
|
214
216
|
const body = opts.body
|
|
@@ -222,7 +224,6 @@ ${opts.methodHeader} {}
|
|
|
222
224
|
`;
|
|
223
225
|
return insertChange(tree, source, modulePath, clazz.end - 1, body);
|
|
224
226
|
}
|
|
225
|
-
exports.addMethod = addMethod;
|
|
226
227
|
function findClass(source, className, silent = false) {
|
|
227
228
|
if (!tsModule) {
|
|
228
229
|
tsModule = (0, ensure_typescript_1.ensureTypescript)();
|
|
@@ -235,7 +236,6 @@ function findClass(source, className, silent = false) {
|
|
|
235
236
|
}
|
|
236
237
|
return clazz;
|
|
237
238
|
}
|
|
238
|
-
exports.findClass = findClass;
|
|
239
239
|
function findNodes(node, kind, max = Infinity) {
|
|
240
240
|
if (!node || max == 0) {
|
|
241
241
|
return [];
|
|
@@ -263,4 +263,3 @@ function findNodes(node, kind, max = Infinity) {
|
|
|
263
263
|
}
|
|
264
264
|
return arr;
|
|
265
265
|
}
|
|
266
|
-
exports.findNodes = findNodes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.compileTypeScriptFiles =
|
|
3
|
+
exports.compileTypeScriptFiles = compileTypeScriptFiles;
|
|
4
4
|
const compilation_1 = require("@nx/workspace/src/utilities/typescript/compilation");
|
|
5
5
|
const async_iterable_1 = require("@nx/devkit/src/utils/async-iterable");
|
|
6
6
|
const TYPESCRIPT_FOUND_N_ERRORS_WATCHING_FOR_FILE_CHANGES = 6194;
|
|
@@ -40,4 +40,3 @@ function compileTypeScriptFiles(normalizedOptions, tscOptions, postCompilationCa
|
|
|
40
40
|
close: () => tearDown?.(),
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
|
-
exports.compileTypeScriptFiles = compileTypeScriptFiles;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.tsConfigBaseOptions = void 0;
|
|
4
|
+
exports.extractTsConfigBase = extractTsConfigBase;
|
|
4
5
|
const json_1 = require("nx/src/generators/utils/json");
|
|
5
6
|
exports.tsConfigBaseOptions = {
|
|
6
7
|
rootDir: '.',
|
|
@@ -51,4 +52,3 @@ function extractTsConfigBase(host) {
|
|
|
51
52
|
});
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
|
-
exports.extractTsConfigBase = extractTsConfigBase;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ensureTypescript =
|
|
3
|
+
exports.ensureTypescript = ensureTypescript;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const versions_1 = require("../versions");
|
|
6
6
|
function ensureTypescript() {
|
|
7
7
|
return (0, devkit_1.ensurePackage)('typescript', versions_1.typescriptVersion);
|
|
8
8
|
}
|
|
9
|
-
exports.ensureTypescript = ensureTypescript;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSourceNodes =
|
|
3
|
+
exports.getSourceNodes = getSourceNodes;
|
|
4
4
|
function getSourceNodes(sourceFile) {
|
|
5
5
|
const nodes = [sourceFile];
|
|
6
6
|
const result = [];
|
|
@@ -15,4 +15,3 @@ function getSourceNodes(sourceFile) {
|
|
|
15
15
|
}
|
|
16
16
|
return result;
|
|
17
17
|
}
|
|
18
|
-
exports.getSourceNodes = getSourceNodes;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.loadTsTransformers =
|
|
3
|
+
exports.loadTsTransformers = loadTsTransformers;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const path_1 = require("path");
|
|
6
6
|
function loadTsTransformers(plugins, moduleResolver = require.resolve) {
|
|
@@ -59,4 +59,3 @@ function loadTsTransformers(plugins, moduleResolver = require.resolve) {
|
|
|
59
59
|
hasPlugin: true,
|
|
60
60
|
};
|
|
61
61
|
}
|
|
62
|
-
exports.loadTsTransformers = loadTsTransformers;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.printDiagnostics =
|
|
3
|
+
exports.printDiagnostics = printDiagnostics;
|
|
4
4
|
async function printDiagnostics(errors = [], warnings = []) {
|
|
5
5
|
if (errors.length > 0) {
|
|
6
6
|
errors.forEach((err) => {
|
|
@@ -15,4 +15,3 @@ async function printDiagnostics(errors = [], warnings = []) {
|
|
|
15
15
|
console.log(`Found ${warnings.length} warnings.`);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
exports.printDiagnostics = printDiagnostics;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.runTypeCheckWatch = runTypeCheckWatch;
|
|
4
|
+
exports.runTypeCheck = runTypeCheck;
|
|
5
|
+
exports.getFormattedDiagnostic = getFormattedDiagnostic;
|
|
4
6
|
const chalk = require("chalk");
|
|
5
7
|
const path = require("path");
|
|
6
8
|
const code_frames_1 = require("nx/src/utils/code-frames");
|
|
@@ -27,7 +29,6 @@ async function runTypeCheckWatch(options, callback) {
|
|
|
27
29
|
.map((d) => getFormattedDiagnostic(ts, workspaceRoot, d)),
|
|
28
30
|
};
|
|
29
31
|
}
|
|
30
|
-
exports.runTypeCheckWatch = runTypeCheckWatch;
|
|
31
32
|
async function runTypeCheck(options) {
|
|
32
33
|
const { ts, workspaceRoot, cacheDir, config, compilerOptions } = await setupTypeScript(options);
|
|
33
34
|
let program;
|
|
@@ -52,7 +53,6 @@ async function runTypeCheck(options) {
|
|
|
52
53
|
.concat(result.diagnostics);
|
|
53
54
|
return getTypeCheckResult(ts, allDiagnostics, workspaceRoot, config.fileNames.length, program.getSourceFiles().length, incremental);
|
|
54
55
|
}
|
|
55
|
-
exports.runTypeCheck = runTypeCheck;
|
|
56
56
|
async function setupTypeScript(options) {
|
|
57
57
|
const ts = await Promise.resolve().then(() => require('typescript'));
|
|
58
58
|
const { workspaceRoot, tsConfigPath, cacheDir, incremental, rootDir } = options;
|
|
@@ -125,4 +125,3 @@ function getFormattedDiagnostic(ts, workspaceRoot, diagnostic) {
|
|
|
125
125
|
}
|
|
126
126
|
return message;
|
|
127
127
|
}
|
|
128
|
-
exports.getFormattedDiagnostic = getFormattedDiagnostic;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.readTsConfig = readTsConfig;
|
|
4
|
+
exports.getRootTsConfigPathInTree = getRootTsConfigPathInTree;
|
|
5
|
+
exports.getRelativePathToRootTsConfig = getRelativePathToRootTsConfig;
|
|
6
|
+
exports.getRootTsConfigPath = getRootTsConfigPath;
|
|
7
|
+
exports.getRootTsConfigFileName = getRootTsConfigFileName;
|
|
8
|
+
exports.addTsConfigPath = addTsConfigPath;
|
|
9
|
+
exports.readTsConfigPaths = readTsConfigPaths;
|
|
4
10
|
const devkit_1 = require("@nx/devkit");
|
|
5
11
|
const fs_1 = require("fs");
|
|
6
12
|
const path_1 = require("path");
|
|
@@ -13,7 +19,6 @@ function readTsConfig(tsConfigPath) {
|
|
|
13
19
|
const readResult = tsModule.readConfigFile(tsConfigPath, tsModule.sys.readFile);
|
|
14
20
|
return tsModule.parseJsonConfigFileContent(readResult.config, tsModule.sys, (0, path_1.dirname)(tsConfigPath));
|
|
15
21
|
}
|
|
16
|
-
exports.readTsConfig = readTsConfig;
|
|
17
22
|
function getRootTsConfigPathInTree(tree) {
|
|
18
23
|
for (const path of ['tsconfig.base.json', 'tsconfig.json']) {
|
|
19
24
|
if (tree.exists(path)) {
|
|
@@ -22,16 +27,13 @@ function getRootTsConfigPathInTree(tree) {
|
|
|
22
27
|
}
|
|
23
28
|
return 'tsconfig.base.json';
|
|
24
29
|
}
|
|
25
|
-
exports.getRootTsConfigPathInTree = getRootTsConfigPathInTree;
|
|
26
30
|
function getRelativePathToRootTsConfig(tree, targetPath) {
|
|
27
31
|
return (0, devkit_1.offsetFromRoot)(targetPath) + getRootTsConfigPathInTree(tree);
|
|
28
32
|
}
|
|
29
|
-
exports.getRelativePathToRootTsConfig = getRelativePathToRootTsConfig;
|
|
30
33
|
function getRootTsConfigPath() {
|
|
31
34
|
const tsConfigFileName = getRootTsConfigFileName();
|
|
32
35
|
return tsConfigFileName ? (0, path_1.join)(devkit_1.workspaceRoot, tsConfigFileName) : null;
|
|
33
36
|
}
|
|
34
|
-
exports.getRootTsConfigPath = getRootTsConfigPath;
|
|
35
37
|
function getRootTsConfigFileName(tree) {
|
|
36
38
|
for (const tsConfigName of ['tsconfig.base.json', 'tsconfig.json']) {
|
|
37
39
|
const pathExists = tree
|
|
@@ -43,7 +45,6 @@ function getRootTsConfigFileName(tree) {
|
|
|
43
45
|
}
|
|
44
46
|
return null;
|
|
45
47
|
}
|
|
46
|
-
exports.getRootTsConfigFileName = getRootTsConfigFileName;
|
|
47
48
|
function addTsConfigPath(tree, importPath, lookupPaths) {
|
|
48
49
|
(0, devkit_1.updateJson)(tree, getRootTsConfigPathInTree(tree), (json) => {
|
|
49
50
|
json.compilerOptions ??= {};
|
|
@@ -56,7 +57,6 @@ function addTsConfigPath(tree, importPath, lookupPaths) {
|
|
|
56
57
|
return json;
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
|
-
exports.addTsConfigPath = addTsConfigPath;
|
|
60
60
|
function readTsConfigPaths(tsConfig) {
|
|
61
61
|
tsConfig ??= getRootTsConfigPath();
|
|
62
62
|
try {
|
|
@@ -82,4 +82,3 @@ function readTsConfigPaths(tsConfig) {
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
-
exports.readTsConfigPaths = readTsConfigPaths;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.tsNodeRegister =
|
|
3
|
+
exports.tsNodeRegister = tsNodeRegister;
|
|
4
4
|
function tsNodeRegister(file, tsConfig) {
|
|
5
5
|
if (!file?.endsWith('.ts'))
|
|
6
6
|
return;
|
|
@@ -21,4 +21,3 @@ function tsNodeRegister(file, tsConfig) {
|
|
|
21
21
|
tsconfigPaths.register({ baseUrl, paths });
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
exports.tsNodeRegister = tsNodeRegister;
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare const swcNodeVersion = "~1.9.1";
|
|
|
8
8
|
export declare const tsLibVersion = "^2.3.0";
|
|
9
9
|
export declare const typesNodeVersion = "18.16.9";
|
|
10
10
|
export declare const verdaccioVersion = "^5.0.4";
|
|
11
|
-
export declare const typescriptVersion = "~5.
|
|
11
|
+
export declare const typescriptVersion = "~5.5.2";
|
|
12
12
|
/**
|
|
13
13
|
* The minimum version is currently determined from the lowest version
|
|
14
14
|
* that's supported by the lowest Angular supported version, e.g.
|
|
15
15
|
* `npm view @angular/compiler-cli@14.0.0 peerDependencies.typescript`
|
|
16
16
|
*/
|
|
17
|
-
export declare const supportedTypescriptVersions = ">=4.
|
|
17
|
+
export declare const supportedTypescriptVersions = ">=4.9.3";
|
package/src/utils/versions.js
CHANGED
|
@@ -12,10 +12,10 @@ exports.tsLibVersion = '^2.3.0';
|
|
|
12
12
|
exports.typesNodeVersion = '18.16.9';
|
|
13
13
|
exports.verdaccioVersion = '^5.0.4';
|
|
14
14
|
// Typescript
|
|
15
|
-
exports.typescriptVersion = '~5.
|
|
15
|
+
exports.typescriptVersion = '~5.5.2';
|
|
16
16
|
/**
|
|
17
17
|
* The minimum version is currently determined from the lowest version
|
|
18
18
|
* that's supported by the lowest Angular supported version, e.g.
|
|
19
19
|
* `npm view @angular/compiler-cli@14.0.0 peerDependencies.typescript`
|
|
20
20
|
*/
|
|
21
|
-
exports.supportedTypescriptVersions = '>=4.
|
|
21
|
+
exports.supportedTypescriptVersions = '>=4.9.3';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.watchForSingleFileChanges =
|
|
3
|
+
exports.watchForSingleFileChanges = watchForSingleFileChanges;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const client_1 = require("nx/src/daemon/client/client");
|
|
6
6
|
const path_1 = require("path");
|
|
@@ -19,4 +19,3 @@ async function watchForSingleFileChanges(projectName, projectRoot, relativeFileP
|
|
|
19
19
|
});
|
|
20
20
|
return () => unregisterFileWatcher();
|
|
21
21
|
}
|
|
22
|
-
exports.watchForSingleFileChanges = watchForSingleFileChanges;
|
package/typescript.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { createDependencies, createNodes, } from './src/plugins/typescript/plugin';
|
|
1
|
+
export { createDependencies, createNodes, createNodesV2, } from './src/plugins/typescript/plugin';
|
package/typescript.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createNodes = exports.createDependencies = void 0;
|
|
3
|
+
exports.createNodesV2 = exports.createNodes = exports.createDependencies = void 0;
|
|
4
4
|
var plugin_1 = require("./src/plugins/typescript/plugin");
|
|
5
5
|
Object.defineProperty(exports, "createDependencies", { enumerable: true, get: function () { return plugin_1.createDependencies; } });
|
|
6
6
|
Object.defineProperty(exports, "createNodes", { enumerable: true, get: function () { return plugin_1.createNodes; } });
|
|
7
|
+
Object.defineProperty(exports, "createNodesV2", { enumerable: true, get: function () { return plugin_1.createNodesV2; } });
|