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

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 +491 -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,496 @@
1
1
  # @atlaspack/package-manager
2
2
 
3
+ ## 2.14.48
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`47aa84e`](https://github.com/atlassian-labs/atlaspack/commit/47aa84e44c61066072a5bf3d57678565b9d2c5a3), [`565bab3`](https://github.com/atlassian-labs/atlaspack/commit/565bab3771cc334659d873cabff4cdfac0860cc7)]:
8
+ - @atlaspack/utils@3.3.0
9
+ - @atlaspack/build-cache@2.13.7
10
+ - @atlaspack/workers@2.14.48
11
+ - @atlaspack/node-resolver-core@3.7.19
12
+ - @atlaspack/fs@2.15.43
13
+ - @atlaspack/logger@2.14.40
14
+ - @atlaspack/types@2.15.38
15
+
16
+ ## 2.14.47
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies []:
21
+ - @atlaspack/fs@2.15.42
22
+ - @atlaspack/logger@2.14.39
23
+ - @atlaspack/utils@3.2.8
24
+ - @atlaspack/node-resolver-core@3.7.18
25
+ - @atlaspack/workers@2.14.47
26
+ - @atlaspack/types@2.15.37
27
+
28
+ ## 2.14.46
29
+
30
+ ### Patch Changes
31
+
32
+ - Updated dependencies []:
33
+ - @atlaspack/fs@2.15.41
34
+ - @atlaspack/logger@2.14.38
35
+ - @atlaspack/utils@3.2.7
36
+ - @atlaspack/node-resolver-core@3.7.17
37
+ - @atlaspack/types@2.15.36
38
+ - @atlaspack/workers@2.14.46
39
+
40
+ ## 2.14.45
41
+
42
+ ### Patch Changes
43
+
44
+ - Updated dependencies []:
45
+ - @atlaspack/fs@2.15.40
46
+ - @atlaspack/utils@3.2.6
47
+ - @atlaspack/node-resolver-core@3.7.16
48
+ - @atlaspack/logger@2.14.37
49
+ - @atlaspack/types@2.15.35
50
+ - @atlaspack/workers@2.14.45
51
+
52
+ ## 2.14.44
53
+
54
+ ### Patch Changes
55
+
56
+ - Updated dependencies []:
57
+ - @atlaspack/fs@2.15.39
58
+ - @atlaspack/logger@2.14.36
59
+ - @atlaspack/utils@3.2.5
60
+ - @atlaspack/node-resolver-core@3.7.15
61
+ - @atlaspack/workers@2.14.44
62
+ - @atlaspack/types@2.15.34
63
+
64
+ ## 2.14.43
65
+
66
+ ### Patch Changes
67
+
68
+ - Updated dependencies []:
69
+ - @atlaspack/fs@2.15.38
70
+ - @atlaspack/logger@2.14.35
71
+ - @atlaspack/types@2.15.33
72
+ - @atlaspack/utils@3.2.4
73
+ - @atlaspack/workers@2.14.43
74
+ - @atlaspack/node-resolver-core@3.7.14
75
+
76
+ ## 2.14.42
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies []:
81
+ - @atlaspack/fs@2.15.37
82
+ - @atlaspack/logger@2.14.34
83
+ - @atlaspack/utils@3.2.3
84
+ - @atlaspack/node-resolver-core@3.7.13
85
+ - @atlaspack/workers@2.14.42
86
+ - @atlaspack/types@2.15.32
87
+
88
+ ## 2.14.41
89
+
90
+ ### Patch Changes
91
+
92
+ - Updated dependencies []:
93
+ - @atlaspack/fs@2.15.36
94
+ - @atlaspack/logger@2.14.33
95
+ - @atlaspack/utils@3.2.2
96
+ - @atlaspack/node-resolver-core@3.7.12
97
+ - @atlaspack/workers@2.14.41
98
+ - @atlaspack/types@2.15.31
99
+
100
+ ## 2.14.40
101
+
102
+ ### Patch Changes
103
+
104
+ - Updated dependencies []:
105
+ - @atlaspack/fs@2.15.35
106
+ - @atlaspack/logger@2.14.32
107
+ - @atlaspack/utils@3.2.1
108
+ - @atlaspack/node-resolver-core@3.7.11
109
+ - @atlaspack/workers@2.14.40
110
+ - @atlaspack/types@2.15.30
111
+
112
+ ## 2.14.39
113
+
114
+ ### Patch Changes
115
+
116
+ - Updated dependencies [[`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`617a318`](https://github.com/atlassian-labs/atlaspack/commit/617a318ddc9419b38360257353fec50b9051ee13)]:
117
+ - @atlaspack/utils@3.2.0
118
+ - @atlaspack/fs@2.15.34
119
+ - @atlaspack/logger@2.14.31
120
+ - @atlaspack/node-resolver-core@3.7.10
121
+ - @atlaspack/types@2.15.29
122
+ - @atlaspack/workers@2.14.39
123
+
124
+ ## 2.14.38
125
+
126
+ ### Patch Changes
127
+
128
+ - Updated dependencies [[`7d7a55d`](https://github.com/atlassian-labs/atlaspack/commit/7d7a55dd6395ec391a2e4c33b3dec0d1ea477d4c)]:
129
+ - @atlaspack/utils@3.1.2
130
+ - @atlaspack/fs@2.15.33
131
+ - @atlaspack/node-resolver-core@3.7.9
132
+ - @atlaspack/logger@2.14.30
133
+ - @atlaspack/workers@2.14.38
134
+ - @atlaspack/types@2.15.28
135
+
136
+ ## 2.14.37
137
+
138
+ ### Patch Changes
139
+
140
+ - Updated dependencies [[`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
141
+ - @atlaspack/node-resolver-core@3.7.8
142
+ - @atlaspack/fs@2.15.32
143
+ - @atlaspack/logger@2.14.29
144
+ - @atlaspack/utils@3.1.1
145
+ - @atlaspack/workers@2.14.37
146
+ - @atlaspack/types@2.15.27
147
+
148
+ ## 2.14.36
149
+
150
+ ### Patch Changes
151
+
152
+ - Updated dependencies [[`5776be2`](https://github.com/atlassian-labs/atlaspack/commit/5776be21f70a3f2b9471ba33da3ba1a883f21f1a)]:
153
+ - @atlaspack/utils@3.1.0
154
+ - @atlaspack/fs@2.15.31
155
+ - @atlaspack/logger@2.14.28
156
+ - @atlaspack/node-resolver-core@3.7.7
157
+ - @atlaspack/workers@2.14.36
158
+ - @atlaspack/types@2.15.26
159
+
160
+ ## 2.14.35
161
+
162
+ ### Patch Changes
163
+
164
+ - 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)]:
165
+ - @atlaspack/node-resolver-core@3.7.6
166
+ - @atlaspack/utils@3.0.3
167
+ - @atlaspack/fs@2.15.30
168
+ - @atlaspack/logger@2.14.27
169
+ - @atlaspack/types@2.15.25
170
+ - @atlaspack/workers@2.14.35
171
+
172
+ ## 2.14.34
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies [[`25cbee6`](https://github.com/atlassian-labs/atlaspack/commit/25cbee625fb47ac20423fe34ff37bc818a807245)]:
177
+ - @atlaspack/workers@2.14.34
178
+ - @atlaspack/fs@2.15.29
179
+ - @atlaspack/types@2.15.24
180
+ - @atlaspack/utils@3.0.2
181
+ - @atlaspack/node-resolver-core@3.7.5
182
+ - @atlaspack/logger@2.14.26
183
+
184
+ ## 2.14.33
185
+
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [[`236e546`](https://github.com/atlassian-labs/atlaspack/commit/236e5465863dca6044a7191e05260a5b924c342e)]:
189
+ - @atlaspack/utils@3.0.1
190
+ - @atlaspack/workers@2.14.33
191
+ - @atlaspack/node-resolver-core@3.7.4
192
+ - @atlaspack/fs@2.15.28
193
+ - @atlaspack/types@2.15.23
194
+ - @atlaspack/logger@2.14.25
195
+
196
+ ## 2.14.32
197
+
198
+ ### Patch Changes
199
+
200
+ - Updated dependencies [[`1180103`](https://github.com/atlassian-labs/atlaspack/commit/118010351ed444f8178988afb3f77807154dd933)]:
201
+ - @atlaspack/utils@3.0.0
202
+ - @atlaspack/fs@2.15.27
203
+ - @atlaspack/node-resolver-core@3.7.3
204
+ - @atlaspack/logger@2.14.24
205
+ - @atlaspack/workers@2.14.32
206
+ - @atlaspack/types@2.15.22
207
+
208
+ ## 2.14.31
209
+
210
+ ### Patch Changes
211
+
212
+ - [#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.
213
+
214
+ - Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922)]:
215
+ - @atlaspack/build-cache@2.13.6
216
+ - @atlaspack/diagnostic@2.14.4
217
+ - @atlaspack/fs@2.15.26
218
+ - @atlaspack/logger@2.14.23
219
+ - @atlaspack/types@2.15.21
220
+ - @atlaspack/utils@2.19.3
221
+ - @atlaspack/workers@2.14.31
222
+ - @atlaspack/node-resolver-core@3.7.2
223
+
224
+ ## 2.14.30
225
+
226
+ ### Patch Changes
227
+
228
+ - Updated dependencies []:
229
+ - @atlaspack/fs@2.15.25
230
+ - @atlaspack/utils@2.19.2
231
+ - @atlaspack/node-resolver-core@3.7.1
232
+ - @atlaspack/logger@2.14.22
233
+ - @atlaspack/types@2.15.20
234
+ - @atlaspack/workers@2.14.30
235
+
236
+ ## 2.14.29
237
+
238
+ ### Patch Changes
239
+
240
+ - [#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
241
+
242
+ - Updated dependencies [[`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
243
+ - @atlaspack/node-resolver-core@3.7.0
244
+ - @atlaspack/fs@2.15.24
245
+ - @atlaspack/utils@2.19.1
246
+ - @atlaspack/logger@2.14.21
247
+ - @atlaspack/types@2.15.19
248
+ - @atlaspack/workers@2.14.29
249
+
250
+ ## 2.14.28
251
+
252
+ ### Patch Changes
253
+
254
+ - Updated dependencies [[`f0349a6`](https://github.com/atlassian-labs/atlaspack/commit/f0349a6b9b04755088f121095ca6301a2ada3767)]:
255
+ - @atlaspack/utils@2.19.0
256
+ - @atlaspack/fs@2.15.23
257
+ - @atlaspack/node-resolver-core@3.6.4
258
+ - @atlaspack/workers@2.14.28
259
+ - @atlaspack/logger@2.14.20
260
+ - @atlaspack/types@2.15.18
261
+
262
+ ## 2.14.27
263
+
264
+ ### Patch Changes
265
+
266
+ - Updated dependencies []:
267
+ - @atlaspack/fs@2.15.22
268
+ - @atlaspack/utils@2.18.4
269
+ - @atlaspack/node-resolver-core@3.6.3
270
+ - @atlaspack/logger@2.14.19
271
+ - @atlaspack/types@2.15.17
272
+ - @atlaspack/workers@2.14.27
273
+
274
+ ## 2.14.26
275
+
276
+ ### Patch Changes
277
+
278
+ - [#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
279
+
280
+ - Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd), [`889c65c`](https://github.com/atlassian-labs/atlaspack/commit/889c65cd25b811045e26a117e7404f694dde77a2)]:
281
+ - @atlaspack/node-resolver-core@3.6.2
282
+ - @atlaspack/build-cache@2.13.5
283
+ - @atlaspack/diagnostic@2.14.3
284
+ - @atlaspack/workers@2.14.26
285
+ - @atlaspack/logger@2.14.18
286
+ - @atlaspack/types@2.15.16
287
+ - @atlaspack/utils@2.18.3
288
+ - @atlaspack/fs@2.15.21
289
+
290
+ ## 2.14.25
291
+
292
+ ### Patch Changes
293
+
294
+ - Updated dependencies []:
295
+ - @atlaspack/fs@2.15.20
296
+ - @atlaspack/utils@2.18.2
297
+ - @atlaspack/node-resolver-core@3.6.1
298
+ - @atlaspack/logger@2.14.17
299
+ - @atlaspack/types@2.15.15
300
+ - @atlaspack/workers@2.14.25
301
+
302
+ ## 2.14.24
303
+
304
+ ### Patch Changes
305
+
306
+ - Updated dependencies [[`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
307
+ - @atlaspack/node-resolver-core@3.6.0
308
+ - @atlaspack/fs@2.15.19
309
+ - @atlaspack/logger@2.14.16
310
+ - @atlaspack/utils@2.18.1
311
+ - @atlaspack/types@2.15.14
312
+ - @atlaspack/workers@2.14.24
313
+
314
+ ## 2.14.23
315
+
316
+ ### Patch Changes
317
+
318
+ - Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
319
+ - @atlaspack/utils@2.18.0
320
+ - @atlaspack/fs@2.15.18
321
+ - @atlaspack/node-resolver-core@3.5.23
322
+ - @atlaspack/workers@2.14.23
323
+ - @atlaspack/logger@2.14.15
324
+ - @atlaspack/types@2.15.13
325
+
326
+ ## 2.14.22
327
+
328
+ ### Patch Changes
329
+
330
+ - [#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
331
+
332
+ - Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
333
+ - @atlaspack/node-resolver-core@3.5.22
334
+ - @atlaspack/build-cache@2.13.4
335
+ - @atlaspack/diagnostic@2.14.2
336
+ - @atlaspack/workers@2.14.22
337
+ - @atlaspack/logger@2.14.14
338
+ - @atlaspack/types@2.15.12
339
+ - @atlaspack/utils@2.17.4
340
+ - @atlaspack/fs@2.15.17
341
+
342
+ ## 2.14.21
343
+
344
+ ### Patch Changes
345
+
346
+ - Updated dependencies []:
347
+ - @atlaspack/fs@2.15.16
348
+ - @atlaspack/types@2.15.11
349
+ - @atlaspack/workers@2.14.21
350
+ - @atlaspack/utils@2.17.3
351
+ - @atlaspack/node-resolver-core@3.5.21
352
+
353
+ ## 2.14.20
354
+
355
+ ### Patch Changes
356
+
357
+ - Updated dependencies []:
358
+ - @atlaspack/fs@2.15.15
359
+ - @atlaspack/utils@2.17.2
360
+ - @atlaspack/node-resolver-core@3.5.20
361
+ - @atlaspack/types@2.15.10
362
+ - @atlaspack/workers@2.14.20
363
+
364
+ ## 2.14.19
365
+
366
+ ### Patch Changes
367
+
368
+ - Updated dependencies []:
369
+ - @atlaspack/fs@2.15.14
370
+ - @atlaspack/utils@2.17.1
371
+ - @atlaspack/node-resolver-core@3.5.19
372
+ - @atlaspack/types@2.15.9
373
+ - @atlaspack/workers@2.14.19
374
+
375
+ ## 2.14.18
376
+
377
+ ### Patch Changes
378
+
379
+ - [#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
380
+
381
+ - [#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
382
+
383
+ - 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)]:
384
+ - @atlaspack/utils@2.17.0
385
+ - @atlaspack/fs@2.15.13
386
+ - @atlaspack/node-resolver-core@3.5.18
387
+ - @atlaspack/workers@2.14.18
388
+ - @atlaspack/logger@2.14.13
389
+ - @atlaspack/types@2.15.8
390
+
391
+ ## 2.14.17
392
+
393
+ ### Patch Changes
394
+
395
+ - Updated dependencies []:
396
+ - @atlaspack/fs@2.15.12
397
+ - @atlaspack/logger@2.14.12
398
+ - @atlaspack/utils@2.16.1
399
+ - @atlaspack/node-resolver-core@3.5.17
400
+ - @atlaspack/workers@2.14.17
401
+ - @atlaspack/types@2.15.7
402
+
403
+ ## 2.14.16
404
+
405
+ ### Patch Changes
406
+
407
+ - Updated dependencies [[`30ee2cf`](https://github.com/atlassian-labs/atlaspack/commit/30ee2cfcd34cf2646ded0eda13fdb80a2a5de529)]:
408
+ - @atlaspack/utils@2.16.0
409
+ - @atlaspack/fs@2.15.11
410
+ - @atlaspack/node-resolver-core@3.5.16
411
+ - @atlaspack/workers@2.14.16
412
+ - @atlaspack/types@2.15.6
413
+
414
+ ## 2.14.15
415
+
416
+ ### Patch Changes
417
+
418
+ - Updated dependencies []:
419
+ - @atlaspack/fs@2.15.10
420
+ - @atlaspack/utils@2.15.3
421
+ - @atlaspack/node-resolver-core@3.5.15
422
+ - @atlaspack/types@2.15.5
423
+ - @atlaspack/workers@2.14.15
424
+
425
+ ## 2.14.14
426
+
427
+ ### Patch Changes
428
+
429
+ - Updated dependencies []:
430
+ - @atlaspack/fs@2.15.9
431
+ - @atlaspack/utils@2.15.2
432
+ - @atlaspack/node-resolver-core@3.5.14
433
+ - @atlaspack/types@2.15.4
434
+ - @atlaspack/workers@2.14.14
435
+
436
+ ## 2.14.13
437
+
438
+ ### Patch Changes
439
+
440
+ - Updated dependencies [[`ef3d622`](https://github.com/atlassian-labs/atlaspack/commit/ef3d6228f4e006702198a19c61e051d194d325cb)]:
441
+ - @atlaspack/workers@2.14.13
442
+ - @atlaspack/logger@2.14.11
443
+ - @atlaspack/fs@2.15.8
444
+ - @atlaspack/types@2.15.3
445
+ - @atlaspack/utils@2.15.1
446
+ - @atlaspack/node-resolver-core@3.5.13
447
+
448
+ ## 2.14.12
449
+
450
+ ### Patch Changes
451
+
452
+ - Updated dependencies [[`e39c6cf`](https://github.com/atlassian-labs/atlaspack/commit/e39c6cf05f7e95ce5420dbcea66f401b1cbd397c)]:
453
+ - @atlaspack/utils@2.15.0
454
+ - @atlaspack/fs@2.15.7
455
+ - @atlaspack/node-resolver-core@3.5.12
456
+ - @atlaspack/workers@2.14.12
457
+ - @atlaspack/types@2.15.2
458
+
459
+ ## 2.14.11
460
+
461
+ ### Patch Changes
462
+
463
+ - Updated dependencies []:
464
+ - @atlaspack/fs@2.15.6
465
+ - @atlaspack/utils@2.14.11
466
+ - @atlaspack/node-resolver-core@3.5.11
467
+ - @atlaspack/types@2.15.1
468
+ - @atlaspack/workers@2.14.11
469
+
470
+ ## 2.14.10
471
+
472
+ ### Patch Changes
473
+
474
+ - 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)]:
475
+ - @atlaspack/fs@2.15.5
476
+ - @atlaspack/types@2.15.0
477
+ - @atlaspack/node-resolver-core@3.5.10
478
+ - @atlaspack/workers@2.14.10
479
+ - @atlaspack/logger@2.14.10
480
+ - @atlaspack/utils@2.14.10
481
+
482
+ ## 2.14.9
483
+
484
+ ### Patch Changes
485
+
486
+ - Updated dependencies [[`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6)]:
487
+ - @atlaspack/fs@2.15.4
488
+ - @atlaspack/logger@2.14.9
489
+ - @atlaspack/utils@2.14.9
490
+ - @atlaspack/node-resolver-core@3.5.9
491
+ - @atlaspack/workers@2.14.9
492
+ - @atlaspack/types@2.14.9
493
+
3
494
  ## 2.14.8
4
495
 
5
496
  ### 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);