@atlaspack/bundler-library 2.12.7-canary.49 → 2.12.7-canary.490

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,398 @@
1
1
  # @atlaspack/bundler-library
2
2
 
3
+ ## 2.12.65
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/plugin@2.14.63
9
+
10
+ ## 2.12.64
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies []:
15
+ - @atlaspack/plugin@2.14.62
16
+
17
+ ## 2.12.63
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies []:
22
+ - @atlaspack/plugin@2.14.61
23
+
24
+ ## 2.12.62
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies []:
29
+ - @atlaspack/plugin@2.14.60
30
+
31
+ ## 2.12.61
32
+
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies []:
36
+ - @atlaspack/plugin@2.14.59
37
+
38
+ ## 2.12.60
39
+
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies []:
43
+ - @atlaspack/plugin@2.14.58
44
+
45
+ ## 2.12.59
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies []:
50
+ - @atlaspack/plugin@2.14.57
51
+
52
+ ## 2.12.58
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies []:
57
+ - @atlaspack/plugin@2.14.56
58
+
59
+ ## 2.12.57
60
+
61
+ ### Patch Changes
62
+
63
+ - Updated dependencies []:
64
+ - @atlaspack/plugin@2.14.55
65
+
66
+ ## 2.12.56
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies []:
71
+ - @atlaspack/plugin@2.14.54
72
+
73
+ ## 2.12.55
74
+
75
+ ### Patch Changes
76
+
77
+ - Updated dependencies []:
78
+ - @atlaspack/plugin@2.14.53
79
+
80
+ ## 2.12.54
81
+
82
+ ### Patch Changes
83
+
84
+ - Updated dependencies []:
85
+ - @atlaspack/plugin@2.14.52
86
+
87
+ ## 2.12.53
88
+
89
+ ### Patch Changes
90
+
91
+ - Updated dependencies []:
92
+ - @atlaspack/plugin@2.14.51
93
+
94
+ ## 2.12.52
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies []:
99
+ - @atlaspack/plugin@2.14.50
100
+
101
+ ## 2.12.51
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies []:
106
+ - @atlaspack/plugin@2.14.49
107
+
108
+ ## 2.12.50
109
+
110
+ ### Patch Changes
111
+
112
+ - Updated dependencies []:
113
+ - @atlaspack/plugin@2.14.48
114
+
115
+ ## 2.12.49
116
+
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies []:
120
+ - @atlaspack/plugin@2.14.47
121
+
122
+ ## 2.12.48
123
+
124
+ ### Patch Changes
125
+
126
+ - Updated dependencies []:
127
+ - @atlaspack/plugin@2.14.46
128
+
129
+ ## 2.12.47
130
+
131
+ ### Patch Changes
132
+
133
+ - Updated dependencies []:
134
+ - @atlaspack/plugin@2.14.45
135
+
136
+ ## 2.12.46
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies []:
141
+ - @atlaspack/plugin@2.14.44
142
+
143
+ ## 2.12.45
144
+
145
+ ### Patch Changes
146
+
147
+ - Updated dependencies []:
148
+ - @atlaspack/plugin@2.14.43
149
+
150
+ ## 2.12.44
151
+
152
+ ### Patch Changes
153
+
154
+ - Updated dependencies []:
155
+ - @atlaspack/plugin@2.14.42
156
+
157
+ ## 2.12.43
158
+
159
+ ### Patch Changes
160
+
161
+ - Updated dependencies []:
162
+ - @atlaspack/plugin@2.14.41
163
+
164
+ ## 2.12.42
165
+
166
+ ### Patch Changes
167
+
168
+ - Updated dependencies []:
169
+ - @atlaspack/plugin@2.14.40
170
+
171
+ ## 2.12.41
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies []:
176
+ - @atlaspack/plugin@2.14.39
177
+
178
+ ## 2.12.40
179
+
180
+ ### Patch Changes
181
+
182
+ - Updated dependencies []:
183
+ - @atlaspack/plugin@2.14.38
184
+
185
+ ## 2.12.39
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies []:
190
+ - @atlaspack/plugin@2.14.37
191
+
192
+ ## 2.12.38
193
+
194
+ ### Patch Changes
195
+
196
+ - Updated dependencies []:
197
+ - @atlaspack/plugin@2.14.36
198
+
199
+ ## 2.12.37
200
+
201
+ ### Patch Changes
202
+
203
+ - Updated dependencies []:
204
+ - @atlaspack/plugin@2.14.35
205
+
206
+ ## 2.12.36
207
+
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies []:
211
+ - @atlaspack/plugin@2.14.34
212
+
213
+ ## 2.12.35
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies []:
218
+ - @atlaspack/plugin@2.14.33
219
+
220
+ ## 2.12.34
221
+
222
+ ### Patch Changes
223
+
224
+ - Updated dependencies []:
225
+ - @atlaspack/plugin@2.14.32
226
+
227
+ ## 2.12.33
228
+
229
+ ### Patch Changes
230
+
231
+ - [#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.
232
+
233
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
234
+ - @atlaspack/plugin@2.14.31
235
+
236
+ ## 2.12.32
237
+
238
+ ### Patch Changes
239
+
240
+ - Updated dependencies []:
241
+ - @atlaspack/plugin@2.14.30
242
+
243
+ ## 2.12.31
244
+
245
+ ### Patch Changes
246
+
247
+ - Updated dependencies []:
248
+ - @atlaspack/plugin@2.14.29
249
+
250
+ ## 2.12.30
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies []:
255
+ - @atlaspack/plugin@2.14.28
256
+
257
+ ## 2.12.29
258
+
259
+ ### Patch Changes
260
+
261
+ - Updated dependencies []:
262
+ - @atlaspack/plugin@2.14.27
263
+
264
+ ## 2.12.28
265
+
266
+ ### Patch Changes
267
+
268
+ - [#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
269
+
270
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
271
+ - @atlaspack/plugin@2.14.26
272
+
273
+ ## 2.12.27
274
+
275
+ ### Patch Changes
276
+
277
+ - Updated dependencies []:
278
+ - @atlaspack/plugin@2.14.25
279
+
280
+ ## 2.12.26
281
+
282
+ ### Patch Changes
283
+
284
+ - Updated dependencies []:
285
+ - @atlaspack/plugin@2.14.24
286
+
287
+ ## 2.12.25
288
+
289
+ ### Patch Changes
290
+
291
+ - Updated dependencies []:
292
+ - @atlaspack/plugin@2.14.23
293
+
294
+ ## 2.12.24
295
+
296
+ ### Patch Changes
297
+
298
+ - [#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
299
+
300
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
301
+ - @atlaspack/plugin@2.14.22
302
+
303
+ ## 2.12.23
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies []:
308
+ - @atlaspack/plugin@2.14.21
309
+
310
+ ## 2.12.22
311
+
312
+ ### Patch Changes
313
+
314
+ - [#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
315
+
316
+ - Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
317
+ - @atlaspack/plugin@2.14.20
318
+
319
+ ## 2.12.21
320
+
321
+ ### Patch Changes
322
+
323
+ - Updated dependencies []:
324
+ - @atlaspack/plugin@2.14.19
325
+
326
+ ## 2.12.20
327
+
328
+ ### Patch Changes
329
+
330
+ - Updated dependencies []:
331
+ - @atlaspack/plugin@2.14.18
332
+
333
+ ## 2.12.19
334
+
335
+ ### Patch Changes
336
+
337
+ - Updated dependencies []:
338
+ - @atlaspack/plugin@2.14.17
339
+
340
+ ## 2.12.18
341
+
342
+ ### Patch Changes
343
+
344
+ - Updated dependencies []:
345
+ - @atlaspack/plugin@2.14.16
346
+
347
+ ## 2.12.17
348
+
349
+ ### Patch Changes
350
+
351
+ - Updated dependencies []:
352
+ - @atlaspack/plugin@2.14.15
353
+
354
+ ## 2.12.16
355
+
356
+ ### Patch Changes
357
+
358
+ - Updated dependencies []:
359
+ - @atlaspack/plugin@2.14.14
360
+
361
+ ## 2.12.15
362
+
363
+ ### Patch Changes
364
+
365
+ - Updated dependencies []:
366
+ - @atlaspack/plugin@2.14.13
367
+
368
+ ## 2.12.14
369
+
370
+ ### Patch Changes
371
+
372
+ - Updated dependencies []:
373
+ - @atlaspack/plugin@2.14.12
374
+
375
+ ## 2.12.13
376
+
377
+ ### Patch Changes
378
+
379
+ - Updated dependencies []:
380
+ - @atlaspack/plugin@2.14.11
381
+
382
+ ## 2.12.12
383
+
384
+ ### Patch Changes
385
+
386
+ - Updated dependencies []:
387
+ - @atlaspack/plugin@2.14.10
388
+
389
+ ## 2.12.11
390
+
391
+ ### Patch Changes
392
+
393
+ - Updated dependencies []:
394
+ - @atlaspack/plugin@2.14.9
395
+
3
396
  ## 2.12.10
4
397
 
5
398
  ### Patch Changes
@@ -18,7 +18,7 @@ function _nullthrows() {
18
18
  };
19
19
  return data;
20
20
  }
21
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  // This bundler plugin is designed specifically for library builds. It outputs a bundle for
23
23
  // each input asset, which ensures that the library can be effectively tree shaken and code
24
24
  // split by an application bundler.
@@ -28,6 +28,7 @@ var _default = exports.default = new (_plugin().Bundler)({
28
28
  }) {
29
29
  // Collect dependencies from the graph.
30
30
  // We do not want to mutate the graph while traversing, so this must be done first.
31
+ // @ts-expect-error TS2304
31
32
  let dependencies = [];
32
33
  bundleGraph.traverse((node, context) => {
33
34
  if (node.type === 'dependency') {
@@ -85,7 +86,7 @@ var _default = exports.default = new (_plugin().Bundler)({
85
86
  }
86
87
  },
87
88
  optimize() {}
88
- });
89
+ }); // @ts-expect-error TS2552
89
90
  function getBundleKey(asset, target) {
90
91
  var _target$loc;
91
92
  // Group by type and file path so CSS generated by macros is combined together by parent JS file.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/bundler-library",
3
- "version": "2.12.7-canary.49+194085942",
3
+ "version": "2.12.7-canary.490+c97de81b0",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "type": "commonjs",
6
6
  "publishConfig": {
@@ -10,14 +10,18 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/atlassian-labs/atlaspack.git"
12
12
  },
13
- "main": "lib/LibraryBundler.js",
14
- "source": "src/LibraryBundler.js",
13
+ "main": "./lib/LibraryBundler.js",
14
+ "source": "./src/LibraryBundler.ts",
15
+ "types": "./lib/types/LibraryBundler.d.ts",
15
16
  "engines": {
16
17
  "node": ">= 16.0.0"
17
18
  },
18
19
  "dependencies": {
19
- "@atlaspack/plugin": "2.14.5-canary.49+194085942",
20
+ "@atlaspack/plugin": "2.14.5-canary.490+c97de81b0",
20
21
  "nullthrows": "^1.1.1"
21
22
  },
22
- "gitHead": "194085942f0e86532e9d039fc3f8039badce4594"
23
- }
23
+ "scripts": {
24
+ "build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
25
+ },
26
+ "gitHead": "c97de81b0b4b866bef4396e9131f37ffd273258d"
27
+ }
@@ -1,15 +1,15 @@
1
- // @flow strict-local
2
1
  import {Bundler} from '@atlaspack/plugin';
3
2
  import nullthrows from 'nullthrows';
4
3
 
5
4
  // This bundler plugin is designed specifically for library builds. It outputs a bundle for
6
5
  // each input asset, which ensures that the library can be effectively tree shaken and code
7
6
  // split by an application bundler.
8
- export default (new Bundler({
7
+ export default new Bundler({
9
8
  bundle({bundleGraph}) {
10
9
  // Collect dependencies from the graph.
11
10
  // We do not want to mutate the graph while traversing, so this must be done first.
12
- let dependencies = [];
11
+ // @ts-expect-error TS2304
12
+ let dependencies: Array<Array<Target | Dependency>> = [];
13
13
  bundleGraph.traverse((node, context) => {
14
14
  if (node.type === 'dependency') {
15
15
  let dependency = node.value;
@@ -71,9 +71,10 @@ export default (new Bundler({
71
71
  }
72
72
  },
73
73
  optimize() {},
74
- }): Bundler);
74
+ }) as Bundler<undefined>;
75
75
 
76
- function getBundleKey(asset, target) {
76
+ // @ts-expect-error TS2552
77
+ function getBundleKey(asset: Asset, target: Target) {
77
78
  // Group by type and file path so CSS generated by macros is combined together by parent JS file.
78
79
  // Also group by environment/target to ensure bundles cannot be shared between packages.
79
80
  return `${asset.type}:${asset.filePath}:${asset.env.id}:${
package/tsconfig.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "extends": "../../../tsconfig.base.json",
3
+ "include": ["src"],
4
+ "compilerOptions": {
5
+ "composite": true
6
+ }
7
+ }