@atlaspack/runtime-react-refresh 2.14.5-canary.14 → 2.14.5-canary.140

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,145 @@
1
1
  # @atlaspack/runtime-react-refresh
2
2
 
3
+ ## 2.14.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
8
+ - @atlaspack/feature-flags@2.20.0
9
+ - @atlaspack/utils@2.17.3
10
+ - @atlaspack/plugin@2.14.21
11
+
12
+ ## 2.14.20
13
+
14
+ ### Patch Changes
15
+
16
+ - [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
17
+
18
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa), [`1c7865a`](https://github.com/atlassian-labs/atlaspack/commit/1c7865a64451116d94015e248302435839d347c0), [`a0b959f`](https://github.com/atlassian-labs/atlaspack/commit/a0b959fbf61fc3f820ff03c7e8988945fe40a91a)]:
19
+ - @atlaspack/plugin@2.14.20
20
+ - @atlaspack/feature-flags@2.19.2
21
+ - @atlaspack/utils@2.17.2
22
+
23
+ ## 2.14.19
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
28
+ - @atlaspack/feature-flags@2.19.1
29
+ - @atlaspack/utils@2.17.1
30
+ - @atlaspack/plugin@2.14.19
31
+
32
+ ## 2.14.18
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`c4415a4`](https://github.com/atlassian-labs/atlaspack/commit/c4415a455543d984ca28452c2cb87a794d22497c), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5), [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3), [`18a57cf`](https://github.com/atlassian-labs/atlaspack/commit/18a57cf8a4789b2de5ad8e2676f317a26cc91417), [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56)]:
37
+ - @atlaspack/feature-flags@2.19.0
38
+ - @atlaspack/utils@2.17.0
39
+ - @atlaspack/plugin@2.14.18
40
+
41
+ ## 2.14.17
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies []:
46
+ - @atlaspack/utils@2.16.1
47
+ - @atlaspack/plugin@2.14.17
48
+
49
+ ## 2.14.16
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
54
+ - @atlaspack/feature-flags@2.18.4
55
+ - @atlaspack/utils@2.16.0
56
+ - @atlaspack/plugin@2.14.16
57
+
58
+ ## 2.14.15
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
63
+ - @atlaspack/feature-flags@2.18.3
64
+ - @atlaspack/utils@2.15.3
65
+ - @atlaspack/plugin@2.14.15
66
+
67
+ ## 2.14.14
68
+
69
+ ### Patch Changes
70
+
71
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
72
+ - @atlaspack/feature-flags@2.18.2
73
+ - @atlaspack/utils@2.15.2
74
+ - @atlaspack/plugin@2.14.14
75
+
76
+ ## 2.14.13
77
+
78
+ ### Patch Changes
79
+
80
+ - [#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
81
+
82
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
83
+ - @atlaspack/feature-flags@2.18.1
84
+ - @atlaspack/utils@2.15.1
85
+ - @atlaspack/plugin@2.14.13
86
+
87
+ ## 2.14.12
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
92
+ - @atlaspack/utils@2.15.0
93
+ - @atlaspack/plugin@2.14.12
94
+
95
+ ## 2.14.11
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies []:
100
+ - @atlaspack/utils@2.14.11
101
+ - @atlaspack/plugin@2.14.11
102
+
103
+ ## 2.14.10
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies []:
108
+ - @atlaspack/plugin@2.14.10
109
+ - @atlaspack/utils@2.14.10
110
+
111
+ ## 2.14.9
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies []:
116
+ - @atlaspack/utils@2.14.9
117
+ - @atlaspack/plugin@2.14.9
118
+
119
+ ## 2.14.8
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies []:
124
+ - @atlaspack/utils@2.14.8
125
+ - @atlaspack/plugin@2.14.8
126
+
127
+ ## 2.14.7
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies []:
132
+ - @atlaspack/utils@2.14.7
133
+ - @atlaspack/plugin@2.14.7
134
+
135
+ ## 2.14.6
136
+
137
+ ### Patch Changes
138
+
139
+ - Updated dependencies []:
140
+ - @atlaspack/utils@2.14.6
141
+ - @atlaspack/plugin@2.14.6
142
+
3
143
  ## 2.14.5
4
144
 
5
145
  ### Patch Changes
@@ -0,0 +1,3 @@
1
+ import { Runtime } from '@atlaspack/plugin';
2
+ declare const _default: Runtime<unknown>;
3
+ export default _default;
@@ -19,7 +19,13 @@ function _utils() {
19
19
  return data;
20
20
  }
21
21
  var _package = require("react-refresh/package.json");
22
- // $FlowFixMe Package json is untyped
22
+ function _featureFlags() {
23
+ const data = require("@atlaspack/feature-flags");
24
+ _featureFlags = function () {
25
+ return data;
26
+ };
27
+ return data;
28
+ }
23
29
  const CODE = `
24
30
  var Refresh = require('react-refresh/runtime');
25
31
  var ErrorOverlay = require('react-error-overlay');
@@ -51,6 +57,12 @@ var _default = exports.default = new (_plugin().Runtime)({
51
57
  bundle,
52
58
  options
53
59
  }) {
60
+ if ((0, _featureFlags().getFeatureFlag)('hmrImprovements')) {
61
+ // Note for https://jplat.atlassian.net/browse/JFP-3539:
62
+ // When cleaning up this feature flag, delete the entire
63
+ // @atlaspack/runtime-react-refresh package and remove all references to it
64
+ return;
65
+ }
54
66
  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
67
  return;
56
68
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/runtime-react-refresh",
3
- "version": "2.14.5-canary.14+267b0d591",
3
+ "version": "2.14.5-canary.140+43fdd2238",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,17 +9,22 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/ReactRefreshRuntime.js",
13
- "source": "src/ReactRefreshRuntime.js",
12
+ "main": "./lib/ReactRefreshRuntime.js",
13
+ "source": "./src/ReactRefreshRuntime.ts",
14
+ "types": "./lib/ReactRefreshRuntime.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.14+267b0d591",
19
- "@atlaspack/utils": "2.14.5-canary.14+267b0d591",
19
+ "@atlaspack/feature-flags": "2.14.1-canary.208+43fdd2238",
20
+ "@atlaspack/plugin": "2.14.5-canary.140+43fdd2238",
21
+ "@atlaspack/utils": "2.14.5-canary.140+43fdd2238",
20
22
  "react-error-overlay": "6.0.9",
21
- "react-refresh": ">=0.9 <=0.14"
23
+ "react-refresh": ">=0.9 <=0.16"
22
24
  },
23
25
  "type": "commonjs",
24
- "gitHead": "267b0d59131c00e4cd1526bbf87aa84b9c8fd411"
25
- }
26
+ "scripts": {
27
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src"
28
+ },
29
+ "gitHead": "43fdd223860fbc97af17d68c65419b97412cb888"
30
+ }
@@ -1,9 +1,7 @@
1
- // @flow strict-local
2
-
3
1
  import {Runtime} from '@atlaspack/plugin';
4
2
  import {loadConfig} from '@atlaspack/utils';
5
- // $FlowFixMe Package json is untyped
6
3
  import {version} from 'react-refresh/package.json';
4
+ import {getFeatureFlag} from '@atlaspack/feature-flags';
7
5
 
8
6
  const CODE = `
9
7
  var Refresh = require('react-refresh/runtime');
@@ -32,8 +30,15 @@ window.addEventListener('parcelhmraccept', () => {
32
30
  });
33
31
  `;
34
32
 
35
- export default (new Runtime({
33
+ export default new Runtime({
36
34
  async apply({bundle, options}) {
35
+ if (getFeatureFlag('hmrImprovements')) {
36
+ // Note for https://jplat.atlassian.net/browse/JFP-3539:
37
+ // When cleaning up this feature flag, delete the entire
38
+ // @atlaspack/runtime-react-refresh package and remove all references to it
39
+ return;
40
+ }
41
+
37
42
  if (
38
43
  bundle.type !== 'js' ||
39
44
  !options.hmrOptions ||
@@ -69,4 +74,4 @@ export default (new Runtime({
69
74
  }
70
75
  }
71
76
  },
72
- }): Runtime);
77
+ }) as Runtime<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }