@atlaspack/runtime-react-refresh 2.14.5-canary.9 → 2.14.5-canary.91

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 CHANGED
@@ -1,5 +1,80 @@
1
1
  # @atlaspack/runtime-react-refresh
2
2
 
3
+ ## 2.14.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#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
8
+
9
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
10
+ - @atlaspack/feature-flags@2.18.1
11
+ - @atlaspack/utils@2.15.1
12
+ - @atlaspack/plugin@2.14.13
13
+
14
+ ## 2.14.12
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
19
+ - @atlaspack/utils@2.15.0
20
+ - @atlaspack/plugin@2.14.12
21
+
22
+ ## 2.14.11
23
+
24
+ ### Patch Changes
25
+
26
+ - Updated dependencies []:
27
+ - @atlaspack/utils@2.14.11
28
+ - @atlaspack/plugin@2.14.11
29
+
30
+ ## 2.14.10
31
+
32
+ ### Patch Changes
33
+
34
+ - Updated dependencies []:
35
+ - @atlaspack/plugin@2.14.10
36
+ - @atlaspack/utils@2.14.10
37
+
38
+ ## 2.14.9
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies []:
43
+ - @atlaspack/utils@2.14.9
44
+ - @atlaspack/plugin@2.14.9
45
+
46
+ ## 2.14.8
47
+
48
+ ### Patch Changes
49
+
50
+ - Updated dependencies []:
51
+ - @atlaspack/utils@2.14.8
52
+ - @atlaspack/plugin@2.14.8
53
+
54
+ ## 2.14.7
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies []:
59
+ - @atlaspack/utils@2.14.7
60
+ - @atlaspack/plugin@2.14.7
61
+
62
+ ## 2.14.6
63
+
64
+ ### Patch Changes
65
+
66
+ - Updated dependencies []:
67
+ - @atlaspack/utils@2.14.6
68
+ - @atlaspack/plugin@2.14.6
69
+
70
+ ## 2.14.5
71
+
72
+ ### Patch Changes
73
+
74
+ - Updated dependencies []:
75
+ - @atlaspack/utils@2.14.5
76
+ - @atlaspack/plugin@2.14.5
77
+
3
78
  ## 2.14.4
4
79
 
5
80
  ### 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-canary.9+4c1714103",
3
+ "version": "2.14.5-canary.91+644b157de",
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/plugin": "2.14.5-canary.9+4c1714103",
19
- "@atlaspack/utils": "2.14.5-canary.9+4c1714103",
18
+ "@atlaspack/feature-flags": "2.14.1-canary.159+644b157de",
19
+ "@atlaspack/plugin": "2.14.5-canary.91+644b157de",
20
+ "@atlaspack/utils": "2.14.5-canary.91+644b157de",
20
21
  "react-error-overlay": "6.0.9",
21
- "react-refresh": ">=0.9 <=0.14"
22
+ "react-refresh": ">=0.9 <=0.16"
22
23
  },
23
24
  "type": "commonjs",
24
- "gitHead": "4c1714103dab2aa9039c488f381551d2b65d1d01"
25
+ "gitHead": "644b157dee72a871acc2d0facf0b87b8eea51956"
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 ||