@nrwl/js 14.0.0-beta.4 → 14.0.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 CHANGED
@@ -17,6 +17,12 @@
17
17
  "version": "13.10.1-beta.1",
18
18
  "description": "Update .lib.swcrc to exclude missing test files",
19
19
  "factory": "./src/migrations/update-13-10-1/update-lib-swcrc-exclude"
20
+ },
21
+ "exclude-jest-config-swcrc": {
22
+ "cli": "nx",
23
+ "version": "14.0.0-beta.2",
24
+ "description": "Exclude jest config from .lib.swcrc",
25
+ "factory": "./src/migrations/update-14-0-0/exclude-jest-config-swcrc"
20
26
  }
21
27
  },
22
28
  "packageJsonUpdates": {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrwl/js",
3
- "version": "14.0.0-beta.4",
3
+ "version": "14.0.1",
4
4
  "description": "The Nx plugin that provides the best experience for developing JavaScript and TypeScript projects.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,10 +31,10 @@
31
31
  "executors": "./executors.json",
32
32
  "builders": "./executors.json",
33
33
  "dependencies": {
34
- "@nrwl/workspace": "14.0.0-beta.4",
35
- "@nrwl/devkit": "14.0.0-beta.4",
36
- "@nrwl/jest": "14.0.0-beta.4",
37
- "@nrwl/linter": "14.0.0-beta.4",
34
+ "@nrwl/workspace": "14.0.1",
35
+ "@nrwl/devkit": "14.0.1",
36
+ "@nrwl/jest": "14.0.1",
37
+ "@nrwl/linter": "14.0.1",
38
38
  "@parcel/watcher": "2.0.4",
39
39
  "chalk": "4.1.0",
40
40
  "fast-glob": "3.2.7",
@@ -8,7 +8,7 @@ const { exclude: _, ...swcJestConfig } = JSON.parse(
8
8
 
9
9
  module.exports = {
10
10
  displayName: '<%= project %>',
11
- preset: '<%= offsetFromRoot %>jest.preset.js',
11
+ preset: '<%= offsetFromRoot %>jest.preset.ts',
12
12
  transform: {
13
13
  '^.+\\.[tj]s$': ['@swc/jest', swcJestConfig],
14
14
  },
@@ -6,5 +6,5 @@
6
6
  "types": []
7
7
  },
8
8
  "include": ["**/*.ts"<% if (js) { %>, "**/*.js"<% } %>],
9
- "exclude": ["**/*.spec.ts", "**/*.test.ts"<% if (js) { %>, "**/*.spec.js", "**/*.test.js"<% } %>]
9
+ "exclude": ["jest.config.ts", "**/*.spec.ts", "**/*.test.ts"<% if (js) { %>, "**/*.spec.js", "**/*.test.js"<% } %>]
10
10
  }
@@ -0,0 +1,3 @@
1
+ import { Tree } from '@nrwl/devkit';
2
+ export declare function excludeJestConfigSwcrc(tree: Tree): void;
3
+ export default excludeJestConfigSwcrc;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.excludeJestConfigSwcrc = void 0;
4
+ const devkit_1 = require("@nrwl/devkit");
5
+ const executor_options_utils_1 = require("@nrwl/workspace/src/utilities/executor-options-utils");
6
+ const path_1 = require("path");
7
+ function excludeJestConfigSwcrc(tree) {
8
+ (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nrwl/js:swc', (config, projectName) => {
9
+ const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, projectName);
10
+ const libSwcPath = (0, path_1.join)(projectConfig.root, '.lib.swcrc');
11
+ if (!tree.exists(libSwcPath))
12
+ return;
13
+ (0, devkit_1.updateJson)(tree, libSwcPath, (json) => {
14
+ if (json.exclude) {
15
+ const excludePatterns = new Set([
16
+ 'jest.config.js',
17
+ ...json.exclude,
18
+ ]);
19
+ json.exclude = [...excludePatterns];
20
+ }
21
+ return json;
22
+ }, { expectComments: true });
23
+ });
24
+ }
25
+ exports.excludeJestConfigSwcrc = excludeJestConfigSwcrc;
26
+ exports.default = excludeJestConfigSwcrc;
27
+ //# sourceMappingURL=exclude-jest-config-swcrc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"exclude-jest-config-swcrc.js","sourceRoot":"","sources":["../../../../../../packages/js/src/migrations/update-14-0-0/exclude-jest-config-swcrc.ts"],"names":[],"mappings":";;;AAAA,yCAA0E;AAE1E,iGAA8F;AAC9F,+BAA4B;AAE5B,SAAgB,sBAAsB,CAAC,IAAU;IAC/C,IAAA,+CAAsB,EACpB,IAAI,EACJ,cAAc,EACd,CAAC,MAA0B,EAAE,WAAW,EAAE,EAAE;QAC1C,MAAM,aAAa,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,IAAA,WAAI,EAAC,aAAa,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;QAE1D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC;YAAE,OAAO;QAErC,IAAA,mBAAU,EACR,IAAI,EACJ,UAAU,EACV,CAAC,IAAI,EAAE,EAAE;YACP,IAAI,IAAI,CAAC,OAAO,EAAE;gBAChB,MAAM,eAAe,GAAG,IAAI,GAAG,CAAC;oBAC9B,gBAAgB;oBAChB,GAAG,IAAI,CAAC,OAAO;iBAChB,CAAC,CAAC;gBACH,IAAI,CAAC,OAAO,GAAG,CAAC,GAAG,eAAe,CAAC,CAAC;aACrC;YACD,OAAO,IAAI,CAAC;QACd,CAAC,EACD,EAAE,cAAc,EAAE,IAAI,EAAE,CACzB,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC;AA3BD,wDA2BC;AAED,kBAAe,sBAAsB,CAAC"}
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addSwcConfig = exports.defaultExclude = void 0;
4
4
  const path_1 = require("path");
