@nx/js 16.9.0-beta.3 → 16.9.0-rc.0

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
@@ -47,6 +47,12 @@
47
47
  "version": "16.6.0-beta.0",
48
48
  "description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
49
49
  "factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps"
50
+ },
51
+ "16-8-2-update-swcrc": {
52
+ "cli": "nx",
53
+ "version": "16.8.2-beta.0",
54
+ "description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
55
+ "factory": "./src/migrations/update-16-8-2/update-swcrc"
50
56
  }
51
57
  },
52
58
  "packageJsonUpdates": {
@@ -98,6 +104,19 @@
98
104
  "version": "~5.1.3"
99
105
  }
100
106
  }
107
+ },
108
+ "16.8.2": {
109
+ "version": "16.8.2-beta.0",
110
+ "packages": {
111
+ "@swc/core": {
112
+ "version": "~1.3.85",
113
+ "alwaysAddToPackageJson": false
114
+ },
115
+ "@swc/helpers": {
116
+ "version": "~0.5.2",
117
+ "alwaysAddToPackageJson": false
118
+ }
119
+ }
101
120
  }
102
121
  }
103
122
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/js",
3
- "version": "16.9.0-beta.3",
3
+ "version": "16.9.0-rc.0",
4
4
  "private": false,
5
5
  "description": "The JS plugin for Nx contains executors and generators that provide the best experience for developing JavaScript and TypeScript projects. ",
6
6
  "repository": {
@@ -39,9 +39,6 @@
39
39
  "@babel/preset-env": "^7.22.9",
40
40
  "@babel/preset-typescript": "^7.22.5",
41
41
  "@babel/runtime": "^7.22.6",
42
- "@nrwl/js": "16.9.0-beta.3",
43
- "@nx/devkit": "16.9.0-beta.3",
44
- "@nx/workspace": "16.9.0-beta.3",
45
42
  "@phenomnomnominal/tsquery": "~5.0.1",
46
43
  "babel-plugin-const-enum": "^1.0.1",
47
44
  "babel-plugin-macros": "^2.8.0",
@@ -51,17 +48,20 @@
51
48
  "detect-port": "^1.5.1",
52
49
  "fast-glob": "3.2.7",
53
50
  "fs-extra": "^11.1.0",
51
+ "npm-package-arg": "11.0.1",
52
+ "npm-run-path": "^4.0.1",
53
+ "ts-node": "10.9.1",
54
+ "tsconfig-paths": "^4.1.2",
54
55
  "ignore": "^5.0.4",
55
56
  "js-tokens": "^4.0.0",
56
57
  "minimatch": "3.0.5",
57
- "npm-package-arg": "11.0.1",
58
- "npm-run-path": "^4.0.1",
59
58
  "ora": "5.3.0",
60
59
  "semver": "7.5.3",
61
60
  "source-map-support": "0.5.19",
62
- "ts-node": "10.9.1",
63
- "tsconfig-paths": "^4.1.2",
64
- "tslib": "^2.3.0"
61
+ "tslib": "^2.3.0",
62
+ "@nx/devkit": "16.9.0-rc.0",
63
+ "@nx/workspace": "16.9.0-rc.0",
64
+ "@nrwl/js": "*"
65
65
  },
66
66
  "peerDependencies": {
67
67
  "verdaccio": "^5.0.4"
@@ -74,6 +74,5 @@
74
74
  "publishConfig": {
75
75
  "access": "public"
76
76
  },
77
- "type": "commonjs",
78
- "gitHead": "d5692528c089a75c76b21d2d1235d8cc5dbb1d26"
77
+ "type": "commonjs"
79
78
  }
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function update(tree: Tree): Promise<void>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const devkit_1 = require("@nx/devkit");
4
+ const path_1 = require("path");
5
+ async function update(tree) {
6
+ const projects = (0, devkit_1.getProjects)(tree);
7
+ for (const config of projects.values()) {
8
+ const swcrcPath = (0, path_1.join)(config.root, '.swcrc');
9
+ if (!tree.exists(swcrcPath))
10
+ continue;
11
+ const json = (0, devkit_1.readJson)(tree, swcrcPath);
12
+ // No longer need strict or noInterop for es6 modules
13
+ // See: https://github.com/swc-project/swc/commit/7e8d72d
14
+ if (json.module?.type === 'es6' &&
15
+ (json.module?.strict || json.module?.noInterop)) {
16
+ delete json.module.noInterop;
17
+ delete json.module.strict;
18
+ (0, devkit_1.writeJson)(tree, swcrcPath, json);
19
+ }
20
+ }
21
+ await (0, devkit_1.formatFiles)(tree);
22
+ }
23
+ exports.default = update;
@@ -27,9 +27,7 @@ const swcOptionsString = (type = 'commonjs') => `{
27
27
  "loose": true
28
28
  },
29
29
  "module": {
30
- "type": "${type}",
31
- "strict": true,
32
- "noInterop": true
30
+ "type": "${type}"
33
31
  },
34
32
  "sourceMaps": true,
35
33
  "exclude": ${JSON.stringify(exports.defaultExclude)}
@@ -2,8 +2,8 @@ export declare const nxVersion: any;
2
2
  export declare const esbuildVersion = "^0.17.17";
3
3
  export declare const prettierVersion = "^2.6.2";
4
4
  export declare const swcCliVersion = "~0.1.62";
5
- export declare const swcCoreVersion = "~1.3.51";
6
- export declare const swcHelpersVersion = "~0.5.0";
5
+ export declare const swcCoreVersion = "~1.3.85";
6
+ export declare const swcHelpersVersion = "~0.5.2";
7
7
  export declare const swcNodeVersion = "~1.4.2";
8
8
  export declare const tsLibVersion = "^2.3.0";
9
9
  export declare const typesNodeVersion = "18.7.1";
@@ -5,8 +5,8 @@ exports.nxVersion = require('../../package.json').version;
5
5
  exports.esbuildVersion = '^0.17.17';
6
6
  exports.prettierVersion = '^2.6.2';
7
7
  exports.swcCliVersion = '~0.1.62';
8
- exports.swcCoreVersion = '~1.3.51';
9
- exports.swcHelpersVersion = '~0.5.0';
8
+ exports.swcCoreVersion = '~1.3.85';
9
+ exports.swcHelpersVersion = '~0.5.2';
10
10
  exports.swcNodeVersion = '~1.4.2';
11
11
  exports.tsLibVersion = '^2.3.0';
12
12
  exports.typesNodeVersion = '18.7.1';
package/CHANGELOG.md DELETED
@@ -1,8 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
-
7
-
8
- **Note:** Version bump only for package @nx/js