@nx/esbuild 17.0.4 → 17.0.6

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/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  (The MIT License)
2
2
 
3
- Copyright (c) 2017-2024 Narwhal Technologies Inc.
3
+ Copyright (c) 2017-2023 Narwhal Technologies Inc.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
package/README.md CHANGED
@@ -1,9 +1,4 @@
1
- <p style="text-align: center;">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
4
- <img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
5
- </picture>
6
- </p>
1
+ <p style="text-align: center;"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx.png" width="600" alt="Nx - Smart, Fast and Extensible Build System"></p>
7
2
 
8
3
  <div style="text-align: center;">
9
4
 
@@ -20,9 +15,9 @@
20
15
 
21
16
  <hr>
22
17
 
23
- # Nx: Smart Monorepos · Fast CI
18
+ # Nx: Smart, Fast and Extensible Build System
24
19
 
25
- Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
20
+ Nx is a next generation build system with first class monorepo support and powerful integrations.
26
21
 
27
22
  This package is a [EsBuild plugin for Nx](https://nx.dev/packages/esbuild).
28
23
 
@@ -64,5 +59,5 @@ npx nx@latest init
64
59
  - [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
65
60
 
66
61
  <p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
67
- width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
62
+ width="100%" alt="Nx - Smart, Fast and Extensible Build System"></a></p>
68
63
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/esbuild",
3
- "version": "17.0.4",
3
+ "version": "v17.0.6",
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": {
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^11.1.0",
35
35
  "tslib": "^2.3.0",
36
36
  "tsconfig-paths": "^4.1.2",
37
- "@nx/devkit": "17.0.4",
38
- "@nx/js": "17.0.4",
39
- "@nrwl/esbuild": "17.0.4"
37
+ "@nx/devkit": "v17.0.6",
38
+ "@nx/js": "v17.0.6",
39
+ "@nrwl/esbuild": "v17.0.6"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "esbuild": "~0.19.2"
@@ -1,4 +1,4 @@
1
- import { Tree } from '@nx/devkit';
1
+ import type { Tree } from '@nx/devkit';
2
2
  import { EsBuildProjectSchema } from './schema';
3
3
  export declare function configurationGenerator(tree: Tree, options: EsBuildProjectSchema): Promise<import("@nx/devkit").GeneratorCallback>;
4
4
  export default configurationGenerator;
@@ -4,7 +4,6 @@ exports.configurationGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const get_import_path_1 = require("@nx/js/src/utils/get-import-path");
6
6
  const init_1 = require("../init/init");
7
- const add_build_target_defaults_1 = require("@nx/devkit/src/generators/add-build-target-defaults");
8
7
  async function configurationGenerator(tree, options) {
9
8
  const task = await (0, init_1.esbuildInitGenerator)(tree, {
10
9
  ...options,
@@ -26,7 +25,6 @@ function checkForTargetConflicts(tree, options) {
26
25
  }
27
26
  }
28
27
  function addBuildTarget(tree, options) {
29
- (0, add_build_target_defaults_1.addBuildTargetDefaults)(tree, '@nx/esbuild:esbuild', options.buildTarget);
30
28
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.project);
31
29
  const packageJsonPath = (0, devkit_1.joinPathFragments)(project.root, 'package.json');
32
30
  if (!tree.exists(packageJsonPath)) {
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
2
+ "$schema": "http://json-schema.org/schema",
3
3
  "$id": "NxEsBuildProject",
4
4
  "cli": "nx",
5
5
  "title": "Add esbuild configuration to a project",
@@ -1,4 +1,4 @@
1
- import { GeneratorCallback, Tree } from '@nx/devkit';
1
+ import { Tree } from '@nx/devkit';
2
2
  import { Schema } from './schema';
3
- export declare function esbuildInitGenerator(tree: Tree, schema: Schema): Promise<GeneratorCallback>;
3
+ export declare function esbuildInitGenerator(tree: Tree, schema: Schema): Promise<import("@nx/devkit").GeneratorCallback>;
4
4
  export default esbuildInitGenerator;
@@ -5,17 +5,14 @@ const devkit_1 = require("@nx/devkit");
5
5
  const versions_1 = require("@nx/js/src/utils/versions");
6
6
  const versions_2 = require("../../utils/versions");
7
7
  async function esbuildInitGenerator(tree, schema) {
8
- let installTask = () => { };
9
- if (!schema.skipPackageJson) {
10
- installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
11
- '@nx/esbuild': versions_2.nxVersion,
12
- esbuild: versions_1.esbuildVersion,
13
- }, undefined, schema.keepExistingVersions);
14
- }
8
+ const task = (0, devkit_1.addDependenciesToPackageJson)(tree, {}, {
9
+ '@nx/esbuild': versions_2.nxVersion,
10
+ esbuild: versions_1.esbuildVersion,
11
+ });
15
12
  if (!schema.skipFormat) {
16
13
  await (0, devkit_1.formatFiles)(tree);
17
14
  }
18
- return installTask;
15
+ return task;
19
16
  }
20
17
  exports.esbuildInitGenerator = esbuildInitGenerator;
21
18
  exports.default = esbuildInitGenerator;
@@ -1,5 +1,4 @@
1
1
  export interface Schema {
2
+ compiler?: 'babel' | 'swc' | 'tsc';
2
3
  skipFormat?: boolean;
3
- skipPackageJson?: boolean;
4
- keepExistingVersions?: boolean;
5
4
  }
@@ -1,26 +1,21 @@
1
1
  {
2
- "$schema": "https://json-schema.org/schema",
3
- "$id": "NxEsbuildInit",
2
+ "$schema": "http://json-schema.org/schema",
3
+ "$id": "NxWebpackInit",
4
4
  "cli": "nx",
5
- "title": "Init Esbuild Plugin",
6
- "description": "Init Esbuild Plugin.",
5
+ "title": "Init Webpack Plugin",
6
+ "description": "Init Webpack Plugin.",
7
7
  "type": "object",
8
8
  "properties": {
9
+ "compiler": {
10
+ "type": "string",
11
+ "enum": ["babel", "swc", "tsc"],
12
+ "description": "The compiler to initialize for.",
13
+ "default": "babel"
14
+ },
9
15
  "skipFormat": {
10
16
  "description": "Skip formatting files.",
11
17
  "type": "boolean",
12
18
  "default": false
13
- },
14
- "skipPackageJson": {
15
- "description": "Do not add dependencies to `package.json`.",
16
- "type": "boolean",
17
- "default": false
18
- },
19
- "keepExistingVersions": {
20
- "type": "boolean",
21
- "x-priority": "internal",
22
- "description": "Keep existing dependencies versions",
23
- "default": false
24
19
  }
25
20
  },
26
21
  "required": []
@@ -1,13 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getClientEnvironment = void 0;
4
- // Prevent sensitive keys from being bundled when source code uses entire `process.env` object rather than individual keys (e.g. `process.env.NX_FOO`).
5
- // TODO(v19): Only env vars prefixed with NX_PUBLIC should be bundled. This is a breaking change so we won't do it in v18.
6
- const excludedKeys = ['NX_CLOUD_ACCESS_TOKEN', 'NX_CLOUD_ENCRYPTION_KEY'];
7
4
  function getClientEnvironment() {
8
5
  const NX_APP = /^NX_/i;
9
6
  return Object.keys(process.env)
10
- .filter((key) => !excludedKeys.includes(key) && (NX_APP.test(key) || key === 'NODE_ENV'))
7
+ .filter((key) => NX_APP.test(key) || key === 'NODE_ENV')
11
8
  .reduce((env, key) => {
12
9
  env[`process.env.${key}`] = JSON.stringify(process.env[key]);
13
10
  return env;