bun_bun_bundle 0.17.0 → 0.17.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c79743b209590b3032ac218c34f97bb265a730c6d531a8e610535cc7091b904
4
- data.tar.gz: 72c36c431475e6ae64cd6e9f9b1bfd5e4e6636fe816c08dab890dcd8938d569a
3
+ metadata.gz: c387e6ad8916429ab55c3c5d40d242e38e07ec119c18a67ef2a26e822c838930
4
+ data.tar.gz: '0378dea82862a785be22673192f81fbb418df6c1b6316e09699ff1f4b7238e48'
5
5
  SHA512:
6
- metadata.gz: 2cb7ae2c2abc22ec33e8476a595c083fc9f380020a5c53d1601b34c4e3937ecda165e3b707037a6873cbc3aef79a6a549ddbded82b7e4dc5b3f8c8fd355a256f
7
- data.tar.gz: f224269b08ada52408905e18b29f63a9f03f153cd755add16247b199c25ae551cec554c58bdf3f21fa025a104872667806c2a340c9bc2c95149f7569ec3dce14
6
+ metadata.gz: 7bd880d07c868b9a6ae9f7583d478c620937e17f8e1cb4739af7b166e9d21f4980ef735703182991f72806ae68044d78e0f5c7813b34af4b4a1ef7c90d4ac16d
7
+ data.tar.gz: c6e6731f9bd81ba9b4acc2396fa530c2f9e527569c4e7129a9aa4e70967936b8bc5aa9bebfc50587f1742b304a369feb9b282c887376ec710c24693ce34b92a1
@@ -85,7 +85,10 @@ export default {
85
85
  parseSriFlag(argv) {
86
86
  const value = this.findValueFlag(argv, 'sri', 'sha384')
87
87
  if (value === null) return {}
88
- const algos = value.split(',').map(a => a.trim()).filter(Boolean)
88
+ const algos = value
89
+ .split(',')
90
+ .map(a => a.trim())
91
+ .filter(Boolean)
89
92
  const valid = algos.filter(a => this.SRI_ALGORITHMS.includes(a))
90
93
  const invalid = algos.filter(a => !this.SRI_ALGORITHMS.includes(a))
91
94
  if (invalid.length) {
@@ -237,6 +240,14 @@ export default {
237
240
  `${type}/${fileName}`,
238
241
  content
239
242
  )
243
+
244
+ // Write extra outputs (CSS url() assets above Bun's 128KiB inline limit)
245
+ for (const output of result.outputs) {
246
+ if (output === mainOutput || output === mapOutput) continue
247
+ const dest = join(outDir, output.path)
248
+ mkdirSync(dirname(dest), {recursive: true})
249
+ await Bun.write(dest, output)
250
+ }
240
251
  }
241
252
  },
242
253
 
@@ -306,7 +317,9 @@ export default {
306
317
  await this.buildCSS()
307
318
  await this.writeManifest()
308
319
  const ms = Math.round(performance.now() - start)
309
- const status = this.ok ? 'DONE Built successfully' : ' ✖ Built with errors'
320
+ const status = this.ok
321
+ ? 'DONE Built successfully'
322
+ : ' ✖ Built with errors'
310
323
  console.log(`${status} in ${ms} ms`, this.prettyManifest())
311
324
  return this.ok
312
325
  },
@@ -390,7 +403,9 @@ export default {
390
403
 
391
404
  for (const pattern of this.config.watchDirs) {
392
405
  const dirs = pattern.includes('*')
393
- ? await Array.fromAsync(new Glob(pattern).scan({cwd: this.root, onlyFiles: false}))
406
+ ? await Array.fromAsync(
407
+ new Glob(pattern).scan({cwd: this.root, onlyFiles: false})
408
+ )
394
409
  : [pattern]
395
410
  for (const dir of dirs) {
396
411
  const fullDir = join(this.root, dir)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module BunBunBundle
4
- VERSION = '0.17.0'
4
+ VERSION = '0.17.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bun_bun_bundle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wout Fierens
@@ -73,7 +73,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  - !ruby/object:Gem::Version
74
74
  version: '0'
75
75
  requirements: []
76
- rubygems_version: 4.0.19
76
+ rubygems_version: 4.0.20
77
77
  specification_version: 4
78
78
  summary: A self-contained asset bundler powered by Bun
79
79
  test_files: []