@atlaspack/package-manager 2.14.17-unified-e330ff3d9.0 → 2.14.18-unified-f92fba5b6.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/CHANGELOG.md +12 -0
- package/lib/index.js +13 -6
- package/lib/index.js.map +1 -1
- package/package.json +10 -10
- package/src/NodePackageManager.js +19 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @atlaspack/package-manager
|
2
2
|
|
3
|
+
## 2.14.17
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- Updated dependencies []:
|
8
|
+
- @atlaspack/fs@2.15.12
|
9
|
+
- @atlaspack/logger@2.14.12
|
10
|
+
- @atlaspack/utils@2.16.1
|
11
|
+
- @atlaspack/node-resolver-core@3.5.17
|
12
|
+
- @atlaspack/workers@2.14.17
|
13
|
+
- @atlaspack/types@2.15.7
|
14
|
+
|
3
15
|
## 2.14.16
|
4
16
|
|
5
17
|
### Patch Changes
|
package/lib/index.js
CHANGED
@@ -3495,7 +3495,7 @@ var $2oNrA = parcelRequire("2oNrA");
|
|
3495
3495
|
// Package.json fields. Must match package_json.rs.
|
3496
3496
|
const MAIN = 1;
|
3497
3497
|
const SOURCE = 4;
|
3498
|
-
const ENTRIES = MAIN | (
|
3498
|
+
const ENTRIES = process.env.ATLASPACK_REGISTER_USE_LIB === 'true' ? MAIN : MAIN | (process.env.ATLASPACK_BUILD_ENV !== 'production' || process.env.ATLASPACK_SELF_BUILD ? SOURCE : 0);
|
3499
3499
|
const NODE_MODULES = `${(0, ($parcel$interopDefault($dufqm$path))).sep}node_modules${(0, ($parcel$interopDefault($dufqm$path))).sep}`;
|
3500
3500
|
// There can be more than one instance of NodePackageManager, but node has only a single module cache.
|
3501
3501
|
// Therefore, the resolution cache and the map of parent to child modules should also be global.
|
@@ -3790,7 +3790,8 @@ class NodePackageManager {
|
|
3790
3790
|
}
|
3791
3791
|
getInvalidations(name, from) {
|
3792
3792
|
let basedir = (0, ($parcel$interopDefault($dufqm$path))).dirname(from);
|
3793
|
-
let
|
3793
|
+
let cacheKey = basedir + ':' + name;
|
3794
|
+
let resolved = cache.get(cacheKey);
|
3794
3795
|
if (resolved && (0, ($parcel$interopDefault($dufqm$path))).isAbsolute(resolved.resolved)) {
|
3795
3796
|
let cached = invalidationsCache.get(resolved.resolved);
|
3796
3797
|
if (cached != null) return cached;
|
@@ -3844,6 +3845,12 @@ class NodePackageManager {
|
|
3844
3845
|
seen.add(key);
|
3845
3846
|
let resolved = cache.get(key);
|
3846
3847
|
if (!resolved || !(0, ($parcel$interopDefault($dufqm$path))).isAbsolute(resolved.resolved)) return;
|
3848
|
+
// During testing don't invalidate Atlaspack modules because
|
3849
|
+
// this causes failures due to multiple instances of the same module
|
3850
|
+
// existing simultaniously. This is fine when using babe;-register because
|
3851
|
+
// it has an internal module cache that NodePacakageManager does not invalidate
|
3852
|
+
// but fails when using compiled Atlaspack packages in integration tests
|
3853
|
+
if (process.env.ATLASPACK_BUILD_ENV === 'test' && name.startsWith('@atlaspack/')) return;
|
3847
3854
|
invalidationsCache.delete(resolved.resolved);
|
3848
3855
|
// $FlowFixMe
|
3849
3856
|
let module1 = (0, ($parcel$interopDefault($dufqm$module)))._cache[resolved.resolved];
|
@@ -4016,9 +4023,9 @@ var $5cGUP = parcelRequire("5cGUP");
|
|
4016
4023
|
|
4017
4024
|
var $3217T = parcelRequire("3217T");
|
4018
4025
|
|
4019
|
-
var $fdbc4680a0f2f397$var$$parcel$__dirname = $dufqm$path.resolve(__dirname, "../src");
|
4020
|
-
|
4021
4026
|
var $fdbc4680a0f2f397$var$$parcel$__filename = $dufqm$path.resolve(__dirname, "../src", "installPackage.js");
|
4027
|
+
|
4028
|
+
var $fdbc4680a0f2f397$var$$parcel$__dirname = $dufqm$path.resolve(__dirname, "../src");
|
4022
4029
|
async function $fdbc4680a0f2f397$var$install(fs, packageManager, modules, from, projectRoot, options = {}) {
|
4023
4030
|
let { installPeers: installPeers = true, saveDev: saveDev = true, packageInstaller: packageInstaller } = options;
|
4024
4031
|
let moduleNames = modules.map((m)=>m.name).join(', ');
|
@@ -4128,7 +4135,7 @@ function $fdbc4680a0f2f397$export$9c0565d18deefc7f(fs, packageManager, modules,
|
|
4128
4135
|
if ((0, ($parcel$interopDefault($dufqm$atlaspackworkers))).isWorker()) {
|
4129
4136
|
let workerApi = (0, ($parcel$interopDefault($dufqm$atlaspackworkers))).getWorkerApi();
|
4130
4137
|
// TODO this should really be `__filename` but without the rewriting.
|
4131
|
-
let bundlePath = !process.env.ATLASPACK_SELF_BUILD ? (0, ($parcel$interopDefault($dufqm$path))).join($fdbc4680a0f2f397$var$$parcel$__dirname, '..', 'lib/index.js') : $fdbc4680a0f2f397$var$$parcel$__filename;
|
4138
|
+
let bundlePath = process.env.ATLASPACK_BUILD_ENV === 'production' && !process.env.ATLASPACK_SELF_BUILD ? (0, ($parcel$interopDefault($dufqm$path))).join($fdbc4680a0f2f397$var$$parcel$__dirname, '..', 'lib/index.js') : $fdbc4680a0f2f397$var$$parcel$__filename;
|
4132
4139
|
return workerApi.callMaster({
|
4133
4140
|
location: bundlePath,
|
4134
4141
|
args: [
|
@@ -4722,7 +4729,7 @@ function $770d99f4b6e8471f$export$2e2bcd8739ae039(childProcess) {
|
|
4722
4729
|
});
|
4723
4730
|
|
4724
4731
|
parcelRegister("dmfaS", function(module, exports) {
|
4725
|
-
module.exports = JSON.parse("{\"name\":\"@atlaspack/package-manager\",\"version\":\"2.14.
|
4732
|
+
module.exports = JSON.parse("{\"name\":\"@atlaspack/package-manager\",\"version\":\"2.14.18-unified-f92fba5b6.0\",\"description\":\"Blazing fast, zero configuration web application bundler\",\"license\":\"(MIT OR Apache-2.0)\",\"publishConfig\":{\"access\":\"public\"},\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/atlassian-labs/atlaspack.git\"},\"main\":\"lib/index.js\",\"source\":\"src/index.js\",\"types\":\"index.d.ts\",\"engines\":{\"node\":\">= 16.0.0\"},\"scripts\":{\"build-ts\":\"mkdir -p lib && flow-to-ts src/index.js > lib/index.d.ts\",\"check-ts\":\"tsc --noEmit index.d.ts\",\"test\":\"mocha test\"},\"targets\":{\"types\":false,\"main\":{\"includeNodeModules\":{\"@atlaspack/build-cache\":false,\"@atlaspack/diagnostic\":false,\"@atlaspack/fs\":false,\"@atlaspack/logger\":false,\"@atlaspack/node-resolver-core\":false,\"@atlaspack/types\":false,\"@atlaspack/utils\":false,\"@atlaspack/workers\":false,\"@swc/core\":false,\"semver\":false}}},\"dependencies\":{\"@atlaspack/build-cache\":\"2.13.4-unified-f92fba5b6.0\",\"@atlaspack/diagnostic\":\"2.14.2-unified-f92fba5b6.0\",\"@atlaspack/fs\":\"2.15.13-unified-f92fba5b6.0\",\"@atlaspack/logger\":\"2.14.13-unified-f92fba5b6.0\",\"@atlaspack/node-resolver-core\":\"3.5.18-unified-f92fba5b6.0\",\"@atlaspack/types\":\"2.15.8-unified-f92fba5b6.0\",\"@atlaspack/utils\":\"2.16.2-unified-f92fba5b6.0\",\"@atlaspack/workers\":\"2.14.18-unified-f92fba5b6.0\",\"@swc/core\":\"^1.10.0\",\"semver\":\"^7.5.2\"},\"devDependencies\":{\"command-exists\":\"^1.2.6\",\"cross-spawn\":\"^6.0.4\",\"nullthrows\":\"^1.1.1\",\"split2\":\"^3.1.1\"},\"browser\":{\"./src/NodePackageManager.js\":false,\"./src/Npm.js\":false,\"./src/Pnpm.js\":false,\"./src/Yarn.js\":false},\"type\":\"commonjs\",\"gitHead\":\"f92fba5b6216e1d94cbd23f3a5d61f7188d49199\"}");
|
4726
4733
|
|
4727
4734
|
});
|
4728
4735
|
|