@atlaspack/runtime-react-refresh 2.14.5-dev.73 → 2.14.5-dev.95
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 +28 -0
- package/lib/ReactRefreshRuntime.js +13 -0
- package/package.json +6 -5
- package/src/ReactRefreshRuntime.js +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @atlaspack/runtime-react-refresh
|
|
2
2
|
|
|
3
|
+
## 2.14.14
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
|
|
8
|
+
- @atlaspack/feature-flags@2.18.2
|
|
9
|
+
- @atlaspack/utils@2.15.2
|
|
10
|
+
- @atlaspack/plugin@2.14.14
|
|
11
|
+
|
|
12
|
+
## 2.14.13
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- [#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
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
|
|
19
|
+
- @atlaspack/feature-flags@2.18.1
|
|
20
|
+
- @atlaspack/utils@2.15.1
|
|
21
|
+
- @atlaspack/plugin@2.14.13
|
|
22
|
+
|
|
23
|
+
## 2.14.12
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
|
|
28
|
+
- @atlaspack/utils@2.15.0
|
|
29
|
+
- @atlaspack/plugin@2.14.12
|
|
30
|
+
|
|
3
31
|
## 2.14.11
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
|
@@ -19,6 +19,13 @@ function _utils() {
|
|
|
19
19
|
return data;
|
|
20
20
|
}
|
|
21
21
|
var _package = require("react-refresh/package.json");
|
|
22
|
+
function _featureFlags() {
|
|
23
|
+
const data = require("@atlaspack/feature-flags");
|
|
24
|
+
_featureFlags = function () {
|
|
25
|
+
return data;
|
|
26
|
+
};
|
|
27
|
+
return data;
|
|
28
|
+
}
|
|
22
29
|
// $FlowFixMe Package json is untyped
|
|
23
30
|
const CODE = `
|
|
24
31
|
var Refresh = require('react-refresh/runtime');
|
|
@@ -51,6 +58,12 @@ var _default = exports.default = new (_plugin().Runtime)({
|
|
|
51
58
|
bundle,
|
|
52
59
|
options
|
|
53
60
|
}) {
|
|
61
|
+
if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
|
|
62
|
+
// Note for https://jplat.atlassian.net/browse/JFP-3539:
|
|
63
|
+
// When cleaning up this feature flag, delete the entire
|
|
64
|
+
// @atlaspack/runtime-react-refresh package and remove all references to it
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
54
67
|
if (bundle.type !== 'js' || !options.hmrOptions || !bundle.env.isBrowser() || bundle.env.isLibrary || bundle.env.isWorker() || bundle.env.isWorklet() || options.mode !== 'development' || bundle.env.sourceType !== 'module') {
|
|
55
68
|
return;
|
|
56
69
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/runtime-react-refresh",
|
|
3
|
-
"version": "2.14.5-dev.
|
|
3
|
+
"version": "2.14.5-dev.95+d8e35a83e",
|
|
4
4
|
"license": "(MIT OR Apache-2.0)",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
"node": ">= 16.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@atlaspack/
|
|
19
|
-
"@atlaspack/
|
|
18
|
+
"@atlaspack/feature-flags": "2.14.1-dev.163+d8e35a83e",
|
|
19
|
+
"@atlaspack/plugin": "2.14.5-dev.95+d8e35a83e",
|
|
20
|
+
"@atlaspack/utils": "2.14.5-dev.95+d8e35a83e",
|
|
20
21
|
"react-error-overlay": "6.0.9",
|
|
21
|
-
"react-refresh": ">=0.9 <=0.
|
|
22
|
+
"react-refresh": ">=0.9 <=0.16"
|
|
22
23
|
},
|
|
23
24
|
"type": "commonjs",
|
|
24
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "d8e35a83e480e0811b63a319e88ffe9a2cd509e6"
|
|
25
26
|
}
|
|
@@ -4,6 +4,7 @@ import {Runtime} from '@atlaspack/plugin';
|
|
|
4
4
|
import {loadConfig} from '@atlaspack/utils';
|
|
5
5
|
// $FlowFixMe Package json is untyped
|
|
6
6
|
import {version} from 'react-refresh/package.json';
|
|
7
|
+
import {getFeatureFlag} from '@atlaspack/feature-flags';
|
|
7
8
|
|
|
8
9
|
const CODE = `
|
|
9
10
|
var Refresh = require('react-refresh/runtime');
|
|
@@ -34,6 +35,13 @@ window.addEventListener('parcelhmraccept', () => {
|
|
|
34
35
|
|
|
35
36
|
export default (new Runtime({
|
|
36
37
|
async apply({bundle, options}) {
|
|
38
|
+
if (getFeatureFlag('hmrImprovements')) {
|
|
39
|
+
// Note for https://jplat.atlassian.net/browse/JFP-3539:
|
|
40
|
+
// When cleaning up this feature flag, delete the entire
|
|
41
|
+
// @atlaspack/runtime-react-refresh package and remove all references to it
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
37
45
|
if (
|
|
38
46
|
bundle.type !== 'js' ||
|
|
39
47
|
!options.hmrOptions ||
|