nx 21.6.1-beta.3 → 21.6.1-beta.4
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 +11 -11
- package/src/core/graph/main.js +1 -1
- package/src/native/nx.wasm32-wasi.wasm +0 -0
- package/src/plugins/package-json/create-nodes.d.ts.map +1 -1
- package/src/plugins/package-json/create-nodes.js +2 -3
- package/src/tasks-runner/cache.js +1 -1
- package/src/utils/provenance.d.ts.map +1 -1
- package/src/utils/provenance.js +2 -3
Binary file
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create-nodes.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/plugins/package-json/create-nodes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAMrF,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;
|
1
|
+
{"version":3,"file":"create-nodes.d.ts","sourceRoot":"","sources":["../../../../../../packages/nx/src/plugins/package-json/create-nodes.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,mBAAmB,EAAc,MAAM,sBAAsB,CAAC;AACvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAMrF,OAAO,EAEL,WAAW,EAGZ,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAEL,aAAa,EACd,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EACL,6BAA6B,EAE9B,MAAM,+BAA+B,CAAC;AAEvC,eAAO,MAAM,aAAa,EAAE,aA8C3B,CAAC;AAoBF,wBAAgB,iCAAiC,CAC/C,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,GAAG,IAqBvB,GAAG,MAAM,aAYlB;AAED,wBAAgB,yBAAyB,CACvC,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,6BAA6B,EACpC,4BAA4B,EAAE,OAAO;;;;EAoCtC;AAED,wBAAgB,wCAAwC,CACtD,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,mBAAmB,EAC3B,4BAA4B,EAAE,OAAO,GACpC,oBAAoB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CA8DzC;AAED;;GAEG;AACH,wBAAgB,2CAA2C,CACzD,IAAI,EAAE,MAAM,EAEZ,QAAQ,GAAE,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAER,EACtC,QAAQ,GAAE,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,CAER,EACtC,MAAM,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAA0C,GACnE,MAAM,EAAE,CA+CV"}
|
@@ -16,6 +16,7 @@ const logger_1 = require("../../utils/logger");
|
|
16
16
|
const output_1 = require("../../utils/output");
|
17
17
|
const package_json_1 = require("../../utils/package-json");
|
18
18
|
const path_1 = require("../../utils/path");
|
19
|
+
const versions_1 = require("../../utils/versions");
|
19
20
|
const plugins_1 = require("../../project-graph/plugins");
|
20
21
|
const path_2 = require("path");
|
21
22
|
const file_hasher_1 = require("../../hasher/file-hasher");
|
@@ -89,9 +90,7 @@ function createNodeFromPackageJson(pkgJsonPath, workspaceRoot, cache, isInPackag
|
|
89
90
|
...json,
|
90
91
|
root: projectRoot,
|
91
92
|
isInPackageManagerWorkspaces,
|
92
|
-
|
93
|
-
// results for the same hash
|
94
|
-
bust: 1,
|
93
|
+
nxVersion: versions_1.nxVersion,
|
95
94
|
});
|
96
95
|
const cached = cache[hash];
|
97
96
|
if (cached) {
|
@@ -56,7 +56,7 @@ class DbCache {
|
|
56
56
|
constructor(options) {
|
57
57
|
this.options = options;
|
58
58
|
this.nxJson = (0, nx_json_1.readNxJson)();
|
59
|
-
this.cache = new native_1.NxCache(workspace_root_1.workspaceRoot, cache_directory_1.cacheDir, (0, db_connection_1.getDbConnection)(),
|
59
|
+
this.cache = new native_1.NxCache(workspace_root_1.workspaceRoot, cache_directory_1.cacheDir, (0, db_connection_1.getDbConnection)(), process.env.NX_DISABLE_DB !== 'true', resolveMaxCacheSize(this.nxJson));
|
60
60
|
this.isVerbose = process.env.NX_VERBOSE_LOGGING === 'true';
|
61
61
|
}
|
62
62
|
async init() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/provenance.ts"],"names":[],"mappings":"AAaA,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,
|
1
|
+
{"version":3,"file":"provenance.d.ts","sourceRoot":"","sources":["../../../../../packages/nx/src/utils/provenance.ts"],"names":[],"mappings":"AAaA,wBAAsB,0BAA0B,CAC9C,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC,CA8Gf;AAED,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM;CAOxE;AAED,wBAAgB,iBAAiB,IAAI,MAAM,EAAE,CAa5C;AAoBD,MAAM,MAAM,yBAAyB,GAAG;IACtC,KAAK,EAAE,iCAAiC,CAAC;IACzC,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,aAAa,EAAE,gCAAgC,CAAC;IAChD,SAAS,EAAE;QACT,eAAe,EAAE;YACf,SAAS,EAAE,MAAM,CAAC;YAClB,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YACxC,kBAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YACzC,oBAAoB,CAAC,EAAE,kBAAkB,EAAE,CAAC;SAC7C,CAAC;QACF,UAAU,EAAE;YACV,OAAO,EAAE;gBACP,EAAE,EAAE,MAAM,CAAC;gBACX,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAC;gBAC3C,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;aAClC,CAAC;YACF,QAAQ,CAAC,EAAE;gBACT,YAAY,CAAC,EAAE,MAAM,CAAC;gBACtB,SAAS,CAAC,EAAE,MAAM,CAAC;gBACnB,UAAU,CAAC,EAAE,MAAM,CAAC;aACrB,CAAC;YACF,UAAU,CAAC,EAAE,kBAAkB,EAAE,CAAC;SACnC,CAAC;KACH,CAAC;CACH,CAAC;AAEF,MAAM,WAAW,kBAAkB;IACjC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;KACnC,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE;QACZ,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,CAAC;CACH"}
|
package/src/utils/provenance.js
CHANGED
@@ -7,7 +7,6 @@ const child_process_1 = require("child_process");
|
|
7
7
|
const path_1 = require("path");
|
8
8
|
const util_1 = require("util");
|
9
9
|
const fileutils_1 = require("./fileutils");
|
10
|
-
const os_1 = require("os");
|
11
10
|
/*
|
12
11
|
* Verifies that the given npm package has provenance attestations
|
13
12
|
* generated by the GitHub Actions workflow at .github/workflows/publish.yml
|
@@ -21,9 +20,9 @@ async function ensurePackageHasProvenance(packageName, packageVersion) {
|
|
21
20
|
if (process.env.NX_SKIP_PROVENANCE_CHECK) {
|
22
21
|
return;
|
23
22
|
}
|
24
|
-
const
|
23
|
+
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
25
24
|
try {
|
26
|
-
const result = await
|
25
|
+
const result = await execAsync(`npm view ${packageName}@${packageVersion} --json --silent`, {
|
27
26
|
timeout: 20000,
|
28
27
|
});
|
29
28
|
const npmViewResult = JSON.parse(result.stdout.trim());
|