@atlaspack/runtime-react-refresh 2.14.5-canary.20 → 2.14.5-canary.200

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,229 @@
1
1
  # @atlaspack/runtime-react-refresh
2
2
 
3
+ ## 2.15.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
8
+
9
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
10
+ - @atlaspack/feature-flags@2.25.1
11
+ - @atlaspack/plugin@2.14.31
12
+ - @atlaspack/utils@2.19.3
13
+
14
+ ## 2.15.6
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [[`7a52bab`](https://github.com/atlassian-labs/atlaspack/commit/7a52bab6281e8edbfa66af248eb6f872c6b4b7bd), [`038e87a`](https://github.com/atlassian-labs/atlaspack/commit/038e87a7858d39556d59d3a2d17db534d45f62c6), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572), [`602f8ed`](https://github.com/atlassian-labs/atlaspack/commit/602f8ed9d8381301df8b2cc82c1d5cf6f2f94fec)]:
19
+ - @atlaspack/feature-flags@2.25.0
20
+ - @atlaspack/utils@2.19.2
21
+ - @atlaspack/plugin@2.14.30
22
+
23
+ ## 2.15.5
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [[`830261d`](https://github.com/atlassian-labs/atlaspack/commit/830261dcf4a40293090b61cab52fd75d5683c73f)]:
28
+ - @atlaspack/feature-flags@2.24.1
29
+ - @atlaspack/utils@2.19.1
30
+ - @atlaspack/plugin@2.14.29
31
+
32
+ ## 2.15.4
33
+
34
+ ### Patch Changes
35
+
36
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767), [`a5081c3`](https://github.com/atlassian-labs/atlaspack/commit/a5081c3f9207d28716ee4edd3841de1830ea4b80), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`f930003`](https://github.com/atlassian-labs/atlaspack/commit/f930003364fdc31e5487520ebe256f1a9389f579), [`8843980`](https://github.com/atlassian-labs/atlaspack/commit/88439807be20025fd3433380204ff1205079729e)]:
37
+ - @atlaspack/feature-flags@2.24.0
38
+ - @atlaspack/utils@2.19.0
39
+ - @atlaspack/plugin@2.14.28
40
+
41
+ ## 2.15.3
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
46
+ - @atlaspack/feature-flags@2.23.2
47
+ - @atlaspack/utils@2.18.4
48
+ - @atlaspack/plugin@2.14.27
49
+
50
+ ## 2.15.2
51
+
52
+ ### Patch Changes
53
+
54
+ - [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
55
+
56
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
57
+ - @atlaspack/feature-flags@2.23.1
58
+ - @atlaspack/plugin@2.14.26
59
+ - @atlaspack/utils@2.18.3
60
+
61
+ ## 2.15.1
62
+
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [[`f6b3f22`](https://github.com/atlassian-labs/atlaspack/commit/f6b3f2276c7e417580b49c4879563aab51f156b1)]:
66
+ - @atlaspack/feature-flags@2.23.0
67
+ - @atlaspack/utils@2.18.2
68
+ - @atlaspack/plugin@2.14.25
69
+
70
+ ## 2.15.0
71
+
72
+ ### Minor Changes
73
+
74
+ - [#732](https://github.com/atlassian-labs/atlaspack/pull/732) [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45) Thanks [@vykimnguyen](https://github.com/vykimnguyen)! - add tesseract context
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [[`73dd7ba`](https://github.com/atlassian-labs/atlaspack/commit/73dd7baab69456ef2f6e4a0cc7dbb04f407eb148)]:
79
+ - @atlaspack/feature-flags@2.22.0
80
+ - @atlaspack/utils@2.18.1
81
+ - @atlaspack/plugin@2.14.24
82
+
83
+ ## 2.14.23
84
+
85
+ ### Patch Changes
86
+
87
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
88
+ - @atlaspack/feature-flags@2.21.0
89
+ - @atlaspack/utils@2.18.0
90
+ - @atlaspack/plugin@2.14.23
91
+
92
+ ## 2.14.22
93
+
94
+ ### Patch Changes
95
+
96
+ - [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
97
+
98
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94), [`12bee0e`](https://github.com/atlassian-labs/atlaspack/commit/12bee0e23f0464d7f6bd3e24fbe0d19c126d587d)]:
99
+ - @atlaspack/feature-flags@2.20.1
100
+ - @atlaspack/plugin@2.14.22
101
+ - @atlaspack/utils@2.17.4
102
+
103
+ ## 2.14.21
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`069de47`](https://github.com/atlassian-labs/atlaspack/commit/069de478e64fb5889f6f2ce023eb510782767fbd)]:
108
+ - @atlaspack/feature-flags@2.20.0
109
+ - @atlaspack/utils@2.17.3
110
+ - @atlaspack/plugin@2.14.21
111
+
112
+ ## 2.14.20
113
+
114
+ ### Patch Changes
115
+
116
+ - [#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
117
+
118
+ - 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)]:
119
+ - @atlaspack/plugin@2.14.20
120
+ - @atlaspack/feature-flags@2.19.2
121
+ - @atlaspack/utils@2.17.2
122
+
123
+ ## 2.14.19
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [[`13aef17`](https://github.com/atlassian-labs/atlaspack/commit/13aef177eea289a6e40d2113b5ec1ac9be18a33d)]:
128
+ - @atlaspack/feature-flags@2.19.1
129
+ - @atlaspack/utils@2.17.1
130
+ - @atlaspack/plugin@2.14.19
131
+
132
+ ## 2.14.18
133
+
134
+ ### Patch Changes
135
+
136
+ - 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)]:
137
+ - @atlaspack/feature-flags@2.19.0
138
+ - @atlaspack/utils@2.17.0
139
+ - @atlaspack/plugin@2.14.18
140
+
141
+ ## 2.14.17
142
+
143
+ ### Patch Changes
144
+
145
+ - Updated dependencies []:
146
+ - @atlaspack/utils@2.16.1
147
+ - @atlaspack/plugin@2.14.17
148
+
149
+ ## 2.14.16
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [[`e8a60ff`](https://github.com/atlassian-labs/atlaspack/commit/e8a60ffbea41caef265786bbf73349771760081c), [`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
154
+ - @atlaspack/feature-flags@2.18.4
155
+ - @atlaspack/utils@2.16.0
156
+ - @atlaspack/plugin@2.14.16
157
+
158
+ ## 2.14.15
159
+
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [[`5ded263`](https://github.com/atlassian-labs/atlaspack/commit/5ded263c7f11b866e8885b81c73e20dd060b25be)]:
163
+ - @atlaspack/feature-flags@2.18.3
164
+ - @atlaspack/utils@2.15.3
165
+ - @atlaspack/plugin@2.14.15
166
+
167
+ ## 2.14.14
168
+
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies [[`644b157`](https://github.com/atlassian-labs/atlaspack/commit/644b157dee72a871acc2d0facf0b87b8eea51956)]:
172
+ - @atlaspack/feature-flags@2.18.2
173
+ - @atlaspack/utils@2.15.2
174
+ - @atlaspack/plugin@2.14.14
175
+
176
+ ## 2.14.13
177
+
178
+ ### Patch Changes
179
+
180
+ - [#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
181
+
182
+ - Updated dependencies [[`26aa9c5`](https://github.com/atlassian-labs/atlaspack/commit/26aa9c599d2be45ce1438a74c5fa22f39b9b554b), [`0501255`](https://github.com/atlassian-labs/atlaspack/commit/05012550da35b05ce7d356a8cc29311e7f9afdca)]:
183
+ - @atlaspack/feature-flags@2.18.1
184
+ - @atlaspack/utils@2.15.1
185
+ - @atlaspack/plugin@2.14.13
186
+
187
+ ## 2.14.12
188
+
189
+ ### Patch Changes
190
+
191
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
192
+ - @atlaspack/utils@2.15.0
193
+ - @atlaspack/plugin@2.14.12
194
+
195
+ ## 2.14.11
196
+
197
+ ### Patch Changes
198
+
199
+ - Updated dependencies []:
200
+ - @atlaspack/utils@2.14.11
201
+ - @atlaspack/plugin@2.14.11
202
+
203
+ ## 2.14.10
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies []:
208
+ - @atlaspack/plugin@2.14.10
209
+ - @atlaspack/utils@2.14.10
210
+
211
+ ## 2.14.9
212
+
213
+ ### Patch Changes
214
+
215
+ - Updated dependencies []:
216
+ - @atlaspack/utils@2.14.9
217
+ - @atlaspack/plugin@2.14.9
218
+
219
+ ## 2.14.8
220
+
221
+ ### Patch Changes
222
+
223
+ - Updated dependencies []:
224
+ - @atlaspack/utils@2.14.8
225
+ - @atlaspack/plugin@2.14.8
226
+
3
227
  ## 2.14.7
4
228
 
5
229
  ### Patch Changes
@@ -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,7 +57,13 @@ var _default = exports.default = new (_plugin().Runtime)({
51
57
  bundle,
52
58
  options
53
59
  }) {
54
- 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') {
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
+ }
66
+ if (bundle.type !== 'js' || !options.hmrOptions || !bundle.env.isBrowser() || bundle.env.isLibrary || bundle.env.isWorker() || bundle.env.isTesseract() || bundle.env.isWorklet() || options.mode !== 'development' || bundle.env.sourceType !== 'module') {
55
67
  return;
56
68
  }
57
69
  let entries = bundle.getEntryAssets();
@@ -0,0 +1,3 @@
1
+ import { Runtime } from '@atlaspack/plugin';
2
+ declare const _default: Runtime<unknown>;
3
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/runtime-react-refresh",
3
- "version": "2.14.5-canary.20+30f60175b",
3
+ "version": "2.14.5-canary.200+10ee3fa5b",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,17 +9,23 @@
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/types/ReactRefreshRuntime.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/plugin": "2.14.5-canary.20+30f60175b",
19
- "@atlaspack/utils": "2.14.5-canary.20+30f60175b",
19
+ "@atlaspack/feature-flags": "2.14.1-canary.268+10ee3fa5b",
20
+ "@atlaspack/plugin": "2.14.5-canary.200+10ee3fa5b",
21
+ "@atlaspack/utils": "2.14.5-canary.200+10ee3fa5b",
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": "30f60175ba4d272c5fc193973c63bc298584775b"
25
- }
26
+ "scripts": {
27
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src",
28
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
29
+ },
30
+ "gitHead": "10ee3fa5b75a92acde8973673d9b3c5b6f3958e5"
31
+ }
@@ -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,14 +30,22 @@ 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 ||
40
45
  !bundle.env.isBrowser() ||
41
46
  bundle.env.isLibrary ||
42
47
  bundle.env.isWorker() ||
48
+ bundle.env.isTesseract() ||
43
49
  bundle.env.isWorklet() ||
44
50
  options.mode !== 'development' ||
45
51
  bundle.env.sourceType !== 'module'
@@ -69,4 +75,4 @@ export default (new Runtime({
69
75
  }
70
76
  }
71
77
  },
72
- }): Runtime);
78
+ }) as Runtime<unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }