@nx/react 23.0.0-beta.17 → 23.0.0-beta.18
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/index.d.ts +0 -3
- package/index.d.ts.map +1 -1
- package/index.js +1 -4
- package/migrations.json +6 -0
- package/package.json +16 -16
- package/src/generators/application/lib/bundlers/add-vite.d.ts.map +1 -1
- package/src/generators/application/lib/bundlers/add-vite.js +10 -2
- package/src/generators/library/library.js +2 -2
- package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +3 -0
- package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts.map +1 -0
- package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
package/index.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { NxReactWebpackPlugin as _NxReactWebpackPlugin } from './plugins/nx-react-webpack-plugin/nx-react-webpack-plugin';
|
|
2
|
-
/** @deprecated Use '@nx/react/webpack-plugin' instead, which can improve graph creation by 150-200ms per file. */
|
|
3
|
-
export declare const NxReactWebpackPlugin: typeof _NxReactWebpackPlugin;
|
|
4
1
|
export { extraEslintDependencies, extendReactEslintJson, } from './src/utils/lint';
|
|
5
2
|
export { assertValidStyle } from './src/utils/assertion';
|
|
6
3
|
export { reactDomVersion, reactVersion } from './src/utils/versions';
|
package/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../packages/react/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kDAAkD,CAAC;AAC3F,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,+BAA+B,EAAE,MAAM,wDAAwD,CAAC;AACzG,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,+BAA+B,EAAE,MAAM,kFAAkF,CAAC;AACnI,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AACvD,cAAc,sBAAsB,CAAC"}
|
package/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.extendReactEslintJson = exports.extraEslintDependencies =
|
|
3
|
+
exports.componentTestGenerator = exports.cypressComponentConfigGenerator = exports.remoteGenerator = exports.hostGenerator = exports.storybookConfigurationGenerator = exports.storiesGenerator = exports.reduxGenerator = exports.reactInitGenerator = exports.libraryGenerator = exports.componentStoryGenerator = exports.hookGenerator = exports.componentGenerator = exports.applicationGenerator = exports.reactVersion = exports.reactDomVersion = exports.assertValidStyle = exports.extendReactEslintJson = exports.extraEslintDependencies = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const nx_react_webpack_plugin_1 = require("./plugins/nx-react-webpack-plugin/nx-react-webpack-plugin");
|
|
6
|
-
/** @deprecated Use '@nx/react/webpack-plugin' instead, which can improve graph creation by 150-200ms per file. */
|
|
7
|
-
exports.NxReactWebpackPlugin = nx_react_webpack_plugin_1.NxReactWebpackPlugin;
|
|
8
5
|
var lint_1 = require("./src/utils/lint");
|
|
9
6
|
Object.defineProperty(exports, "extraEslintDependencies", { enumerable: true, get: function () { return lint_1.extraEslintDependencies; } });
|
|
10
7
|
Object.defineProperty(exports, "extendReactEslintJson", { enumerable: true, get: function () { return lint_1.extendReactEslintJson; } });
|
package/migrations.json
CHANGED
|
@@ -35,6 +35,12 @@
|
|
|
35
35
|
"version": "22.0.0-beta.0",
|
|
36
36
|
"description": "Updates webpack configs using React to use the new withSvgr composable function instead of the svgr option in withReact or NxReactWebpackPlugin.",
|
|
37
37
|
"factory": "./src/migrations/update-22-0-0/add-svgr-to-webpack-config"
|
|
38
|
+
},
|
|
39
|
+
"update-23-0-0-remove-nx-react-webpack-plugin-import": {
|
|
40
|
+
"cli": "nx",
|
|
41
|
+
"version": "23.0.0-beta.10",
|
|
42
|
+
"description": "Rewrites imports of NxReactWebpackPlugin from '@nx/react' to the sub-path '@nx/react/webpack-plugin'.",
|
|
43
|
+
"factory": "./src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import"
|
|
38
44
|
}
|
|
39
45
|
},
|
|
40
46
|
"packageJsonUpdates": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "23.0.0-beta.
|
|
3
|
+
"version": "23.0.0-beta.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -37,28 +37,28 @@
|
|
|
37
37
|
"@svgr/webpack": "^8.0.1",
|
|
38
38
|
"minimatch": "10.2.5",
|
|
39
39
|
"tslib": "^2.3.0",
|
|
40
|
-
"@nx/devkit": "23.0.0-beta.
|
|
41
|
-
"@nx/js": "23.0.0-beta.
|
|
42
|
-
"@nx/eslint": "23.0.0-beta.
|
|
43
|
-
"@nx/web": "23.0.0-beta.
|
|
44
|
-
"@nx/module-federation": "23.0.0-beta.
|
|
45
|
-
"@nx/rollup": "23.0.0-beta.
|
|
40
|
+
"@nx/devkit": "23.0.0-beta.18",
|
|
41
|
+
"@nx/js": "23.0.0-beta.18",
|
|
42
|
+
"@nx/eslint": "23.0.0-beta.18",
|
|
43
|
+
"@nx/web": "23.0.0-beta.18",
|
|
44
|
+
"@nx/module-federation": "23.0.0-beta.18",
|
|
45
|
+
"@nx/rollup": "23.0.0-beta.18",
|
|
46
46
|
"express": "^4.21.2",
|
|
47
47
|
"http-proxy-middleware": "^3.0.5",
|
|
48
48
|
"semver": "^7.6.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@nx/cypress": "23.0.0-beta.
|
|
52
|
-
"@nx/playwright": "23.0.0-beta.
|
|
53
|
-
"@nx/rsbuild": "23.0.0-beta.
|
|
54
|
-
"@nx/vite": "23.0.0-beta.
|
|
55
|
-
"@nx/vitest": "23.0.0-beta.
|
|
56
|
-
"@nx/webpack": "23.0.0-beta.
|
|
57
|
-
"@nx/storybook": "23.0.0-beta.
|
|
58
|
-
"nx": "23.0.0-beta.
|
|
51
|
+
"@nx/cypress": "23.0.0-beta.18",
|
|
52
|
+
"@nx/playwright": "23.0.0-beta.18",
|
|
53
|
+
"@nx/rsbuild": "23.0.0-beta.18",
|
|
54
|
+
"@nx/vite": "23.0.0-beta.18",
|
|
55
|
+
"@nx/vitest": "23.0.0-beta.18",
|
|
56
|
+
"@nx/webpack": "23.0.0-beta.18",
|
|
57
|
+
"@nx/storybook": "23.0.0-beta.18",
|
|
58
|
+
"nx": "23.0.0-beta.18"
|
|
59
59
|
},
|
|
60
60
|
"optionalDependencies": {
|
|
61
|
-
"@nx/vite": "23.0.0-beta.
|
|
61
|
+
"@nx/vite": "23.0.0-beta.18"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,
|
|
1
|
+
{"version":3,"file":"add-vite.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/react/src/generators/application/lib/bundlers/add-vite.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAoC,MAAM,YAAY,CAAC;AAGzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExD,wBAAsB,sBAAsB,CAC1C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBAkEb;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,EACjC,KAAK,EAAE,GAAG,EAAE,iBA8Cb"}
|
|
@@ -79,7 +79,11 @@ async function setupViteConfiguration(tree, options, tasks) {
|
|
|
79
79
|
includeLib: false,
|
|
80
80
|
includeVitest: options.unitTestRunner === 'vitest',
|
|
81
81
|
inSourceTests: options.inSourceTests,
|
|
82
|
-
|
|
82
|
+
rolldownOptionsExternal: [
|
|
83
|
+
"'react'",
|
|
84
|
+
"'react-dom'",
|
|
85
|
+
"'react/jsx-runtime'",
|
|
86
|
+
],
|
|
83
87
|
port: options.port,
|
|
84
88
|
previewPort: options.port,
|
|
85
89
|
useEsmExtension: true,
|
|
@@ -106,7 +110,11 @@ async function setupVitestConfiguration(tree, options, tasks) {
|
|
|
106
110
|
includeLib: false,
|
|
107
111
|
includeVitest: true,
|
|
108
112
|
inSourceTests: options.inSourceTests,
|
|
109
|
-
|
|
113
|
+
rolldownOptionsExternal: [
|
|
114
|
+
"'react'",
|
|
115
|
+
"'react-dom'",
|
|
116
|
+
"'react/jsx-runtime'",
|
|
117
|
+
],
|
|
110
118
|
imports: [
|
|
111
119
|
options.compiler === 'swc'
|
|
112
120
|
? `import react from '@vitejs/plugin-react-swc'`
|
|
@@ -107,7 +107,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
107
107
|
includeLib: true,
|
|
108
108
|
includeVitest: options.unitTestRunner === 'vitest',
|
|
109
109
|
inSourceTests: options.inSourceTests,
|
|
110
|
-
|
|
110
|
+
rolldownOptionsExternal: [
|
|
111
111
|
"'react'",
|
|
112
112
|
"'react-dom'",
|
|
113
113
|
"'react/jsx-runtime'",
|
|
@@ -166,7 +166,7 @@ async function libraryGeneratorInternal(host, schema) {
|
|
|
166
166
|
includeLib: true,
|
|
167
167
|
includeVitest: true,
|
|
168
168
|
inSourceTests: options.inSourceTests,
|
|
169
|
-
|
|
169
|
+
rolldownOptionsExternal: [
|
|
170
170
|
"'react'",
|
|
171
171
|
"'react-dom'",
|
|
172
172
|
"'react/jsx-runtime'",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remove-nx-react-webpack-plugin-import.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,IAAI,EAAwB,MAAM,YAAY,CAAC;AA8BrE,wBAA8B,gCAAgC,CAAC,IAAI,EAAE,IAAI,iBAuHxE"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = removeNxReactWebpackPluginImport;
|
|
4
|
+
const devkit_1 = require("@nx/devkit");
|
|
5
|
+
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
6
|
+
const DEPRECATED_SYMBOL = 'NxReactWebpackPlugin';
|
|
7
|
+
const DEPRECATED_PACKAGE = '@nx/react';
|
|
8
|
+
const NEW_PACKAGE = '@nx/react/webpack-plugin';
|
|
9
|
+
// ES module import: import { NxReactWebpackPlugin[, ...] } from '@nx/react'
|
|
10
|
+
const ES_IMPORT_SELECTOR = `ImportDeclaration:has(StringLiteral[value=${DEPRECATED_PACKAGE}]):has(ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}])`;
|
|
11
|
+
const IMPORT_SPECIFIERS_SELECTOR = `ImportClause ImportSpecifier`;
|
|
12
|
+
const TARGET_IMPORT_SPECIFIER_SELECTOR = `ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}]`;
|
|
13
|
+
const ES_MODULE_PATH_SELECTOR = `StringLiteral[value=${DEPRECATED_PACKAGE}]`;
|
|
14
|
+
// CJS require: const { NxReactWebpackPlugin[, ...] } = require('@nx/react')
|
|
15
|
+
const CJS_REQUIRE_STMT_SELECTOR = `VariableStatement:has(ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]):has(CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}])`;
|
|
16
|
+
const CJS_BINDING_ELEMENTS_SELECTOR = `ObjectBindingPattern > BindingElement`;
|
|
17
|
+
const CJS_TARGET_BINDING_SELECTOR = `ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]`;
|
|
18
|
+
const CJS_REQUIRE_PATH_SELECTOR = `CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}]`;
|
|
19
|
+
// Walk past whitespace from `fromIndex` to find a trailing comma. Returns the
|
|
20
|
+
// position AFTER the comma if found, otherwise the original index. Handles
|
|
21
|
+
// the `Foo , withReact` shape where the user wrote whitespace before the
|
|
22
|
+
// comma — `node.getEnd()` stops at the identifier and the comma sits one
|
|
23
|
+
// character past the whitespace.
|
|
24
|
+
function endAfterTrailingComma(text, fromIndex) {
|
|
25
|
+
let i = fromIndex;
|
|
26
|
+
while (i < text.length && /\s/.test(text.charAt(i)))
|
|
27
|
+
i++;
|
|
28
|
+
return text.charAt(i) === ',' ? i + 1 : fromIndex;
|
|
29
|
+
}
|
|
30
|
+
async function removeNxReactWebpackPluginImport(tree) {
|
|
31
|
+
(0, devkit_1.visitNotIgnoredFiles)(tree, '', (filePath) => {
|
|
32
|
+
if (!filePath.endsWith('.ts') &&
|
|
33
|
+
!filePath.endsWith('.tsx') &&
|
|
34
|
+
!filePath.endsWith('.js') &&
|
|
35
|
+
!filePath.endsWith('.jsx') &&
|
|
36
|
+
!filePath.endsWith('.cjs') &&
|
|
37
|
+
!filePath.endsWith('.mjs')) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
let contents = tree.read(filePath, 'utf-8');
|
|
41
|
+
if (!contents)
|
|
42
|
+
return;
|
|
43
|
+
// Quick check: must contain the deprecated symbol and the deprecated package path
|
|
44
|
+
if (!contents.includes(DEPRECATED_SYMBOL) ||
|
|
45
|
+
(!contents.includes(`'${DEPRECATED_PACKAGE}'`) &&
|
|
46
|
+
!contents.includes(`"${DEPRECATED_PACKAGE}"`))) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
let changed = false;
|
|
50
|
+
// Re-parse on every iteration so multiple matches in the same file work
|
|
51
|
+
// correctly. The multi-specifier branch prepends a new declaration which
|
|
52
|
+
// shifts every offset; collected AST positions go stale after one rewrite,
|
|
53
|
+
// so process one match at a time.
|
|
54
|
+
let didRewrite = true;
|
|
55
|
+
while (didRewrite) {
|
|
56
|
+
didRewrite = false;
|
|
57
|
+
const sourceFile = (0, tsquery_1.ast)(contents);
|
|
58
|
+
const importNode = (0, tsquery_1.query)(sourceFile, ES_IMPORT_SELECTOR)[0];
|
|
59
|
+
if (importNode) {
|
|
60
|
+
const specifiers = (0, tsquery_1.query)(importNode, IMPORT_SPECIFIERS_SELECTOR);
|
|
61
|
+
const targetIdentifier = (0, tsquery_1.query)(importNode, TARGET_IMPORT_SPECIFIER_SELECTOR)[0];
|
|
62
|
+
if (targetIdentifier) {
|
|
63
|
+
// Walk to the ImportSpecifier to cover `Foo` and `Foo as Bar`.
|
|
64
|
+
const targetSpec = targetIdentifier.parent;
|
|
65
|
+
if (specifiers.length === 1) {
|
|
66
|
+
const modulePathNode = (0, tsquery_1.query)(importNode, ES_MODULE_PATH_SELECTOR)[0];
|
|
67
|
+
if (modulePathNode) {
|
|
68
|
+
contents =
|
|
69
|
+
contents.slice(0, modulePathNode.getStart()) +
|
|
70
|
+
`'${NEW_PACKAGE}'` +
|
|
71
|
+
contents.slice(modulePathNode.getEnd());
|
|
72
|
+
changed = true;
|
|
73
|
+
didRewrite = true;
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
// Extract target spec verbatim (preserves alias)
|
|
79
|
+
const end = endAfterTrailingComma(contents, targetSpec.getEnd());
|
|
80
|
+
contents =
|
|
81
|
+
`import { ${targetSpec.getText()} } from '${NEW_PACKAGE}';\n` +
|
|
82
|
+
contents.slice(0, targetSpec.getStart()) +
|
|
83
|
+
contents.slice(end);
|
|
84
|
+
changed = true;
|
|
85
|
+
didRewrite = true;
|
|
86
|
+
continue;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
const stmtNode = (0, tsquery_1.query)(sourceFile, CJS_REQUIRE_STMT_SELECTOR)[0];
|
|
91
|
+
if (stmtNode) {
|
|
92
|
+
const bindingElements = (0, tsquery_1.query)(stmtNode, CJS_BINDING_ELEMENTS_SELECTOR);
|
|
93
|
+
const targetIdentifier = (0, tsquery_1.query)(stmtNode, CJS_TARGET_BINDING_SELECTOR)[0];
|
|
94
|
+
if (targetIdentifier) {
|
|
95
|
+
// Walk to the BindingElement to cover `Foo` and `Foo: Bar`.
|
|
96
|
+
const targetBinding = targetIdentifier.parent;
|
|
97
|
+
if (bindingElements.length === 1) {
|
|
98
|
+
const requirePathNode = (0, tsquery_1.query)(stmtNode, CJS_REQUIRE_PATH_SELECTOR)[0];
|
|
99
|
+
if (requirePathNode) {
|
|
100
|
+
contents =
|
|
101
|
+
contents.slice(0, requirePathNode.getStart()) +
|
|
102
|
+
`'${NEW_PACKAGE}'` +
|
|
103
|
+
contents.slice(requirePathNode.getEnd());
|
|
104
|
+
changed = true;
|
|
105
|
+
didRewrite = true;
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
// Extract target binding verbatim (preserves alias)
|
|
111
|
+
const end = endAfterTrailingComma(contents, targetBinding.getEnd());
|
|
112
|
+
contents =
|
|
113
|
+
`const { ${targetBinding.getText()} } = require('${NEW_PACKAGE}');\n` +
|
|
114
|
+
contents.slice(0, targetBinding.getStart()) +
|
|
115
|
+
contents.slice(end);
|
|
116
|
+
changed = true;
|
|
117
|
+
didRewrite = true;
|
|
118
|
+
continue;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if (changed) {
|
|
124
|
+
tree.write(filePath, contents);
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
await (0, devkit_1.formatFiles)(tree);
|
|
128
|
+
}
|