@nx/esbuild 18.1.1 → 18.1.3
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/esbuild",
|
|
3
|
-
"version": "18.1.
|
|
3
|
+
"version": "18.1.3",
|
|
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": "18.1.
|
|
38
|
-
"@nx/js": "18.1.
|
|
39
|
-
"@nrwl/esbuild": "18.1.
|
|
37
|
+
"@nx/devkit": "18.1.3",
|
|
38
|
+
"@nx/js": "18.1.3",
|
|
39
|
+
"@nrwl/esbuild": "18.1.3"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"esbuild": "~0.19.2"
|
|
@@ -1,10 +1,13 @@
|
|
|
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'];
|
|
4
7
|
function getClientEnvironment() {
|
|
5
8
|
const NX_APP = /^NX_/i;
|
|
6
9
|
return Object.keys(process.env)
|
|
7
|
-
.filter((key) => NX_APP.test(key) || key === 'NODE_ENV')
|
|
10
|
+
.filter((key) => !excludedKeys.includes(key) && (NX_APP.test(key) || key === 'NODE_ENV'))
|
|
8
11
|
.reduce((env, key) => {
|
|
9
12
|
env[`process.env.${key}`] = JSON.stringify(process.env[key]);
|
|
10
13
|
return env;
|