@atlaspack/package-manager 2.14.5-canary.36 → 2.14.5-canary.361

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +504 -0
  2. package/dist/JSONParseStream.js +37 -0
  3. package/dist/MockPackageInstaller.js +54 -0
  4. package/dist/NodePackageManager.js +559 -0
  5. package/dist/Npm.js +73 -0
  6. package/dist/Pnpm.js +140 -0
  7. package/dist/Yarn.js +124 -0
  8. package/dist/getCurrentPackageManager.js +17 -0
  9. package/dist/index.js +24 -0
  10. package/dist/installPackage.js +197 -0
  11. package/dist/nodejsConditions.js +39 -0
  12. package/dist/promiseFromProcess.js +16 -0
  13. package/dist/utils.js +76 -0
  14. package/dist/validateModuleSpecifier.js +11 -0
  15. package/lib/JSONParseStream.js +52 -0
  16. package/lib/MockPackageInstaller.js +79 -0
  17. package/lib/NodePackageManager.js +621 -0
  18. package/lib/Npm.js +106 -0
  19. package/lib/Pnpm.js +185 -0
  20. package/lib/Yarn.js +160 -0
  21. package/lib/getCurrentPackageManager.js +20 -0
  22. package/lib/index.js +64 -5211
  23. package/lib/installPackage.js +222 -0
  24. package/lib/nodejsConditions.js +41 -0
  25. package/lib/promiseFromProcess.js +20 -0
  26. package/lib/types/JSONParseStream.d.ts +6 -0
  27. package/lib/types/MockPackageInstaller.d.ts +14 -0
  28. package/lib/types/NodePackageManager.d.ts +37 -0
  29. package/lib/types/Npm.d.ts +4 -0
  30. package/lib/types/Pnpm.d.ts +5 -0
  31. package/lib/types/Yarn.d.ts +5 -0
  32. package/lib/types/getCurrentPackageManager.d.ts +4 -0
  33. package/lib/types/index.d.ts +10 -0
  34. package/lib/types/installPackage.d.ts +5 -0
  35. package/lib/types/nodejsConditions.d.ts +3 -0
  36. package/lib/types/promiseFromProcess.d.ts +2 -0
  37. package/lib/types/utils.d.ts +15 -0
  38. package/lib/types/validateModuleSpecifier.d.ts +1 -0
  39. package/lib/utils.js +101 -0
  40. package/lib/validateModuleSpecifier.js +14 -0
  41. package/package.json +17 -20
  42. package/src/{JSONParseStream.js → JSONParseStream.ts} +8 -7
  43. package/src/{MockPackageInstaller.js → MockPackageInstaller.ts} +4 -6
  44. package/src/{NodePackageManager.js → NodePackageManager.ts} +125 -73
  45. package/src/{Npm.js → Npm.ts} +9 -9
  46. package/src/{Pnpm.js → Pnpm.ts} +68 -50
  47. package/src/{Yarn.js → Yarn.ts} +38 -25
  48. package/src/{getCurrentPackageManager.js → getCurrentPackageManager.ts} +9 -4
  49. package/src/{index.js → index.ts} +0 -2
  50. package/src/{installPackage.js → installPackage.ts} +4 -6
  51. package/src/{nodejsConditions.js → nodejsConditions.ts} +6 -3
  52. package/src/promiseFromProcess.ts +23 -0
  53. package/src/{utils.js → utils.ts} +21 -11
  54. package/src/{validateModuleSpecifier.js → validateModuleSpecifier.ts} +0 -2
  55. package/test/{NodePackageManager.test.js → NodePackageManager.test.ts} +19 -16
  56. package/test/{getCurrentPackageManager.test.js → getCurrentPackageManager.test.ts} +0 -1
  57. package/test/{validateModuleSpecifiers.test.js → validateModuleSpecifiers.test.ts} +2 -3
  58. package/tsconfig.json +33 -0
  59. package/tsconfig.tsbuildinfo +1 -0
  60. package/index.d.ts +0 -40
  61. package/lib/index.d.ts +0 -10
  62. package/lib/index.js.map +0 -1
  63. package/src/promiseFromProcess.js +0 -19
package/CHANGELOG.md CHANGED
@@ -1,5 +1,509 @@
1
1
  # @atlaspack/package-manager
2
2
 
3
+ ## 2.14.49
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @atlaspack/fs@2.15.44
9
+ - @atlaspack/logger@2.14.41
10
+ - @atlaspack/utils@3.3.1
11
+ - @atlaspack/node-resolver-core@3.7.20
12
+ - @atlaspack/build-cache@2.13.8
13
+ - @atlaspack/workers@2.14.49
14
+ - @atlaspack/types@2.15.39
15
+
16
+ ## 2.14.48
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`47aa84e`](https://github.com/atlassian-labs/atlaspack/commit/47aa84e44c61066072a5bf3d57678565b9d2c5a3), [`565bab3`](https://github.com/atlassian-labs/atlaspack/commit/565bab3771cc334659d873cabff4cdfac0860cc7)]:
21
+ - @atlaspack/utils@3.3.0
22
+ - @atlaspack/build-cache@2.13.7
23
+ - @atlaspack/workers@2.14.48
24
+ - @atlaspack/node-resolver-core@3.7.19
25
+ - @atlaspack/fs@2.15.43
26
+ - @atlaspack/logger@2.14.40
27
+ - @atlaspack/types@2.15.38
28
+
29
+ ## 2.14.47
30
+
31
+ ### Patch Changes
32
+
33
+ - Updated dependencies []:
34
+ - @atlaspack/fs@2.15.42
35
+ - @atlaspack/logger@2.14.39
36
+ - @atlaspack/utils@3.2.8
37
+ - @atlaspack/node-resolver-core@3.7.18
38
+ - @atlaspack/workers@2.14.47
39
+ - @atlaspack/types@2.15.37
40
+
41
+ ## 2.14.46
42
+
43
+ ### Patch Changes
44
+
45
+ - Updated dependencies []:
46
+ - @atlaspack/fs@2.15.41
47
+ - @atlaspack/logger@2.14.38
48
+ - @atlaspack/utils@3.2.7
49
+ - @atlaspack/node-resolver-core@3.7.17
50
+ - @atlaspack/types@2.15.36
51
+ - @atlaspack/workers@2.14.46
52
+
53
+ ## 2.14.45
54
+
55
+ ### Patch Changes
56
+
57
+ - Updated dependencies []:
58
+ - @atlaspack/fs@2.15.40
59
+ - @atlaspack/utils@3.2.6
60
+ - @atlaspack/node-resolver-core@3.7.16
61
+ - @atlaspack/logger@2.14.37
62
+ - @atlaspack/types@2.15.35
63
+ - @atlaspack/workers@2.14.45
64
+
65
+ ## 2.14.44
66
+
67
+ ### Patch Changes
68
+
69
+ - Updated dependencies []:
70
+ - @atlaspack/fs@2.15.39
71
+ - @atlaspack/logger@2.14.36
72
+ - @atlaspack/utils@3.2.5
73
+ - @atlaspack/node-resolver-core@3.7.15
74
+ - @atlaspack/workers@2.14.44
75
+ - @atlaspack/types@2.15.34
76
+
77
+ ## 2.14.43
78
+
79
+ ### Patch Changes
80
+
81
+ - Updated dependencies []:
82
+ - @atlaspack/fs@2.15.38
83
+ - @atlaspack/logger@2.14.35
84
+ - @atlaspack/types@2.15.33
85
+ - @atlaspack/utils@3.2.4
86
+ - @atlaspack/workers@2.14.43
87
+ - @atlaspack/node-resolver-core@3.7.14
88
+
89
+ ## 2.14.42
90
+
91
+ ### Patch Changes
92
+
93
+ - Updated dependencies []:
94
+ - @atlaspack/fs@2.15.37
95
+ - @atlaspack/logger@2.14.34
96
+ - @atlaspack/utils@3.2.3
97
+ - @atlaspack/node-resolver-core@3.7.13
98
+ - @atlaspack/workers@2.14.42
99
+ - @atlaspack/types@2.15.32
100
+
101
+ ## 2.14.41
102
+
103
+ ### Patch Changes
104
+
105
+ - Updated dependencies []:
106
+ - @atlaspack/fs@2.15.36
107
+ - @atlaspack/logger@2.14.33
108
+ - @atlaspack/utils@3.2.2
109
+ - @atlaspack/node-resolver-core@3.7.12
110
+ - @atlaspack/workers@2.14.41
111
+ - @atlaspack/types@2.15.31
112
+
113
+ ## 2.14.40
114
+
115
+ ### Patch Changes
116
+
117
+ - Updated dependencies []:
118
+ - @atlaspack/fs@2.15.35
119
+ - @atlaspack/logger@2.14.32
120
+ - @atlaspack/utils@3.2.1
121
+ - @atlaspack/node-resolver-core@3.7.11
122
+ - @atlaspack/workers@2.14.40
123
+ - @atlaspack/types@2.15.30
124
+
125
+ ## 2.14.39
126
+
127
+ ### Patch Changes
128
+
129
+ - Updated dependencies [[`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`617a318`](https://github.com/atlassian-labs/atlaspack/commit/617a318ddc9419b38360257353fec50b9051ee13)]:
130
+ - @atlaspack/utils@3.2.0
131
+ - @atlaspack/fs@2.15.34
132
+ - @atlaspack/logger@2.14.31
133
+ - @atlaspack/node-resolver-core@3.7.10
134
+ - @atlaspack/types@2.15.29
135
+ - @atlaspack/workers@2.14.39
136
+
137
+ ## 2.14.38
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [[`7d7a55d`](https://github.com/atlassian-labs/atlaspack/commit/7d7a55dd6395ec391a2e4c33b3dec0d1ea477d4c)]:
142
+ - @atlaspack/utils@3.1.2
143
+ - @atlaspack/fs@2.15.33
144
+ - @atlaspack/node-resolver-core@3.7.9
145
+ - @atlaspack/logger@2.14.30
146
+ - @atlaspack/workers@2.14.38
147
+ - @atlaspack/types@2.15.28
148
+
149
+ ## 2.14.37
150
+
151
+ ### Patch Changes
152
+
153
+ - Updated dependencies [[`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
154
+ - @atlaspack/node-resolver-core@3.7.8
155
+ - @atlaspack/fs@2.15.32
156
+ - @atlaspack/logger@2.14.29
157
+ - @atlaspack/utils@3.1.1
158
+ - @atlaspack/workers@2.14.37
159
+ - @atlaspack/types@2.15.27
160
+
161
+ ## 2.14.36
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [[`5776be2`](https://github.com/atlassian-labs/atlaspack/commit/5776be21f70a3f2b9471ba33da3ba1a883f21f1a)]:
166
+ - @atlaspack/utils@3.1.0
167
+ - @atlaspack/fs@2.15.31
168
+ - @atlaspack/logger@2.14.28
169
+ - @atlaspack/node-resolver-core@3.7.7
170
+ - @atlaspack/workers@2.14.36
171
+ - @atlaspack/types@2.15.26
172
+
173
+ ## 2.14.35
174
+
175
+ ### Patch Changes
176
+
177
+ - Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`c372f3f`](https://github.com/atlassian-labs/atlaspack/commit/c372f3fd6fce8200d5cf47f41bc7895c6cbb5558), [`17dfea9`](https://github.com/atlassian-labs/atlaspack/commit/17dfea9e9f3169807808520df9c09ebf70dc8b10)]:
178
+ - @atlaspack/node-resolver-core@3.7.6
179
+ - @atlaspack/utils@3.0.3
180
+ - @atlaspack/fs@2.15.30
181
+ - @atlaspack/logger@2.14.27
182
+ - @atlaspack/types@2.15.25
183
+ - @atlaspack/workers@2.14.35
184
+
185
+ ## 2.14.34
186
+
187
+ ### Patch Changes
188
+
189
+ - Updated dependencies [[`25cbee6`](https://github.com/atlassian-labs/atlaspack/commit/25cbee625fb47ac20423fe34ff37bc818a807245)]:
190
+ - @atlaspack/workers@2.14.34
191
+ - @atlaspack/fs@2.15.29
192
+ - @atlaspack/types@2.15.24
193
+ - @atlaspack/utils@3.0.2
194
+ - @atlaspack/node-resolver-core@3.7.5
195
+ - @atlaspack/logger@2.14.26
196
+
197
+ ## 2.14.33
198
+
199
+ ### Patch Changes
200
+
201
+ - Updated dependencies [[`236e546`](https://github.com/atlassian-labs/atlaspack/commit/236e5465863dca6044a7191e05260a5b924c342e)]:
202
+ - @atlaspack/utils@3.0.1
203
+ - @atlaspack/workers@2.14.33
204
+ - @atlaspack/node-resolver-core@3.7.4
205
+ - @atlaspack/fs@2.15.28
206
+ - @atlaspack/types@2.15.23
207
+ - @atlaspack/logger@2.14.25
208
+
209
+ ## 2.14.32
210
+
211
+ ### Patch Changes
212
+
213
+ - Updated dependencies [[`1180103`](https://github.com/atlassian-labs/atlaspack/commit/118010351ed444f8178988afb3f77807154dd933)]:
214
+ - @atlaspack/utils@3.0.0
215
+ - @atlaspack/fs@2.15.27
216
+ - @atlaspack/node-resolver-core@3.7.3
217
+ - @atlaspack/logger@2.14.24
218
+ - @atlaspack/workers@2.14.32
219
+ - @atlaspack/types@2.15.22
220
+
221
+ ## 2.14.31
222
+
223
+ ### Patch Changes
224
+
225
+ - [#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.
226
+
227
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
228
+ - @atlaspack/build-cache@2.13.6
229
+ - @atlaspack/diagnostic@2.14.4
230
+ - @atlaspack/fs@2.15.26
231
+ - @atlaspack/logger@2.14.23
232
+ - @atlaspack/types@2.15.21
233
+ - @atlaspack/utils@2.19.3
234
+ - @atlaspack/workers@2.14.31
235
+ - @atlaspack/node-resolver-core@3.7.2
236
+
237
+ ## 2.14.30
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies []:
242
+ - @atlaspack/fs@2.15.25
243
+ - @atlaspack/utils@2.19.2
244
+ - @atlaspack/node-resolver-core@3.7.1
245
+ - @atlaspack/logger@2.14.22
246
+ - @atlaspack/types@2.15.20
247
+ - @atlaspack/workers@2.14.30
248
+
249
+ ## 2.14.29
250
+
251
+ ### Patch Changes
252
+
253
+ - [#764](https://github.com/atlassian-labs/atlaspack/pull/764) [`58ddd5d`](https://github.com/atlassian-labs/atlaspack/commit/58ddd5d79adde2ac5dc4c60ca575e4705a91e592) Thanks [@mattcompiles](https://github.com/mattcompiles)! - Fix using Atlaspack linked with source files
254
+
255
+ - Updated dependencies [[`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
256
+ - @atlaspack/node-resolver-core@3.7.0
257
+ - @atlaspack/fs@2.15.24
258
+ - @atlaspack/utils@2.19.1
259
+ - @atlaspack/logger@2.14.21
260
+ - @atlaspack/types@2.15.19
261
+ - @atlaspack/workers@2.14.29
262
+
263
+ ## 2.14.28
264
+
265
+ ### Patch Changes
266
+
267
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
268
+ - @atlaspack/utils@2.19.0
269
+ - @atlaspack/fs@2.15.23
270
+ - @atlaspack/node-resolver-core@3.6.4
271
+ - @atlaspack/workers@2.14.28
272
+ - @atlaspack/logger@2.14.20
273
+ - @atlaspack/types@2.15.18
274
+
275
+ ## 2.14.27
276
+
277
+ ### Patch Changes
278
+
279
+ - Updated dependencies []:
280
+ - @atlaspack/fs@2.15.22
281
+ - @atlaspack/utils@2.18.4
282
+ - @atlaspack/node-resolver-core@3.6.3
283
+ - @atlaspack/logger@2.14.19
284
+ - @atlaspack/types@2.15.17
285
+ - @atlaspack/workers@2.14.27
286
+
287
+ ## 2.14.26
288
+
289
+ ### Patch Changes
290
+
291
+ - [#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
292
+
293
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
294
+ - @atlaspack/node-resolver-core@3.6.2
295
+ - @atlaspack/build-cache@2.13.5
296
+ - @atlaspack/diagnostic@2.14.3
297
+ - @atlaspack/workers@2.14.26
298
+ - @atlaspack/logger@2.14.18
299
+ - @atlaspack/types@2.15.16
300
+ - @atlaspack/utils@2.18.3
301
+ - @atlaspack/fs@2.15.21
302
+
303
+ ## 2.14.25
304
+
305
+ ### Patch Changes
306
+
307
+ - Updated dependencies []:
308
+ - @atlaspack/fs@2.15.20
309
+ - @atlaspack/utils@2.18.2
310
+ - @atlaspack/node-resolver-core@3.6.1
311
+ - @atlaspack/logger@2.14.17
312
+ - @atlaspack/types@2.15.15
313
+ - @atlaspack/workers@2.14.25
314
+
315
+ ## 2.14.24
316
+
317
+ ### Patch Changes
318
+
319
+ - Updated dependencies [[`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
320
+ - @atlaspack/node-resolver-core@3.6.0
321
+ - @atlaspack/fs@2.15.19
322
+ - @atlaspack/logger@2.14.16
323
+ - @atlaspack/utils@2.18.1
324
+ - @atlaspack/types@2.15.14
325
+ - @atlaspack/workers@2.14.24
326
+
327
+ ## 2.14.23
328
+
329
+ ### Patch Changes
330
+
331
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
332
+ - @atlaspack/utils@2.18.0
333
+ - @atlaspack/fs@2.15.18
334
+ - @atlaspack/node-resolver-core@3.5.23
335
+ - @atlaspack/workers@2.14.23
336
+ - @atlaspack/logger@2.14.15
337
+ - @atlaspack/types@2.15.13
338
+
339
+ ## 2.14.22
340
+
341
+ ### Patch Changes
342
+
343
+ - [#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
344
+
345
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
346
+ - @atlaspack/node-resolver-core@3.5.22
347
+ - @atlaspack/build-cache@2.13.4
348
+ - @atlaspack/diagnostic@2.14.2
349
+ - @atlaspack/workers@2.14.22
350
+ - @atlaspack/logger@2.14.14
351
+ - @atlaspack/types@2.15.12
352
+ - @atlaspack/utils@2.17.4
353
+ - @atlaspack/fs@2.15.17
354
+
355
+ ## 2.14.21
356
+
357
+ ### Patch Changes
358
+
359
+ - Updated dependencies []:
360
+ - @atlaspack/fs@2.15.16
361
+ - @atlaspack/types@2.15.11
362
+ - @atlaspack/workers@2.14.21
363
+ - @atlaspack/utils@2.17.3
364
+ - @atlaspack/node-resolver-core@3.5.21
365
+
366
+ ## 2.14.20
367
+
368
+ ### Patch Changes
369
+
370
+ - Updated dependencies []:
371
+ - @atlaspack/fs@2.15.15
372
+ - @atlaspack/utils@2.17.2
373
+ - @atlaspack/node-resolver-core@3.5.20
374
+ - @atlaspack/types@2.15.10
375
+ - @atlaspack/workers@2.14.20
376
+
377
+ ## 2.14.19
378
+
379
+ ### Patch Changes
380
+
381
+ - Updated dependencies []:
382
+ - @atlaspack/fs@2.15.14
383
+ - @atlaspack/utils@2.17.1
384
+ - @atlaspack/node-resolver-core@3.5.19
385
+ - @atlaspack/types@2.15.9
386
+ - @atlaspack/workers@2.14.19
387
+
388
+ ## 2.14.18
389
+
390
+ ### Patch Changes
391
+
392
+ - [#645](https://github.com/atlassian-labs/atlaspack/pull/645) [`de23e0c`](https://github.com/atlassian-labs/atlaspack/commit/de23e0ce49d5504fe3947ac26640a3d951087da3) Thanks [@alshdavid](https://github.com/alshdavid)! - Updated build system and added some extra test-specific code
393
+
394
+ - [#682](https://github.com/atlassian-labs/atlaspack/pull/682) [`a5ed1b4`](https://github.com/atlassian-labs/atlaspack/commit/a5ed1b414498560f393ff491af4da25b6e8dde56) Thanks [@alshdavid](https://github.com/alshdavid)! - Updating build system
395
+
396
+ - 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)]:
397
+ - @atlaspack/utils@2.17.0
398
+ - @atlaspack/fs@2.15.13
399
+ - @atlaspack/node-resolver-core@3.5.18
400
+ - @atlaspack/workers@2.14.18
401
+ - @atlaspack/logger@2.14.13
402
+ - @atlaspack/types@2.15.8
403
+
404
+ ## 2.14.17
405
+
406
+ ### Patch Changes
407
+
408
+ - Updated dependencies []:
409
+ - @atlaspack/fs@2.15.12
410
+ - @atlaspack/logger@2.14.12
411
+ - @atlaspack/utils@2.16.1
412
+ - @atlaspack/node-resolver-core@3.5.17
413
+ - @atlaspack/workers@2.14.17
414
+ - @atlaspack/types@2.15.7
415
+
416
+ ## 2.14.16
417
+
418
+ ### Patch Changes
419
+
420
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
421
+ - @atlaspack/utils@2.16.0
422
+ - @atlaspack/fs@2.15.11
423
+ - @atlaspack/node-resolver-core@3.5.16
424
+ - @atlaspack/workers@2.14.16
425
+ - @atlaspack/types@2.15.6
426
+
427
+ ## 2.14.15
428
+
429
+ ### Patch Changes
430
+
431
+ - Updated dependencies []:
432
+ - @atlaspack/fs@2.15.10
433
+ - @atlaspack/utils@2.15.3
434
+ - @atlaspack/node-resolver-core@3.5.15
435
+ - @atlaspack/types@2.15.5
436
+ - @atlaspack/workers@2.14.15
437
+
438
+ ## 2.14.14
439
+
440
+ ### Patch Changes
441
+
442
+ - Updated dependencies []:
443
+ - @atlaspack/fs@2.15.9
444
+ - @atlaspack/utils@2.15.2
445
+ - @atlaspack/node-resolver-core@3.5.14
446
+ - @atlaspack/types@2.15.4
447
+ - @atlaspack/workers@2.14.14
448
+
449
+ ## 2.14.13
450
+
451
+ ### Patch Changes
452
+
453
+ - Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb)]:
454
+ - @atlaspack/workers@2.14.13
455
+ - @atlaspack/logger@2.14.11
456
+ - @atlaspack/fs@2.15.8
457
+ - @atlaspack/types@2.15.3
458
+ - @atlaspack/utils@2.15.1
459
+ - @atlaspack/node-resolver-core@3.5.13
460
+
461
+ ## 2.14.12
462
+
463
+ ### Patch Changes
464
+
465
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
466
+ - @atlaspack/utils@2.15.0
467
+ - @atlaspack/fs@2.15.7
468
+ - @atlaspack/node-resolver-core@3.5.12
469
+ - @atlaspack/workers@2.14.12
470
+ - @atlaspack/types@2.15.2
471
+
472
+ ## 2.14.11
473
+
474
+ ### Patch Changes
475
+
476
+ - Updated dependencies []:
477
+ - @atlaspack/fs@2.15.6
478
+ - @atlaspack/utils@2.14.11
479
+ - @atlaspack/node-resolver-core@3.5.11
480
+ - @atlaspack/types@2.15.1
481
+ - @atlaspack/workers@2.14.11
482
+
483
+ ## 2.14.10
484
+
485
+ ### Patch Changes
486
+
487
+ - Updated dependencies [[`0999fb7`](https://github.com/atlassian-labs/atlaspack/commit/0999fb78da519a6c7582d212883e515fcf6c1252), [`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196)]:
488
+ - @atlaspack/fs@2.15.5
489
+ - @atlaspack/types@2.15.0
490
+ - @atlaspack/node-resolver-core@3.5.10
491
+ - @atlaspack/workers@2.14.10
492
+ - @atlaspack/logger@2.14.10
493
+ - @atlaspack/utils@2.14.10
494
+
495
+ ## 2.14.9
496
+
497
+ ### Patch Changes
498
+
499
+ - Updated dependencies [[`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6)]:
500
+ - @atlaspack/fs@2.15.4
501
+ - @atlaspack/logger@2.14.9
502
+ - @atlaspack/utils@2.14.9
503
+ - @atlaspack/node-resolver-core@3.5.9
504
+ - @atlaspack/workers@2.14.9
505
+ - @atlaspack/types@2.14.9
506
+
3
507
  ## 2.14.8
4
508
 
5
509
  ### Patch Changes
@@ -0,0 +1,37 @@
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 logger_1 = __importDefault(require("@atlaspack/logger"));
7
+ const stream_1 = require("stream");
8
+ // Transforms chunks of json strings to parsed objects.
9
+ // Pair with split2 to parse stream of newline-delimited text.
10
+ class JSONParseStream extends stream_1.Transform {
11
+ constructor(options) {
12
+ // @ts-expect-error TS2698
13
+ super({ ...options, objectMode: true });
14
+ }
15
+ _transform(chunk, encoding, callback) {
16
+ try {
17
+ let parsed;
18
+ try {
19
+ parsed = JSON.parse(chunk.toString());
20
+ }
21
+ catch (e) {
22
+ // Be permissive and ignoreJSON parse errors in case there was
23
+ // a non-JSON line in the package manager's stdout.
24
+ logger_1.default.verbose({
25
+ message: 'Ignored invalid JSON message: ' + chunk.toString(),
26
+ origin: '@atlaspack/package-manager',
27
+ });
28
+ return;
29
+ }
30
+ callback(null, parsed);
31
+ }
32
+ catch (err) {
33
+ callback(err);
34
+ }
35
+ }
36
+ }
37
+ exports.default = JSONParseStream;
@@ -0,0 +1,54 @@
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
+ exports.MockPackageInstaller = void 0;
7
+ const path_1 = __importDefault(require("path"));
8
+ const build_cache_1 = require("@atlaspack/build-cache");
9
+ const fs_1 = require("@atlaspack/fs");
10
+ const package_json_1 = __importDefault(require("../package.json"));
11
+ const utils_1 = require("./utils");
12
+ // This PackageInstaller implementation simply copies files from one filesystem to another.
13
+ // Mostly useful for testing purposes.
14
+ class MockPackageInstaller {
15
+ constructor() {
16
+ this.packages = new Map();
17
+ }
18
+ register(packageName, fs, packagePath) {
19
+ this.packages.set(packageName, { fs, packagePath });
20
+ }
21
+ async install({ modules, fs, cwd, packagePath, saveDev = true, }) {
22
+ if (packagePath == null) {
23
+ packagePath = path_1.default.join(cwd, 'package.json');
24
+ await fs.writeFile(packagePath, '{}');
25
+ }
26
+ let pkg = JSON.parse(await fs.readFile(packagePath, 'utf8'));
27
+ let key = saveDev ? 'devDependencies' : 'dependencies';
28
+ if (!pkg[key]) {
29
+ pkg[key] = {};
30
+ }
31
+ for (let module of modules) {
32
+ pkg[key][module.name] =
33
+ '^' + (await this.installPackage(module, fs, packagePath));
34
+ }
35
+ await fs.writeFile(packagePath, JSON.stringify(pkg));
36
+ }
37
+ async installPackage(moduleRequest, fs, packagePath) {
38
+ let pkg = this.packages.get(moduleRequest.name);
39
+ if (!pkg) {
40
+ throw new Error('Unknown package ' + moduleRequest.name);
41
+ }
42
+ let dest = path_1.default.join(path_1.default.dirname(packagePath), 'node_modules', moduleRequest.name);
43
+ await (0, fs_1.ncp)(pkg.fs, pkg.packagePath, fs, dest);
44
+ let packageJSON = JSON.parse(await fs.readFile(path_1.default.join(dest, 'package.json'), 'utf8'));
45
+ if (packageJSON.dependencies != null) {
46
+ for (let dep of (0, utils_1.moduleRequestsFromDependencyMap)(packageJSON.dependencies)) {
47
+ await this.installPackage(dep, fs, packagePath);
48
+ }
49
+ }
50
+ return packageJSON.version;
51
+ }
52
+ }
53
+ exports.MockPackageInstaller = MockPackageInstaller;
54
+ (0, build_cache_1.registerSerializableClass)(`${package_json_1.default.version}:MockPackageInstaller`, MockPackageInstaller);