@atlaspack/package-manager 2.14.15-alshdevreleasescript.0 → 2.14.15-alshintegrationtestslib.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/lib/index.js +12 -4
- package/lib/index.js.map +1 -1
- package/package.json +10 -10
- package/src/NodePackageManager.js +20 -5
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 === 'test' || 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,13 @@ 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
|
+
// Skip invalidation of Atlaspack modules during testing to prevent
|
3849
|
+
// module cache conflicts. When using babel-register, this works fine
|
3850
|
+
// because it maintains its own internal module cache that we don't
|
3851
|
+
// invalidate. However, with compiled Atlaspack packages in integration
|
3852
|
+
// tests, invalidation causes multiple module instances to exist
|
3853
|
+
// simultaneously, leading to test failures.
|
3854
|
+
if (process.env.ATLASPACK_BUILD_ENV === 'test' && name.startsWith('@atlaspack/')) return;
|
3847
3855
|
invalidationsCache.delete(resolved.resolved);
|
3848
3856
|
// $FlowFixMe
|
3849
3857
|
let module1 = (0, ($parcel$interopDefault($dufqm$module)))._cache[resolved.resolved];
|
@@ -4128,7 +4136,7 @@ function $fdbc4680a0f2f397$export$9c0565d18deefc7f(fs, packageManager, modules,
|
|
4128
4136
|
if ((0, ($parcel$interopDefault($dufqm$atlaspackworkers))).isWorker()) {
|
4129
4137
|
let workerApi = (0, ($parcel$interopDefault($dufqm$atlaspackworkers))).getWorkerApi();
|
4130
4138
|
// 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;
|
4139
|
+
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
4140
|
return workerApi.callMaster({
|
4133
4141
|
location: bundlePath,
|
4134
4142
|
args: [
|
@@ -4722,7 +4730,7 @@ function $770d99f4b6e8471f$export$2e2bcd8739ae039(childProcess) {
|
|
4722
4730
|
});
|
4723
4731
|
|
4724
4732
|
parcelRegister("dmfaS", function(module, exports) {
|
4725
|
-
module.exports = JSON.parse("{\"name\":\"@atlaspack/package-manager\",\"version\":\"2.14.15-
|
4733
|
+
module.exports = JSON.parse("{\"name\":\"@atlaspack/package-manager\",\"version\":\"2.14.15-alshintegrationtestslib.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-alshintegrationtestslib.0\",\"@atlaspack/diagnostic\":\"2.14.2-alshintegrationtestslib.0\",\"@atlaspack/fs\":\"2.15.10-alshintegrationtestslib.0\",\"@atlaspack/logger\":\"2.14.12-alshintegrationtestslib.0\",\"@atlaspack/node-resolver-core\":\"3.5.15-alshintegrationtestslib.0\",\"@atlaspack/types\":\"2.15.5-alshintegrationtestslib.0\",\"@atlaspack/utils\":\"2.15.3-alshintegrationtestslib.0\",\"@atlaspack/workers\":\"2.14.15-alshintegrationtestslib.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\":\"f6a68fdf5e9837f1040a7ea71443212a6f62ee5b\"}");
|
4726
4734
|
|
4727
4735
|
});
|
4728
4736
|
|