@nx/react 18.1.1 → 18.2.0-beta.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/react",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.2.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
|
|
6
6
|
"repository": {
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"chalk": "^4.1.0",
|
|
37
37
|
"minimatch": "9.0.3",
|
|
38
38
|
"tslib": "^2.3.0",
|
|
39
|
-
"@nx/devkit": "18.
|
|
40
|
-
"@nx/js": "18.
|
|
41
|
-
"@nx/eslint": "18.
|
|
42
|
-
"@nx/web": "18.
|
|
43
|
-
"@nrwl/react": "18.
|
|
39
|
+
"@nx/devkit": "18.2.0-beta.0",
|
|
40
|
+
"@nx/js": "18.2.0-beta.0",
|
|
41
|
+
"@nx/eslint": "18.2.0-beta.0",
|
|
42
|
+
"@nx/web": "18.2.0-beta.0",
|
|
43
|
+
"@nrwl/react": "18.2.0-beta.0"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
@@ -8,6 +8,9 @@ const webpack_1 = require("webpack");
|
|
|
8
8
|
const merge_plugins_1 = require("./merge-plugins");
|
|
9
9
|
const with_react_1 = require("../with-react");
|
|
10
10
|
const fs_1 = require("fs");
|
|
11
|
+
// Prevent sensitive keys from being bundled when source code uses entire `process.env` object rather than individual keys (e.g. `process.env.NX_FOO`).
|
|
12
|
+
// TODO(v19): BREAKING: Only env vars prefixed with NX_PUBLIC should be bundled. This is a breaking change so we won't do it in v18.
|
|
13
|
+
const excludedKeys = ['NX_CLOUD_ACCESS_TOKEN', 'NX_CLOUD_ENCRYPTION_KEY'];
|
|
11
14
|
// This is shamelessly taken from CRA and modified for NX use
|
|
12
15
|
// https://github.com/facebook/create-react-app/blob/4784997f0682e75eb32a897b4ffe34d735912e6c/packages/react-scripts/config/env.js#L71
|
|
13
16
|
function getClientEnvironment(mode) {
|
|
@@ -16,7 +19,8 @@ function getClientEnvironment(mode) {
|
|
|
16
19
|
const NX_PREFIX = /^NX_/i;
|
|
17
20
|
const STORYBOOK_PREFIX = /^STORYBOOK_/i;
|
|
18
21
|
const raw = Object.keys(process.env)
|
|
19
|
-
.filter((key) =>
|
|
22
|
+
.filter((key) => !excludedKeys.includes(key) &&
|
|
23
|
+
(NX_PREFIX.test(key) || STORYBOOK_PREFIX.test(key)))
|
|
20
24
|
.reduce((env, key) => {
|
|
21
25
|
env[key] = process.env[key];
|
|
22
26
|
return env;
|