@atlaspack/runtime-browser-hmr 2.14.5-canary.21 → 2.14.5-canary.210

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,215 @@
1
1
  # @atlaspack/runtime-browser-hmr
2
2
 
3
+ ## 2.14.32
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1180103`](https://github.com/atlassian-labs/atlaspack/commit/118010351ed444f8178988afb3f77807154dd933)]:
8
+ - @atlaspack/utils@3.0.0
9
+ - @atlaspack/plugin@2.14.32
10
+
11
+ ## 2.14.31
12
+
13
+ ### Patch Changes
14
+
15
+ - [#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.
16
+
17
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
18
+ - @atlaspack/plugin@2.14.31
19
+ - @atlaspack/utils@2.19.3
20
+
21
+ ## 2.14.30
22
+
23
+ ### Patch Changes
24
+
25
+ - Updated dependencies []:
26
+ - @atlaspack/utils@2.19.2
27
+ - @atlaspack/plugin@2.14.30
28
+
29
+ ## 2.14.29
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies []:
34
+ - @atlaspack/utils@2.19.1
35
+ - @atlaspack/plugin@2.14.29
36
+
37
+ ## 2.14.28
38
+
39
+ ### Patch Changes
40
+
41
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
42
+ - @atlaspack/utils@2.19.0
43
+ - @atlaspack/plugin@2.14.28
44
+
45
+ ## 2.14.27
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies []:
50
+ - @atlaspack/utils@2.18.4
51
+ - @atlaspack/plugin@2.14.27
52
+
53
+ ## 2.14.26
54
+
55
+ ### Patch Changes
56
+
57
+ - [#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
58
+
59
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
60
+ - @atlaspack/plugin@2.14.26
61
+ - @atlaspack/utils@2.18.3
62
+
63
+ ## 2.14.25
64
+
65
+ ### Patch Changes
66
+
67
+ - Updated dependencies []:
68
+ - @atlaspack/utils@2.18.2
69
+ - @atlaspack/plugin@2.14.25
70
+
71
+ ## 2.14.24
72
+
73
+ ### Patch Changes
74
+
75
+ - Updated dependencies []:
76
+ - @atlaspack/utils@2.18.1
77
+ - @atlaspack/plugin@2.14.24
78
+
79
+ ## 2.14.23
80
+
81
+ ### Patch Changes
82
+
83
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
84
+ - @atlaspack/utils@2.18.0
85
+ - @atlaspack/plugin@2.14.23
86
+
87
+ ## 2.14.22
88
+
89
+ ### Patch Changes
90
+
91
+ - [#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
92
+
93
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
94
+ - @atlaspack/plugin@2.14.22
95
+ - @atlaspack/utils@2.17.4
96
+
97
+ ## 2.14.21
98
+
99
+ ### Patch Changes
100
+
101
+ - Updated dependencies []:
102
+ - @atlaspack/utils@2.17.3
103
+ - @atlaspack/plugin@2.14.21
104
+
105
+ ## 2.14.20
106
+
107
+ ### Patch Changes
108
+
109
+ - [#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
110
+
111
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
112
+ - @atlaspack/plugin@2.14.20
113
+ - @atlaspack/utils@2.17.2
114
+
115
+ ## 2.14.19
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies []:
120
+ - @atlaspack/utils@2.17.1
121
+ - @atlaspack/plugin@2.14.19
122
+
123
+ ## 2.14.18
124
+
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [[`dbb4072`](https://github.com/atlassian-labs/atlaspack/commit/dbb40721ebeb45990a14ba04e6b44e7f836fb32d), [`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)]:
128
+ - @atlaspack/utils@2.17.0
129
+ - @atlaspack/plugin@2.14.18
130
+
131
+ ## 2.14.17
132
+
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies []:
136
+ - @atlaspack/utils@2.16.1
137
+ - @atlaspack/plugin@2.14.17
138
+
139
+ ## 2.14.16
140
+
141
+ ### Patch Changes
142
+
143
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
144
+ - @atlaspack/utils@2.16.0
145
+ - @atlaspack/plugin@2.14.16
146
+
147
+ ## 2.14.15
148
+
149
+ ### Patch Changes
150
+
151
+ - Updated dependencies []:
152
+ - @atlaspack/utils@2.15.3
153
+ - @atlaspack/plugin@2.14.15
154
+
155
+ ## 2.14.14
156
+
157
+ ### Patch Changes
158
+
159
+ - Updated dependencies []:
160
+ - @atlaspack/utils@2.15.2
161
+ - @atlaspack/plugin@2.14.14
162
+
163
+ ## 2.14.13
164
+
165
+ ### Patch Changes
166
+
167
+ - [#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
168
+
169
+ - Updated dependencies []:
170
+ - @atlaspack/utils@2.15.1
171
+ - @atlaspack/plugin@2.14.13
172
+
173
+ ## 2.14.12
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
178
+ - @atlaspack/utils@2.15.0
179
+ - @atlaspack/plugin@2.14.12
180
+
181
+ ## 2.14.11
182
+
183
+ ### Patch Changes
184
+
185
+ - Updated dependencies []:
186
+ - @atlaspack/utils@2.14.11
187
+ - @atlaspack/plugin@2.14.11
188
+
189
+ ## 2.14.10
190
+
191
+ ### Patch Changes
192
+
193
+ - Updated dependencies []:
194
+ - @atlaspack/plugin@2.14.10
195
+ - @atlaspack/utils@2.14.10
196
+
197
+ ## 2.14.9
198
+
199
+ ### Patch Changes
200
+
201
+ - Updated dependencies []:
202
+ - @atlaspack/utils@2.14.9
203
+ - @atlaspack/plugin@2.14.9
204
+
205
+ ## 2.14.8
206
+
207
+ ### Patch Changes
208
+
209
+ - Updated dependencies []:
210
+ - @atlaspack/utils@2.14.8
211
+ - @atlaspack/plugin@2.14.8
212
+
3
213
  ## 2.14.7
4
214
 
5
215
  ### Patch Changes
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const plugin_1 = require("@atlaspack/plugin");
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const path_1 = __importDefault(require("path"));
9
+ // Without this, the hmr-runtime.js is transpiled with the React Refresh swc transform because it
10
+ // lives in `/app/packages/runtimes/...` and thus the `config` in the JSTransformer is actually the
11
+ // user's package.json, and hmr-runtime.js is transpiled as a JSX asset.
12
+ const FILENAME =
13
+ // @ts-expect-error TS2339
14
+ process.env.ATLASPACK_BUILD_REPL && process.browser
15
+ ? '/' + __filename
16
+ : __filename;
17
+ const HMR_RUNTIME = process.env.ATLASPACK_REGISTER_USE_SRC === 'true'
18
+ ? fs_1.default.readFileSync(path_1.default.join(__dirname, './loaders/hmr-runtime.ts'), 'utf8')
19
+ : fs_1.default.readFileSync(path_1.default.join(__dirname, './loaders/hmr-runtime.js'), 'utf8');
20
+ exports.default = new plugin_1.Runtime({
21
+ apply({ bundle, options }) {
22
+ if (bundle.type !== 'js' ||
23
+ !options.hmrOptions ||
24
+ bundle.env.isLibrary ||
25
+ bundle.env.isWorklet() ||
26
+ bundle.env.sourceType === 'script') {
27
+ return;
28
+ }
29
+ const { host, port } = options.hmrOptions;
30
+ return {
31
+ filePath: FILENAME,
32
+ code: `var HMR_HOST = ${JSON.stringify(host != null && host !== '0.0.0.0' ? host : null)};` +
33
+ `var HMR_PORT = ${JSON.stringify(port != null &&
34
+ // Default to the HTTP port in the browser, only override
35
+ // in watch mode or if hmr port != serve port
36
+ (!options.serveOptions || options.serveOptions.port !== port)
37
+ ? port
38
+ : null)};` +
39
+ `var HMR_SECURE = ${JSON.stringify(!!(options.serveOptions && options.serveOptions.https))};` +
40
+ `var HMR_ENV_HASH = "${bundle.env.id}";` +
41
+ `var HMR_USE_SSE = ${JSON.stringify(
42
+ // @ts-expect-error TS2339
43
+ !!(process.env.ATLASPACK_BUILD_REPL && process.browser))};` +
44
+ `module.bundle.HMR_BUNDLE_ID = ${JSON.stringify(bundle.id)};` +
45
+ HMR_RUNTIME,
46
+ isEntry: true,
47
+ env: {
48
+ sourceType: 'module',
49
+ },
50
+ };
51
+ },
52
+ });