@atlaspack/package-manager 2.14.5-canary.12 → 2.14.5-canary.121

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": "@atlaspack/package-manager",
3
- "version": "2.14.5-canary.12+143753ba0",
3
+ "version": "2.14.5-canary.121+18a57cf8a",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "publishConfig": {
@@ -39,14 +39,14 @@
39
39
  }
40
40
  },
41
41
  "dependencies": {
42
- "@atlaspack/build-cache": "2.13.3-canary.80+143753ba0",
43
- "@atlaspack/diagnostic": "2.14.1-canary.80+143753ba0",
44
- "@atlaspack/fs": "2.14.5-canary.12+143753ba0",
45
- "@atlaspack/logger": "2.14.5-canary.12+143753ba0",
46
- "@atlaspack/node-resolver-core": "3.5.5-canary.12+143753ba0",
47
- "@atlaspack/types": "2.14.5-canary.12+143753ba0",
48
- "@atlaspack/utils": "2.14.5-canary.12+143753ba0",
49
- "@atlaspack/workers": "2.14.5-canary.12+143753ba0",
42
+ "@atlaspack/build-cache": "2.13.3-canary.189+18a57cf8a",
43
+ "@atlaspack/diagnostic": "2.14.1-canary.189+18a57cf8a",
44
+ "@atlaspack/fs": "2.14.5-canary.121+18a57cf8a",
45
+ "@atlaspack/logger": "2.14.5-canary.121+18a57cf8a",
46
+ "@atlaspack/node-resolver-core": "3.5.5-canary.121+18a57cf8a",
47
+ "@atlaspack/types": "2.14.5-canary.121+18a57cf8a",
48
+ "@atlaspack/utils": "2.14.5-canary.121+18a57cf8a",
49
+ "@atlaspack/workers": "2.14.5-canary.121+18a57cf8a",
50
50
  "@swc/core": "^1.10.0",
51
51
  "semver": "^7.5.2"
52
52
  },
@@ -63,5 +63,5 @@
63
63
  "./src/Yarn.js": false
64
64
  },
65
65
  "type": "commonjs",
66
- "gitHead": "143753ba049078d59fbf1a8880f4c4caf2320311"
66
+ "gitHead": "18a57cf8a4789b2de5ad8e2676f317a26cc91417"
67
67
  }
@@ -41,12 +41,10 @@ import {transformSync} from '@swc/core';
41
41
  // Package.json fields. Must match package_json.rs.
42
42
  const MAIN = 1 << 0;
43
43
  const SOURCE = 1 << 2;
44
- const ENTRIES =
45
- MAIN |
46
- (process.env.ATLASPACK_BUILD_ENV !== 'production' ||
47
- process.env.ATLASPACK_SELF_BUILD
48
- ? SOURCE
49
- : 0);
44
+ let ENTRIES = MAIN;
45
+ if (process.env.ATLASPACK_REGISTER_USE_SRC === 'true') {
46
+ ENTRIES |= SOURCE;
47
+ }
50
48
 
51
49
  const NODE_MODULES = `${path.sep}node_modules${path.sep}`;
52
50
 
@@ -555,6 +553,18 @@ export class NodePackageManager implements PackageManager {
555
553
  return;
556
554
  }
557
555
 
556
+ // During testing don't invalidate Atlaspack modules because
557
+ // this causes failures due to multiple instances of the same module
558
+ // existing simultaniously. This is fine when using babe;-register because
559
+ // it has an internal module cache that NodePacakageManager does not invalidate
560
+ // but fails when using compiled Atlaspack packages in integration tests
561
+ if (
562
+ process.env.ATLASPACK_BUILD_ENV === 'test' &&
563
+ name.startsWith('@atlaspack/')
564
+ ) {
565
+ return;
566
+ }
567
+
558
568
  invalidationsCache.delete(resolved.resolved);
559
569
 
560
570
  // $FlowFixMe
@@ -8,9 +8,11 @@ import sinon from 'sinon';
8
8
  import ThrowableDiagnostic from '@atlaspack/diagnostic';
9
9
  import {loadConfig} from '@atlaspack/utils';
10
10
  import WorkerFarm from '@atlaspack/workers';
11
+ import {WORKER_PATH} from '@atlaspack/core';
11
12
  import {MockPackageInstaller, NodePackageManager} from '../src';
12
13
 
13
14
  const FIXTURES_DIR = path.join(__dirname, 'fixtures');
15
+ const ROOT_DIR = path.normalize(path.join(__dirname, '..', '..', '..', '..'));
14
16
 
15
17
  function normalize(res) {
16
18
  return {
@@ -49,7 +51,7 @@ describe('NodePackageManager', function () {
49
51
 
50
52
  beforeEach(() => {
51
53
  workerFarm = new WorkerFarm({
52
- workerPath: require.resolve('@atlaspack/core/worker'),
54
+ workerPath: WORKER_PATH,
53
55
  });
54
56
  fs = new OverlayFS(new MemoryFS(workerFarm), new NodeFS());
55
57
  packageInstaller = new MockPackageInstaller();
@@ -75,6 +77,7 @@ describe('NodePackageManager', function () {
75
77
  type: 1,
76
78
  invalidateOnFileChange: new Set([
77
79
  path.join(FIXTURES_DIR, 'has-foo/node_modules/foo/package.json'),
80
+ path.join(ROOT_DIR, 'tsconfig.json'),
78
81
  ]),
79
82
  invalidateOnFileCreate: [
80
83
  {
@@ -129,6 +132,7 @@ describe('NodePackageManager', function () {
129
132
  type: 1,
130
133
  invalidateOnFileChange: new Set([
131
134
  path.join(FIXTURES_DIR, 'has-foo/node_modules/a/package.json'),
135
+ path.join(ROOT_DIR, 'tsconfig.json'),
132
136
  ]),
133
137
  invalidateOnFileCreate: [
134
138
  {
@@ -301,6 +305,7 @@ describe('NodePackageManager', function () {
301
305
  FIXTURES_DIR,
302
306
  'has-foo/subpackage/node_modules/foo/package.json',
303
307
  ),
308
+ path.join(ROOT_DIR, 'tsconfig.json'),
304
309
  ]),
305
310
  invalidateOnFileCreate: [
306
311
  {