5
5
  exports.defaultExclude = [
6
+ 'jest.config.ts',
6
7
  '.*.spec.tsx?$',
7
8
  '.*.test.tsx?$',
8
9
  './src/jest-setup.ts$',
@@ -1 +1 @@
1
- {"version":3,"file":"add-swc-config.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/add-swc-config.ts"],"names":[],"mappings":";;;AAGA,+BAA4B;AAEf,QAAA,cAAc,GAAG;IAC5B,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,qBAAqB;IACrB,QAAQ;CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;eAsBhB,IAAI,CAAC,SAAS,CAAC,sBAAc,CAAC;EAC3C,CAAC;AAEH,SAAgB,YAAY,CAAC,IAAU,EAAE,UAAkB;IACzD,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAAE,OAAO;IAEnC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAC5C,CAAC;AALD,oCAKC"}
1
+ {"version":3,"file":"add-swc-config.js","sourceRoot":"","sources":["../../../../../../packages/js/src/utils/swc/add-swc-config.ts"],"names":[],"mappings":";;;AAGA,+BAA4B;AAEf,QAAA,cAAc,GAAG;IAC5B,gBAAgB;IAChB,eAAe;IACf,eAAe;IACf,sBAAsB;IACtB,qBAAqB;IACrB,QAAQ;CACT,CAAC;AAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;eAsBhB,IAAI,CAAC,SAAS,CAAC,sBAAc,CAAC;EAC3C,CAAC;AAEH,SAAgB,YAAY,CAAC,IAAU,EAAE,UAAkB;IACzD,MAAM,SAAS,GAAG,IAAA,WAAI,EAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACjD,IAAI,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC;QAAE,OAAO;IAEnC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;AAC5C,CAAC;AALD,oCAKC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.swcHelpersVersion = exports.swcCliVersion = exports.swcCoreVersion = exports.nxVersion = void 0;
4
- exports.nxVersion = '14.0.0-beta.4';
4
+ exports.nxVersion = '14.0.1';
5
5
  exports.swcCoreVersion = '~1.2.143';
6
6
  exports.swcCliVersion = '~0.1.55';
7
7
  exports.swcHelpersVersion = '~0.3.3';