@nx/esbuild 20.0.0-beta.5 → 20.0.0-beta.7

Sign up to get free protection for your applications and to get access to all the features.
package/migrations.json CHANGED
@@ -1,36 +1,4 @@
1
1
  {
2
- "generators": {
3
- "update-16-0-0-add-nx-packages": {
4
- "cli": "nx",
5
- "version": "16.0.0-beta.1",
6
- "description": "Replace @nrwl/esbuild with @nx/esbuild",
7
- "implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages"
8
- },
9
- "update-16-0-1-set-thirdparty-true": {
10
- "version": "16.0.1-beta.0",
11
- "description": "Set thirdParty to true to maintain the existing behavior of bundling dependencies.",
12
- "cli": "nx",
13
- "implementation": "./src/migrations/update-16-0-1-set-thirdparty-true/update-16-0-1-set-thirdparty-true"
14
- }
15
- },
16
- "packageJsonUpdates": {
17
- "16.0.0": {
18
- "version": "16.0.0-beta.5",
19
- "packages": {
20
- "esbuild": {
21
- "version": "0.17.17",
22
- "alwaysAddToPackageJson": false
23
- }
24
- }
25
- },
26
- "16.8.0": {
27
- "version": "16.8.0-beta.2",
28
- "packages": {
29
- "esbuild": {
30
- "version": "^0.19.2",
31
- "alwaysAddToPackageJson": false
32
- }
33
- }
34
- }
35
- }
2
+ "generators": {},
3
+ "packageJsonUpdates": {}
36
4
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/esbuild",
3
- "version": "20.0.0-beta.5",
3
+ "version": "20.0.0-beta.7",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for esbuild contains executors and generators that support building applications using esbuild",
6
6
  "repository": {
@@ -31,8 +31,8 @@
31
31
  "migrations": "./migrations.json"
32
32
  },
33
33
  "dependencies": {
34
- "@nx/devkit": "20.0.0-beta.5",
35
- "@nx/js": "20.0.0-beta.5",
34
+ "@nx/devkit": "20.0.0-beta.7",
35
+ "@nx/js": "20.0.0-beta.7",
36
36
  "fast-glob": "3.2.7",
37
37
  "picocolors": "^1.1.0",
38
38
  "tsconfig-paths": "^4.1.2",
@@ -29,7 +29,6 @@ async function* esbuildExecutor(_options, context) {
29
29
  });
30
30
  }
31
31
  return acc;
32
- return acc;
33
32
  }, []);
34
33
  if (!options.thirdParty) {
35
34
  const thirdPartyDependencies = (0, get_extra_dependencies_1.getExtraDependencies)(context.projectName, context.projectGraph);
@@ -3,9 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.configurationGenerator = configurationGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
6
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
6
7
  const init_1 = require("../init/init");
7
8
  const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaults-utils");
8
9
  async function configurationGenerator(tree, options) {
10
+ (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'esbuild', 'configuration');
9
11
  const task = await (0, init_1.esbuildInitGenerator)(tree, {
10
12
  ...options,
11
13
  skipFormat: true,
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.esbuildInitGenerator = esbuildInitGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
+ const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
6
  const versions_1 = require("@nx/js/src/utils/versions");
6
7
  const versions_2 = require("../../utils/versions");
7
8
  async function esbuildInitGenerator(tree, schema) {
9
+ (0, ts_solution_setup_1.assertNotUsingTsSolutionSetup)(tree, 'esbuild', 'init');
8
10
  let installTask = () => { };
9
11
  if (!schema.skipPackageJson) {
10
12
  installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
@@ -1,2 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- export default function replacePackage(tree: Tree): Promise<void>;
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = replacePackage;
4
- const devkit_1 = require("@nx/devkit");
5
- const replace_package_1 = require("@nx/devkit/src/utils/replace-package");
6
- async function replacePackage(tree) {
7
- await (0, replace_package_1.replaceNrwlPackageWithNxPackage)(tree, '@nrwl/esbuild', '@nx/esbuild');
8
- await (0, devkit_1.formatFiles)(tree);
9
- }
@@ -1,2 +0,0 @@
1
- import { Tree } from '@nx/devkit';
2
- export default function update(host: Tree): Promise<void>;
@@ -1,27 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = update;
4
- /* eslint-disable @typescript-eslint/no-unused-vars */
5
- const devkit_1 = require("@nx/devkit");
6
- async function update(host) {
7
- const projects = (0, devkit_1.getProjects)(host);
8
- projects.forEach((projectConfig, projectName) => {
9
- if (!projectConfig.targets)
10
- return;
11
- let shouldUpdate = false;
12
- Object.entries(projectConfig.targets).forEach(([targetName, targetConfig]) => {
13
- if (targetConfig.executor === '@nrwl/esbuild:esbuild' ||
14
- targetConfig.executor === '@nx/esbuild:esbuild') {
15
- projectConfig.targets[targetName].options ??= {};
16
- if (projectConfig.targets[targetName].options.bundle !== false) {
17
- shouldUpdate = true;
18
- projectConfig.targets[targetName].options.thirdParty ??= true;
19
- }
20
- }
21
- });
22
- if (shouldUpdate) {
23
- (0, devkit_1.updateProjectConfiguration)(host, projectName, projectConfig);
24
- }
25
- });
26
- await (0, devkit_1.formatFiles)(host);
27
- }