@atlaspack/package-manager 2.14.5-canary.12 → 2.14.5-canary.120
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 +139 -0
- package/lib/index.js +12 -4
- package/lib/index.js.map +1 -1
- package/package.json +10 -10
- package/src/NodePackageManager.js +16 -6
- package/test/NodePackageManager.test.js +6 -1
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@atlaspack/package-manager",
|
3
|
-
"version": "2.14.5-canary.
|
3
|
+
"version": "2.14.5-canary.120+22e54c6bd",
|
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.
|
43
|
-
"@atlaspack/diagnostic": "2.14.1-canary.
|
44
|
-
"@atlaspack/fs": "2.14.5-canary.
|
45
|
-
"@atlaspack/logger": "2.14.5-canary.
|
46
|
-
"@atlaspack/node-resolver-core": "3.5.5-canary.
|
47
|
-
"@atlaspack/types": "2.14.5-canary.
|
48
|
-
"@atlaspack/utils": "2.14.5-canary.
|
49
|
-
"@atlaspack/workers": "2.14.5-canary.
|
42
|
+
"@atlaspack/build-cache": "2.13.3-canary.188+22e54c6bd",
|
43
|
+
"@atlaspack/diagnostic": "2.14.1-canary.188+22e54c6bd",
|
44
|
+
"@atlaspack/fs": "2.14.5-canary.120+22e54c6bd",
|
45
|
+
"@atlaspack/logger": "2.14.5-canary.120+22e54c6bd",
|
46
|
+
"@atlaspack/node-resolver-core": "3.5.5-canary.120+22e54c6bd",
|
47
|
+
"@atlaspack/types": "2.14.5-canary.120+22e54c6bd",
|
48
|
+
"@atlaspack/utils": "2.14.5-canary.120+22e54c6bd",
|
49
|
+
"@atlaspack/workers": "2.14.5-canary.120+22e54c6bd",
|
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": "
|
66
|
+
"gitHead": "22e54c6bd98f6c1aa1c74dffb7f54b97e0392740"
|
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
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
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:
|
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
|
{
|