@atlaspack/core 2.18.3 → 2.18.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/CHANGELOG.md +27 -0
- package/lib/AssetGraph.js +9 -0
- package/lib/RequestTracker.js +1 -2
- package/lib/index.js +29 -1
- package/lib/public/Config.js +1 -8
- package/lib/requests/PathRequest.js +10 -0
- package/package.json +12 -23
- package/src/AssetGraph.js +13 -0
- package/src/RequestTracker.js +1 -5
- package/src/index.js +5 -1
- package/src/public/Config.js +1 -2
- package/src/requests/PathRequest.js +4 -0
- package/src/types.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @atlaspack/core
|
|
2
2
|
|
|
3
|
+
## 2.18.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#650](https://github.com/atlassian-labs/atlaspack/pull/650) [`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb) Thanks [@alshdavid](https://github.com/alshdavid)! - Remove package.json#exports
|
|
8
|
+
|
|
9
|
+
- [#646](https://github.com/atlassian-labs/atlaspack/pull/646) [`6b1f5ff`](https://github.com/atlassian-labs/atlaspack/commit/6b1f5fff68d7131fae075e14f4d2c02606dc6058) Thanks [@alshdavid](https://github.com/alshdavid)! - Export WORKER_PATH from @atlaspack/core
|
|
10
|
+
|
|
11
|
+
- [#633](https://github.com/atlassian-labs/atlaspack/pull/633) [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b) Thanks [@sbhuiyan-atlassian](https://github.com/sbhuiyan-atlassian)! - Ported various HMR changes from Parcel
|
|
12
|
+
|
|
13
|
+
- [#648](https://github.com/atlassian-labs/atlaspack/pull/648) [`c8f7df4`](https://github.com/atlassian-labs/atlaspack/commit/c8f7df4eadfc4718040fceb065dae6e96a4051e7) Thanks [@alshdavid](https://github.com/alshdavid)! - Export ATLASPACK_VERSION and other internals
|
|
14
|
+
|
|
15
|
+
- [#626](https://github.com/atlassian-labs/atlaspack/pull/626) [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca) Thanks [@yamadapc](https://github.com/yamadapc)! - Clean-up tsconfig invalidation improvements feature-flag
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb), [`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
|
|
18
|
+
- @atlaspack/workers@2.14.13
|
|
19
|
+
- @atlaspack/logger@2.14.11
|
|
20
|
+
- @atlaspack/feature-flags@2.18.1
|
|
21
|
+
- @atlaspack/fs@2.15.8
|
|
22
|
+
- @atlaspack/package-manager@2.14.13
|
|
23
|
+
- @atlaspack/types@2.15.3
|
|
24
|
+
- @atlaspack/cache@3.2.8
|
|
25
|
+
- @atlaspack/utils@2.15.1
|
|
26
|
+
- @atlaspack/graph@3.5.3
|
|
27
|
+
- @atlaspack/plugin@2.14.13
|
|
28
|
+
- @atlaspack/profiler@2.14.11
|
|
29
|
+
|
|
3
30
|
## 2.18.3
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/lib/AssetGraph.js
CHANGED
|
@@ -443,6 +443,15 @@ class AssetGraph extends _graph().ContentGraph {
|
|
|
443
443
|
...depNode.value.meta,
|
|
444
444
|
...existing.value.resolverMeta
|
|
445
445
|
};
|
|
446
|
+
if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
|
|
447
|
+
depNode.value.resolverMeta = existing.value.resolverMeta;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
|
|
451
|
+
if ((existing === null || existing === void 0 ? void 0 : existing.type) === 'dependency' && existing.value.resolverPriority != null) {
|
|
452
|
+
depNode.value.priority = existing.value.resolverPriority;
|
|
453
|
+
depNode.value.resolverPriority = existing.value.resolverPriority;
|
|
454
|
+
}
|
|
446
455
|
}
|
|
447
456
|
let dependentAsset = dependentAssets.find(a => a.uniqueKey === dep.specifier);
|
|
448
457
|
if (dependentAsset) {
|
package/lib/RequestTracker.js
CHANGED
|
@@ -703,8 +703,7 @@ class RequestGraph extends _graph().ContentGraph {
|
|
|
703
703
|
//
|
|
704
704
|
// Currently create events can invalidate a large number of nodes due to
|
|
705
705
|
// "create above" invalidations.
|
|
706
|
-
|
|
707
|
-
if (configKeyNodes && isConfigKeyChange) {
|
|
706
|
+
if (configKeyNodes) {
|
|
708
707
|
for (let nodeId of configKeyNodes) {
|
|
709
708
|
let isInvalid = type === 'delete';
|
|
710
709
|
if (type !== 'delete') {
|
package/lib/index.js
CHANGED
|
@@ -4,13 +4,23 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
|
+
EnvironmentManager: true,
|
|
7
8
|
Atlaspack: true,
|
|
8
9
|
Parcel: true,
|
|
9
10
|
BuildError: true,
|
|
10
11
|
createWorkerFarm: true,
|
|
11
12
|
INTERNAL_RESOLVE: true,
|
|
12
|
-
INTERNAL_TRANSFORM: true
|
|
13
|
+
INTERNAL_TRANSFORM: true,
|
|
14
|
+
WORKER_PATH: true,
|
|
15
|
+
ATLASPACK_VERSION: true,
|
|
16
|
+
resolveOptions: true
|
|
13
17
|
};
|
|
18
|
+
Object.defineProperty(exports, "ATLASPACK_VERSION", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _constants.ATLASPACK_VERSION;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
14
24
|
Object.defineProperty(exports, "Atlaspack", {
|
|
15
25
|
enumerable: true,
|
|
16
26
|
get: function () {
|
|
@@ -23,6 +33,7 @@ Object.defineProperty(exports, "BuildError", {
|
|
|
23
33
|
return _Atlaspack.BuildError;
|
|
24
34
|
}
|
|
25
35
|
});
|
|
36
|
+
exports.EnvironmentManager = void 0;
|
|
26
37
|
Object.defineProperty(exports, "INTERNAL_RESOLVE", {
|
|
27
38
|
enumerable: true,
|
|
28
39
|
get: function () {
|
|
@@ -41,6 +52,12 @@ Object.defineProperty(exports, "Parcel", {
|
|
|
41
52
|
return _Atlaspack.default;
|
|
42
53
|
}
|
|
43
54
|
});
|
|
55
|
+
Object.defineProperty(exports, "WORKER_PATH", {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () {
|
|
58
|
+
return _Atlaspack.WORKER_PATH;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
44
61
|
Object.defineProperty(exports, "createWorkerFarm", {
|
|
45
62
|
enumerable: true,
|
|
46
63
|
get: function () {
|
|
@@ -53,7 +70,17 @@ Object.defineProperty(exports, "default", {
|
|
|
53
70
|
return _Atlaspack.default;
|
|
54
71
|
}
|
|
55
72
|
});
|
|
73
|
+
Object.defineProperty(exports, "resolveOptions", {
|
|
74
|
+
enumerable: true,
|
|
75
|
+
get: function () {
|
|
76
|
+
return _resolveOptions.default;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
var EnvironmentManager = _interopRequireWildcard(require("./EnvironmentManager"));
|
|
80
|
+
exports.EnvironmentManager = EnvironmentManager;
|
|
56
81
|
var _Atlaspack = _interopRequireWildcard(require("./Atlaspack"));
|
|
82
|
+
var _constants = require("./constants");
|
|
83
|
+
var _resolveOptions = _interopRequireDefault(require("./resolveOptions"));
|
|
57
84
|
var _atlaspackV = require("./atlaspack-v3");
|
|
58
85
|
Object.keys(_atlaspackV).forEach(function (key) {
|
|
59
86
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -66,5 +93,6 @@ Object.keys(_atlaspackV).forEach(function (key) {
|
|
|
66
93
|
}
|
|
67
94
|
});
|
|
68
95
|
});
|
|
96
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
69
97
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
70
98
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
package/lib/public/Config.js
CHANGED
|
@@ -28,13 +28,6 @@ function _utils() {
|
|
|
28
28
|
}
|
|
29
29
|
var _Environment = _interopRequireDefault(require("./Environment"));
|
|
30
30
|
var _projectPath = require("../projectPath");
|
|
31
|
-
function _featureFlags() {
|
|
32
|
-
const data = require("@atlaspack/feature-flags");
|
|
33
|
-
_featureFlags = function () {
|
|
34
|
-
return data;
|
|
35
|
-
};
|
|
36
|
-
return data;
|
|
37
|
-
}
|
|
38
31
|
var _EnvironmentManager = require("../EnvironmentManager");
|
|
39
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
40
33
|
const internalConfigToConfig = new (_utils().DefaultWeakMap)(() => new WeakMap());
|
|
@@ -284,7 +277,7 @@ class PublicConfig {
|
|
|
284
277
|
return this.#pkg;
|
|
285
278
|
}
|
|
286
279
|
let pkgConfig = await this.getConfig(['package.json'], {
|
|
287
|
-
readTracking:
|
|
280
|
+
readTracking: true
|
|
288
281
|
});
|
|
289
282
|
if (!pkgConfig) {
|
|
290
283
|
return null;
|
|
@@ -26,6 +26,13 @@ function _logger() {
|
|
|
26
26
|
};
|
|
27
27
|
return data;
|
|
28
28
|
}
|
|
29
|
+
function _featureFlags() {
|
|
30
|
+
const data = require("@atlaspack/feature-flags");
|
|
31
|
+
_featureFlags = function () {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
return data;
|
|
35
|
+
}
|
|
29
36
|
function _nullthrows() {
|
|
30
37
|
const data = _interopRequireDefault(require("nullthrows"));
|
|
31
38
|
_nullthrows = function () {
|
|
@@ -259,6 +266,9 @@ class ResolverRunner {
|
|
|
259
266
|
}
|
|
260
267
|
if (result.priority != null) {
|
|
261
268
|
dependency.priority = _types.Priority[result.priority];
|
|
269
|
+
if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
|
|
270
|
+
dependency.resolverPriority = dependency.priority;
|
|
271
|
+
}
|
|
262
272
|
}
|
|
263
273
|
if (result.invalidateOnEnvChange) {
|
|
264
274
|
invalidateOnEnvChange.push(...result.invalidateOnEnvChange);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/core",
|
|
3
|
-
"version": "2.18.
|
|
3
|
+
"version": "2.18.4",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,20 +23,20 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@mischnic/json-sourcemap": "^0.1.0",
|
|
25
25
|
"@atlaspack/build-cache": "2.13.3",
|
|
26
|
-
"@atlaspack/cache": "3.2.
|
|
26
|
+
"@atlaspack/cache": "3.2.8",
|
|
27
27
|
"@atlaspack/diagnostic": "2.14.1",
|
|
28
28
|
"@atlaspack/events": "2.14.1",
|
|
29
|
-
"@atlaspack/feature-flags": "2.18.
|
|
30
|
-
"@atlaspack/fs": "2.15.
|
|
31
|
-
"@atlaspack/graph": "3.5.
|
|
32
|
-
"@atlaspack/logger": "2.14.
|
|
33
|
-
"@atlaspack/package-manager": "2.14.
|
|
34
|
-
"@atlaspack/plugin": "2.14.
|
|
35
|
-
"@atlaspack/profiler": "2.14.
|
|
29
|
+
"@atlaspack/feature-flags": "2.18.1",
|
|
30
|
+
"@atlaspack/fs": "2.15.8",
|
|
31
|
+
"@atlaspack/graph": "3.5.3",
|
|
32
|
+
"@atlaspack/logger": "2.14.11",
|
|
33
|
+
"@atlaspack/package-manager": "2.14.13",
|
|
34
|
+
"@atlaspack/plugin": "2.14.13",
|
|
35
|
+
"@atlaspack/profiler": "2.14.11",
|
|
36
36
|
"@atlaspack/rust": "3.3.5",
|
|
37
|
-
"@atlaspack/types": "2.15.
|
|
38
|
-
"@atlaspack/utils": "2.15.
|
|
39
|
-
"@atlaspack/workers": "2.14.
|
|
37
|
+
"@atlaspack/types": "2.15.3",
|
|
38
|
+
"@atlaspack/utils": "2.15.1",
|
|
39
|
+
"@atlaspack/workers": "2.14.13",
|
|
40
40
|
"@parcel/source-map": "^2.1.1",
|
|
41
41
|
"base-x": "^3.0.8",
|
|
42
42
|
"browserslist": "^4.6.6",
|
|
@@ -56,17 +56,6 @@
|
|
|
56
56
|
"graphviz": "^0.0.9",
|
|
57
57
|
"tempy": "^0.2.1"
|
|
58
58
|
},
|
|
59
|
-
"exports": {
|
|
60
|
-
"./*": "./*",
|
|
61
|
-
".": {
|
|
62
|
-
"types": "./index.d.ts",
|
|
63
|
-
"default": "./lib/index.js"
|
|
64
|
-
},
|
|
65
|
-
"./worker": {
|
|
66
|
-
"@atlaspack::sources": "./src/worker.js",
|
|
67
|
-
"default": "./lib/worker.js"
|
|
68
|
-
}
|
|
69
|
-
},
|
|
70
59
|
"browser": {
|
|
71
60
|
"./src/serializerCore.js": "./src/serializerCore.browser.js"
|
|
72
61
|
},
|
package/src/AssetGraph.js
CHANGED
|
@@ -538,6 +538,19 @@ export default class AssetGraph extends ContentGraph<AssetGraphNode> {
|
|
|
538
538
|
...depNode.value.meta,
|
|
539
539
|
...existing.value.resolverMeta,
|
|
540
540
|
};
|
|
541
|
+
|
|
542
|
+
if (getFeatureFlag('hmrImprovements')) {
|
|
543
|
+
depNode.value.resolverMeta = existing.value.resolverMeta;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
if (getFeatureFlag('hmrImprovements')) {
|
|
547
|
+
if (
|
|
548
|
+
existing?.type === 'dependency' &&
|
|
549
|
+
existing.value.resolverPriority != null
|
|
550
|
+
) {
|
|
551
|
+
depNode.value.priority = existing.value.resolverPriority;
|
|
552
|
+
depNode.value.resolverPriority = existing.value.resolverPriority;
|
|
553
|
+
}
|
|
541
554
|
}
|
|
542
555
|
let dependentAsset = dependentAssets.find(
|
|
543
556
|
(a) => a.uniqueKey === dep.specifier,
|
package/src/RequestTracker.js
CHANGED
|
@@ -1123,11 +1123,7 @@ export class RequestGraph extends ContentGraph<
|
|
|
1123
1123
|
//
|
|
1124
1124
|
// Currently create events can invalidate a large number of nodes due to
|
|
1125
1125
|
// "create above" invalidations.
|
|
1126
|
-
|
|
1127
|
-
getFeatureFlag('granularTsConfigInvalidation') ||
|
|
1128
|
-
type === 'delete' ||
|
|
1129
|
-
type === 'update';
|
|
1130
|
-
if (configKeyNodes && isConfigKeyChange) {
|
|
1126
|
+
if (configKeyNodes) {
|
|
1131
1127
|
for (let nodeId of configKeyNodes) {
|
|
1132
1128
|
let isInvalid = type === 'delete';
|
|
1133
1129
|
|
package/src/index.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// @flow
|
|
2
|
+
import * as EnvironmentManager from './EnvironmentManager';
|
|
2
3
|
|
|
3
4
|
export {
|
|
4
5
|
default,
|
|
@@ -8,6 +9,9 @@ export {
|
|
|
8
9
|
createWorkerFarm,
|
|
9
10
|
INTERNAL_RESOLVE,
|
|
10
11
|
INTERNAL_TRANSFORM,
|
|
12
|
+
WORKER_PATH,
|
|
11
13
|
} from './Atlaspack';
|
|
12
|
-
|
|
14
|
+
export {ATLASPACK_VERSION} from './constants';
|
|
15
|
+
export {default as resolveOptions} from './resolveOptions';
|
|
13
16
|
export * from './atlaspack-v3';
|
|
17
|
+
export {EnvironmentManager};
|
package/src/public/Config.js
CHANGED
|
@@ -20,7 +20,6 @@ import {
|
|
|
20
20
|
} from '@atlaspack/utils';
|
|
21
21
|
import Environment from './Environment';
|
|
22
22
|
import {fromProjectPath, toProjectPath} from '../projectPath';
|
|
23
|
-
import {getFeatureFlag} from '@atlaspack/feature-flags';
|
|
24
23
|
import {fromEnvironmentId} from '../EnvironmentManager';
|
|
25
24
|
|
|
26
25
|
const internalConfigToConfig: DefaultWeakMap<
|
|
@@ -362,7 +361,7 @@ export default class PublicConfig implements IConfig {
|
|
|
362
361
|
}
|
|
363
362
|
|
|
364
363
|
let pkgConfig = await this.getConfig<PackageJSON>(['package.json'], {
|
|
365
|
-
readTracking:
|
|
364
|
+
readTracking: true,
|
|
366
365
|
});
|
|
367
366
|
if (!pkgConfig) {
|
|
368
367
|
return null;
|
|
@@ -24,6 +24,7 @@ import ThrowableDiagnostic, {
|
|
|
24
24
|
md,
|
|
25
25
|
} from '@atlaspack/diagnostic';
|
|
26
26
|
import {PluginLogger} from '@atlaspack/logger';
|
|
27
|
+
import {getFeatureFlag} from '@atlaspack/feature-flags';
|
|
27
28
|
import nullthrows from 'nullthrows';
|
|
28
29
|
import path from 'path';
|
|
29
30
|
import {normalizePath} from '@atlaspack/utils';
|
|
@@ -320,6 +321,9 @@ export class ResolverRunner {
|
|
|
320
321
|
|
|
321
322
|
if (result.priority != null) {
|
|
322
323
|
dependency.priority = Priority[result.priority];
|
|
324
|
+
if (getFeatureFlag('hmrImprovements')) {
|
|
325
|
+
dependency.resolverPriority = dependency.priority;
|
|
326
|
+
}
|
|
323
327
|
}
|
|
324
328
|
|
|
325
329
|
if (result.invalidateOnEnvChange) {
|
package/src/types.js
CHANGED