UNPKG

43.8 kBMarkdownView Raw
1# 17.0.0
2* Upgrade events to v3.x. EventEmitter instances now have an `off()` method. `require('events').once` can be used to react to an event being emitted with `async`/`await` syntax. ([#1839](https://github.com/browserify/browserify/pull/1839))
3* Upgrade path-browserify to v1.x. ([#1838](https://github.com/browserify/browserify/pull/1838))
4* Upgrade stream-browserify to v3.x. `require('stream')` now matches the Node.js 10+ API. ([#1970](https://github.com/browserify/browserify/pull/1970))
5* Upgrade util to v0.12. Most notably, `util.promisify` and `util.callbackify` are finally available by default in browserify. ([#1844](https://gihub.com/browserify/browserify/pull/1844))
6* Add JSON syntax checking. Syntax errors in `.json` files will now fail to bundle. ([#1700](https://github.com/browserify/browserify/pull/1700))
7
8# 16.5.2
9
10Upgrade browser-resolve to v2.
11
12https://github.com/browserify/browserify/pull/1973
13
14# 16.5.1
15
16Remove deprecated `mkdirp` version in favour of `mkdirp-classic`.
17
18https://github.com/browserify/browserify/commit/00c913fa345dbb7f612bdad6b4acc91c706e98b2
19
20Pin dependencies for Node.js 0.8 support.
21
22https://github.com/browserify/browserify/pull/1939
23
24# 16.5.0
25
26Support custom name for `"browser"` field resolution in `package.json` using the `browserField` option.
27
28https://github.com/browserify/browserify/pull/1918
29
30# 16.4.0
31
32Upgrade stream-http to v3. This version drops support for IE10 and below.
33
34https://github.com/browserify/browserify/pull/1916
35
36# 16.3.0
37
38add empty stub for the `http2` builtin module.
39
40https://github.com/browserify/browserify/pull/1913
41
42update license text to remove references to code that is no longer included.
43
44https://github.com/browserify/browserify/pull/1906
45
46add more tests for folder resolution.
47
48https://github.com/browserify/browserify/pull/1139
49
50# 16.2.3
51
52add empty stub for the `inspector` builtin module.
53
54https://github.com/browserify/browserify/pull/1854
55
56change the "browser" field link to the browser-field-spec repo instead of the old gist.
57
58https://github.com/browserify/browserify/pull/1845
59
60# 16.2.2
61
62Remove some extraneous files from the published package.
63
64# 16.2.1
65
66Fix relative `--external` paths on Windows.
67
68https://github.com/browserify/browserify/pull/1704
69
70Fix tests to work on Windows, and add Appveyor CI for Windows testing.
71
72https://github.com/browserify/browserify/pull/1819
73
74# 16.2.0
75
76update the browser versions of `vm-browserify` and `string_decoder`.
77
78`string_decoder` updates to the Node 8+ API.
79`vm-browserify` replaces an unlicensed dependency by an MIT one.
80
81https://github.com/browserify/browserify/pull/1829
82
83# 16.1.1
84
85add empty stub for the `perf_hooks` builtin module.
86
87https://github.com/browserify/browserify/pull/1815
88
89# 16.1.0
90
91add `bare` and `node` options to the API, same as the `--bare` and `--node` CLI arguments.
92
93https://github.com/browserify/browserify/pull/1804
94
95# 16.0.0
96
97add `--preserve-symlinks` option from Node 6.3
98
99https://github.com/browserify/browserify/pull/1742
100https://github.com/browserify/browserify/pull/1801
101
102update the browser version of `events` to 2.0.0—this version adds methods like `prependListener` that were introduced in recent node versions, but it is also twice the size of events v1.x (2KB instead of 1KB).
103
104https://github.com/browserify/browserify/pull/1803
105
106Dynamically calculate `__dirname` and `__filename` when `--node` is passed
107
108https://github.com/browserify/browserify/pull/1725
109
110upgrade module-deps, see https://github.com/browserify/module-deps/releases/tag/v6.0.0
111
112https://github.com/browserify/browserify/commit/e5e1ec8799f1007a56118ae46646e0048385ed84
113
114# 15.2.0
115
116create parent directories if they do not exist when `--outfile /x/y/z/bundle.js` is used
117
118https://github.com/browserify/browserify/pull/995
119
120add regression test for object rest spread syntax
121
122https://github.com/browserify/browserify/pull/1798
123
124# 15.1.0
125
126restore support for node `< 4.0` until we can decide on a support schedule
127
128# 15.0.0
129
130fixed repository url in package.json.
131
132https://github.com/browserify/browserify/commit/5ec19eed48a5f46cb48d44be8ffc2f6bfb73fbfb
133
134update `module-deps` to 5.0.0, which enables requiring modules in backtick-enclosed strings.
135
136https://github.com/browserify/browserify/pull/1785
137
138dropped testing in node 0.10 and 0.12, set supported node versions to `>=4`
139
140https://github.com/browserify/browserify/pull/1743
141https://github.com/browserify/browserify/pull/1793
142
143add support for passing arrays to the `exclude` and `ignore` methods.
144
145https://github.com/browserify/browserify/pull/1769
146
147# 14.5.0
148
149update `os-browserify` to 0.3.0, which adds a shim for node.js's `os.homedir` method.
150
151https://github.com/browserify/browserify/pull/1767
152
153update `browserify-zlib` to 0.2.0, which adds support for dictionaries.
154
155https://github.com/browserify/browserify/pull/1733
156
157# 14.4.0
158
159update `string_decoder` to 1.0.0, which matches the latest node.js behavior more closely.
160
161https://github.com/substack/node-browserify/pull/1714
162
163# 14.3.0
164
165update `https-browserify` to 1.0.0, which matches node.js behavior more closely.
166
167- throw exception if non-https URL is passed to `https.request` or `https.get`
168- support passing string URL as first argument to `https.request` and `https.get`
169
170https://github.com/substack/node-browserify/pull/1710
171
172# 14.2.0
173
174adds a --transform-key flag to the command-line tool
175
176https://github.com/substack/node-browserify/pull/1709
177
178# 14.1.0
179
180writes to a temp outfile until success
181
182Previously, browserify would overwrite output files when an error occurs.
183
184https://github.com/substack/node-browserify/pull/1673
185https://github.com/substack/node-browserify/issues/899
186
187# 14.0.0
188
189Updates the version of the buffer package, which drops support for IE8-10.
190
191buffer v5 removes the `Object` implementation and relies on a single,
192fast Typed Array (`Uint8Array`) implementation, greatly simplifying the
193maintanence of the buffer package.
194
195If IE8-10 support is critical to your web app, you can continue to rely on
196browserify v13, or see the PR for other workarounds.
197
198https://github.com/substack/node-browserify/pull/1678
199
200# 13.3.0
201
202updates the version for the assert package
203
204https://github.com/substack/node-browserify/pull/1611
205
206# 13.2.0
207
208allow configuring transformKey from module-deps
209https://github.com/substack/node-browserify/pull/1670
210
211# 13.1.1
212
213boost performance by memoizing calls to path.relative()
214
215https://github.com/substack/node-browserify/pull/1544
216
217# 13.1.0
218
219exposes `opts.dedupe` and `--no-deupe` to optionally turn off deduping behavior:
220[#1581](https://github.com/substack/node-browserify/pull/1581)
221
222# 13.0.1
223
224## Internal
225
226[#1552](https://github.com/substack/node-browserify/pull/1552), [#1555](https://github.com/substack/node-browserify/pull/1555): Use native `Array.isArray` and drop `isarray` dep. ([@kt3k](https://github.com/kt3k))
227
228# 13.0.0
229
230This release bumps the [`buffer`](https://www.npmjs.com/package/buffer) dependency
231to v4, which has one possible breaking change:
232
233- The `buffer.toArrayBuffer()` method on `Buffer` instances has been removed.
234
235(This is probably not a problem for 99.9% of users.)
236
237This API was added in node v0.11.8 and
238[removed before v0.12 was released](https://github.com/nodejs/node-v0.x-archive/issues/7609#issuecomment-42903457).
239It was added to browserify's `buffer` implementation but was never removed when v0.12
240 was released. `buffer` v4 removes it so we have full parity with node.js.
241
242Going forward, to get an `ArrayBuffer` from a node.js-style `Buffer`, users should
243just use `buffer.buffer`. This works because `Buffer` is a subclass of `Uint8Array`
244in both the browser and node.js (since v3).
245
246On the plus side, this release also includes:
247
248- Performance improvements to `buffer` that
249[increase the speed](https://github.com/feross/buffer/pull/92) of some buffer
250methods by as much as 30%!
251
252# 12.0.2
253
254normalizes module paths on windows to consistently use `/`
255
256https://github.com/substack/node-browserify/pull/1424#issuecomment-170143099
257
258# 12.0.1
259
260adds the previously failing tests and a small change necessary for transforms to
261be applied properly for symlinked packages
262
263https://github.com/substack/node-browserify/pull/1392
264
265# 12.0.0
266
267Node support changes: now testing against the latest node (currently 4.2.1).
268node 0.8 is no longer supported, and iojs isn't actively tested.
269
270Stream3 everywhere! Everything has been updated to use streams3.
271
272Sourcemaps charset now uses an `=` instead of a `:`. This fixes certain issues
273with Chinese characters in sourcemaps. See #753.
274
275module-deps has been updated to fix root transforms on symlinked modules. See
276https://github.com/substack/module-deps/pull/99.
277
278stream-http, the module that provides `http` support, dropped IE8 support. If
279you depend on this, see https://github.com/jhiesey/stream-http#ie8-note.
280
281Removed `builtins` and `commondir` – both unused dependencies.
282
283# 11.2.0
284
285When `bundleExternal` is set to `false`, `process` and `buffer` are now correctly excluded. Also, using `--igv` via the CLI now works. That also means that `--bare` and `--node` actually insert `__filename` and `__dirname`.
286
287https://github.com/substack/node-browserify/pull/1361
288
289# 11.1.0
290
291adds a `'.'` to extensions if it wasn't added
292
293https://github.com/substack/node-browserify/pull/1380
294
295# 11.0.1
296
297The callback form of bundle() uses the returned output stream instead of the
298pipeline so that the `'end'` event will fire on the bundle instance.
299
300https://github.com/substack/watchify/pull/249#issuecomment-126061169
301
302# 11.0.0
303
304## streams3
305
306The [`readable-stream`](https://npmjs.com/package/readable-stream) dependency was updated to `^2.0.0`. This package is inserted into bundles as `require('stream')`. Bundles will now get the latest streams implementation from io.js/node.js core, instead of an old version from node.js 0.11.x. Go forth and stream ALL THE DATA without fear!
307
308## shiny new HTTP package
309
310[John Hiesey](https://github.com/jhiesey) rewrote the [http-browserify](https://npmjs.org/package/http-browserify) package
311to create [stream-http](https://npmjs.org/package/stream-http), an implemention of `http` that supports streaming in modern browsers. Before v11.0.0, in most situations when you used `http.get` or `http.request`, the entire request would buffer in memory until the download was complete, and a single `'data'` event was emitted with the entire response as a string.
312
313`stream-http` uses the [Fetch API](https://fetch.spec.whatwg.org/) and various browser-specific XHR extensions to make binary streaming http requests work in as many browsers as possible.
314
315The following browsers support true streaming, where only a small amount of the request has to be held in memory at once:
316
317* Chrome >= 43 (using the `fetch` api)
318* Firefox >= 9 (using `moz-chunked-arraybuffer` responseType with XHR)
319
320The following browsers support pseudo-streaming, where the data is available before the request finishes, but the entire response must be held in memory:
321
322* Safari >= 5
323* IE >= 10
324* Most other Webkit-based browsers, including the default Android browser
325
326Older browsers will work, without streaming support. There is no support for IE6 or IE7.
327
328Compared to `http-browserify`, it is not necessary to set `options.responseType`. The `responseType` property of the XHR object will be set automatically depending on what features are detected in the browser (although see `options.mode` in the [readme](https://github.com/jhiesey/stream-http) to see how you can optimize this choice manually).
329
330The `response` is a streams3 stream, so all data is passed as `Buffer`s, unlike the variable types provided by the `'data'` event in `http-browserify`. This behavior tries to mimic the node core `http` module as closely as possible.
331
332* [#1327](https://github.com/substack/node-browserify/pull/1327)
333
334If you're brave, go ahead and give v11.0.0 a try today!
335
336# 10.2.6
337
338uses the non-sync version of fs.realpath
339
340# 10.2.5
341
342fixes an issue with symlinked files executing multiple times
343
344https://github.com/substack/node-browserify/issues/1063
345https://github.com/substack/node-browserify/pull/1318
346
347# 10.2.4
348
349fixes requiring an entry from another entry
350
351remove unused dep "deep-equal" and unused file "lib/_exclude.js"
352
353https://github.com/substack/node-browserify/pull/1268
354
355# 10.2.3
356
357fixes an errant space in the `--no-browser-field` flag alias
358that kept it from working
359
360https://github.com/substack/node-browserify/issues/1286
361
362# 10.2.2
363
364fix tests for tap@^1.1.0 (and update tap)
365
366https://github.com/substack/node-browserify/pull/1276
367
368# 10.2.1
369
370housekeeping - removed unused code
371
372https://github.com/substack/node-browserify/pull/1273
373
374# 10.2.0
375
376remove unnecessary "isDedupe" json check. this was a hack-fix for watchify <=2.4.
377
378https://github.com/substack/node-browserify/pull/1244
379
380fixes for the "noParse" path matcher.
381
382https://github.com/substack/node-browserify/pull/1257
383
384add syntax check cache. this speeds up rebuilds (like when using watchify).
385
386https://github.com/substack/node-browserify/pull/1253
387
388update to browser-pack@^5.0.0 - includes several fixes related to source maps.
389
390https://github.com/substack/node-browserify/pull/1259
391
392# 10.1.3
393
394Replace jsonstream with JSONStream
395
396https://github.com/substack/node-browserify/pull/1252
397
398# 10.1.2
399
400Replace JSONStream with jsonstream
401Update deps to avoid jsonstream npm case problems
402
403https://github.com/substack/node-browserify/pull/1247
404https://github.com/substack/node-browserify/commit/1ca71e23
405
406# 10.1.1
407
408ensures that entry paths are always full paths
409
410https://github.com/substack/node-browserify/pull/1248
411
412# 10.1.0
413
414adds `--no-browser-field` and `opts.browserField = false` behavior to turn off
415the package.json browser field. This is useful if you want to make a bundle with
416a target of node or some environment with shimmed node primitives.
417
418A new alias `--node` sets `--no-browser-field` and `--bare`.
419
420https://github.com/substack/node-browserify/pull/1240
421
422# 10.0.0
423
424## Possibly Breaking Change
425The ‘process’ dependency was updated to ~0.11.0, this module is inserted into bundles as the ‘process’ global/dependency.
426Previously, an unhandled error thrown in a ‘process.nextTick’ task would prevent any subsequent tasks from running, forever.
427The task queue now recovers from this condition, but may do so on a future browser tick.
428As part of this update, ‘process.nextTick’ now accepts variadic arguments, passed to the task, added to io.js in 1.8.1.
429
430* [#1231](https://github.com/substack/node-browserify/pull/1231)
431* [defunctzombie/node-process#38](https://github.com/defunctzombie/node-process/pull/38)
432* [iojs/io.js#1077](https://github.com/iojs/io.js/pull/1077)
433
434## Other changes
435
436* Escapes JavaScript-unsafe characters from JSON. [#1211](https://github.com/substack/node-browserify/pull/1211)
437* Removes ‘-v’ shortcut for ‘--version’ (conflicted with watchify) [#1222](https://github.com/substack/node-browserify/pull/1222)
438* Updated ‘defined’, ‘punycode’, ‘module-deps’, and ‘xtend’ dependencies to reduce install size [#1230](https://github.com/substack/node-browserify/pull/1230)
439
440# 9.0.8
441
442makes `.require({ expose: 'name' })` and `require('name')` work at the same time
443
444https://github.com/substack/node-browserify/issues/850
445https://github.com/substack/node-browserify/pull/1202
446
447# 9.0.7
448
449fixes an issue with catching error events on the b.bundle() stream
450
451https://github.com/substack/node-browserify/issues/1194
452https://github.com/substack/node-browserify/pull/1195
453
454# 9.0.6
455
456republishing 9.0.5 in an attempt to satisfy npm.
457
458# 9.0.5
459
460sets the stream returned by bundle() to be readable-only
461
462https://github.com/substack/node-browserify/pull/1187#issuecomment-89044008
463
464# 9.0.4
465
466handles the colon better for drive paths and improves the test suite for windows
467users
468
469https://github.com/substack/node-browserify/pull/1182
470https://github.com/substack/node-browserify/pull/1183
471
472# 9.0.3
473
474fixes a problem with deduping for json files.
475
476This caused problems for running bundle() multiple times on the same instance
477with caching turned on, which people reported encountering using watchify.
478
479https://github.com/substack/node-browserify/issues/1101
480https://github.com/substack/watchify/issues/143
481
482# 9.0.2
483
484fixes a bug where transforms in `opts.transform` were getting run twice
485
486https://github.com/substack/node-browserify/issues/1124
487https://github.com/substack/node-browserify/pull/1128
488
489# 9.0.1
490
491fixes exposed files persisting across bundles
492
493https://github.com/substack/node-browserify/pull/1030
494
495# 9.0.0
496
497updates browser-pack which uses umd 3.0.0.
498This sligtly changes how `--standalone $name` works.
499
500https://github.com/substack/browser-pack/pull/49
501https://github.com/substack/node-browserify/pull/1105
502
503Also some tidying up around handling expose that module-deps can do now:
504
505https://github.com/substack/node-browserify/pull/1077
506
507and some fixes to regressions involving the `'package'` event:
508
509https://github.com/substack/node-resolve/issues/69
510
511Upstream changes in resolve/browser-resolve mean that `require('foo/bar')` works
512better with the package.json browser field. You can do something like:
513
514``` json
515{
516 "browser": { "./bar": "whatever.js" }
517}
518```
519
520# 8.1.3
521
522uses / instead of \ for source map url separators on windows
523https://github.com/substack/node-browserify/pull/1096
524
525# 8.1.2
526
527resolves mappings from the browser field for externals
528
529https://github.com/substack/node-browserify/pull/1100
530
531# 8.1.1
532
533fixes an issue with resolving exposed packages relative to the basedir
534
535https://github.com/substack/node-browserify/pull/1059
536https://github.com/substack/node-browserify/issues/1039
537https://github.com/daiweilu/browserify-broken-require
538
539# 8.1.0
540
541use assert@1.3, which fixes a bug in assert.deepEqual related to argument ordering,
542and ensures assert.deepEqual continues working in Chrome 40 and Firefox 35.
543
544use process@0.10, which adds process.umask() and a faster process.nextTick()
545implementation.
546
547https://github.com/substack/node-browserify/pull/1018
548https://github.com/substack/node-browserify/pull/1041
549
550# 8.0.3
551
552passes opts.debug through to insert-module-globals so that is can insert inline
553source maps for its modifications
554
555# 8.0.2
556
557ensures that transforms always execute in the order they were added
558
559https://github.com/substack/node-browserify/pull/1043
560
561# 8.0.1
562
563fixes some file path leaks in deduped deps
564
565https://github.com/substack/node-browserify/pull/994
566https://github.com/substack/node-browserify/issues/951
567
568# 8.0.0
569
570In previous releases, the deduping logic was over-zealous about how it handled
571module references for duplicates. The prior behavior would detect when the
572dependency tree of a module matched an existing module in addition to having the
573exact same source code to share an instance. This was originally designed to
574support libraries like threejs that internally use `instanceof` checks that
575don't usually work very well across multiple packages. This feature didn't pan
576out and didn't work very well in practice.
577
578Later, a better way of deduping emerged after some unrelated tweaks to
579browser-pack to support source introspection for webworkers. The reflection form
580of deduping using implicit arguments is now the only kind.
581
582The deduping instance feature resulted in this bug:
583https://github.com/substack/node-browserify/issues/1027
584which created very surprising results when duplicate files were in use.
585
586# 7.1.0
587
588uses the new buffer@3.0.0, which passes node's own buffer test suite
589
590https://github.com/substack/node-browserify/pull/1040
591
592# 7.0.3
593
594allows modules to be bundled with local paths and exposed at the same time
595
596https://github.com/substack/node-browserify/pull/1033
597
598# 7.0.2
599
600fixes the global transform getting added each re-bundle
601
602https://github.com/substack/node-browserify/issues/1026
603
604# 7.0.1
605
606fixes rebundling (used by watchify) when transforming
607
608https://github.com/substack/node-browserify/issues/1012
609
610also fixes https://github.com/substack/node-browserify/issues/1015
611
612# 7.0.0
613
614Global transforms are now resolved to an absolute path before walking files.
615This fixes some bugs with local module versions taking precedence over global
616transforms and unresolvable global transforms spanning system directories.
617
618This is a small breaking change since now transform objects live in the pipeline
619between the record and deps phases. This should only affect programs that expect
620records in the pipeline to only contain file objects.
621
622# 6.3.4
623
624fixes a bug setting placeholder filenames on stream inputs to be properly unique
625
626# 6.3.3
627
628fixes an issue with the expose property when opts.fullPaths is enabled
629
630This issue commonly crops up in watchify.
631
632https://github.com/substack/node-browserify/pull/991
633https://github.com/substack/node-browserify/issues/850
634
635# 6.3.2
636
637updates regexps that test for absolute and relative paths to work better on
638windows
639
640https://github.com/substack/node-browserify/pull/948
641
642# 6.3.1
643
644fixes ignoreTransform for the case where transforms were given in package.json
645as an array
646
647https://github.com/substack/node-browserify/pull/966
648
649# 6.3.0
650
651uses noParse for better parity with module-deps
652
653https://github.com/substack/node-browserify/pull/954
654
655# 6.2.0
656
657fixes #!shebang syntax when --bare is in effect by adding an unshebang phase to
658the pipeline
659
660https://github.com/substack/node-browserify/issues/943
661
662# 6.1.2
663
664fixes the behavior for multiple external bundles
665
666https://github.com/substack/node-browserify/issues/933
667
668# 6.1.1
669
670fixes a circular dependency issue with readable-stream
671
672https://github.com/substack/node-browserify/pull/964
673https://github.com/substack/node-browserify/issues/963
674
675# 6.1.0
676
677allows transforms to be ignored throughout the entire bundle
678
679https://github.com/substack/node-browserify/pull/945
680
681# 6.0.3
682
683fixes a bug where module insert-module-globals would trigger too soon and
684conflict with other transforms
685
686https://github.com/substack/node-browserify/issues/867
687https://github.com/substack/node-browserify/issues/895
688https://github.com/substack/node-browserify/issues/855
689
690# 6.0.2
691
692upgrades process to 0.8.0
693https://github.com/substack/node-browserify/pull/906
694
695# 6.0.1
696
697respects opts.expose in require()
698https://github.com/substack/node-browserify/pull/907
699
700# 6.0.0
701
702resolves source map maths relative to the base url. This should help with more
703reproducible builds.
704
705https://github.com/substack/node-browserify/pull/923
706
707Version 6 is a tiny but breaking change to how source map paths work.
708
709Now all source map paths are relative by default. This makes it easier to have
710deterministic debug builds across different systems and directories. If
711browserify is installed in a project-local directory, all the source map paths
712will be self-contained and relative against that location in node_modules.
713
714# 5.13.1
715
716bails early if opts.basedir is not the correct type
717https://github.com/substack/node-browserify/pull/927
718
719# 5.13.0
720
721exposes global browserify options to transforms under opts._flags
722https://github.com/substack/node-browserify/pull/910
723
724# 5.12.2
725
726fixes the array form of b.external()
727https://github.com/substack/node-browserify/issues/930
728
729# 5.12.1
730
731dedupe deps when fullPaths is on
732https://github.com/substack/node-browserify/pull/917
733and fixes the crypto tests
734
735# 5.12.0
736
737adds back the array form for add() and require(), with extra places to add
738options
739
740# 5.11.2
741
742fixes ignore for relative paths
743in https://github.com/substack/node-browserify/issues/896
744
745# 5.11.1
746
747fixes exports across resets, which caused issues for watchify with exports
748https://github.com/substack/node-browserify/pull/892
749
750# 5.11.0
751
752adds an implicit dependency on the original module during dedupe
753https://github.com/substack/node-browserify/pull/880
754
755# 5.10.1
756
757fixes the command-line client to properly ignore paths that don't match a glob
758https://github.com/substack/node-browserify/pull/866
759
760# 5.10.0
761
762adds back support for `.external(b)` on a browserify instance `b`
763that was dropped on the v5 refactor
764
765# 5.9.3
766
767buffers the record pipeline phase to start outputting after the first tick
768so that user plugins can capture and modify recorder output
769
770# 5.9.2
771
772fixes a bug with using --ignore to exclude node_modules packages on the command-line
773
774https://github.com/substack/node-browserify/pull/845
775
776# 5.9.1
777
778improves the detection for --ignore
779
780# 5.9.0
781
782fixes bug with builtins that load json files (the 'constants' module),
783new 'json' pipeline label
784
785https://github.com/substack/module-deps/issues/46
786
787# 5.8.0
788
789allow optional extensions in bin/args
790
791# 5.7.0
792
793re-instates transforms after a reset and fixes exposing the transform events
794properly
795
796# 5.6.1
797
798makes stream entry files deterministic
799
800# 5.6.0
801
802adds 'package' events from module-deps when a package.json file is read
803
804# 5.5.0
805
806adds back the `'bundle'` event and copies over options correctly to reset()
807
808# 5.4.2
809
810adds a note about derequire in standalone mode to the readme
811
812# 5.4.1
813
814fixes an error with basedir resolving plugins from names
815
816# 5.4.0
817
818also allows opts.plugin from the constructor like transform
819
820# 5.3.0
821
822passes `.file` on stream inputs through to transforms
823https://github.com/substack/node-browserify/issues/744
824
825# 5.2.1
826
827sets require() for streams to not just be entry files
828
829# 5.2.0
830
831upgrades crypto-browserify to v3
832
833# 5.1.1
834
835updates --list to always print file paths
836
837# 5.1.0
838
839adds back `.plugin()` which was mistakenly omitted
840
841# 5.0.8
842
843fixes using debug and standalone at the same time
844https://github.com/substack/node-browserify/issues/750
845
846# 5.0.7
847
848fixes command-line versions of -u and -x
849https://github.com/substack/node-browserify/issues/821
850
851# 5.0.6
852
853test for --bare
854
855# 5.0.5
856
857fix for detectGlobals, --bare
858https://github.com/substack/node-browserify/issues/803
859
860# 5.0.4
861
862fixes --no-bundle-external with globals
863
864https://github.com/substack/node-browserify/issues/828
865
866# 5.0.3
867
868upgrades insert-module-globals to fix
869https://github.com/substack/node-browserify/issues/834
870
871# 5.0.2
872
873fixes the changelog link https://github.com/substack/node-browserify/pull/835
874
875# 5.0.1
876
877adds an untracked test
878
879# 5.0.0
880
881At a glance:
882
883* extensible internal labeled-stream-splicer pipeline
884* bundle() - no longer accepts `opts`, callback gets a buffer
885* b.deps(), b.pack(), opts.pack, opts.deps are gone
886* can call bundle() multiple times on the same instance
887* a better --noparse matcher
888* id labeling integer index based instead of hash based
889* derequire removed for performance reasons
890* .external(bundle) has been removed (for now)
891* semicolon at end of output
892* hashing is gone so `expose: true` or explicit expose id is required for doing
893multi-export bundles
894
895Version 5 is a big rearranging of browserify internals with more places for
896external code to hook into the build pipeline.
897
898These changes are mostly aligned around the theme of making it easier for
899external code to interface with browserify internals in a less hacky way.
900
901## pipeline
902
903Now the core of browserify is organized into a
904[labeled-stream-splicer](https://npmjs.org/package/labeled-stream-splicer)
905pipeline. This means that user code and plugins can hook into browserify by
906pushing themselves onto the pipeline at a label:
907
908``` js
909var browserify = require('browserify');
910var through = require('through2');
911var bundle = browserify();
912
913bundle.pipeline.get('deps').push(through.obj(function (row, enc, next) {
914 console.log('DEP:', row.id);
915 this.push(row);
916 next();
917}));
918```
919
920User code can remove existing transforms or add its own hooks. These are the
921labeled sections you can get a handle on with `bundle.pipeline.get()`
922
923* `'record'` - save inputs to play back later on subsequent `bundle()` calls
924* `'deps'` - [module-deps](https://npmjs.org/package/module-deps)
925* `'unbom'` - remove byte-order markers
926* `'syntax'` - check for syntax errors
927* `'sort'` - sort the dependencies for deterministic bundles
928* `'dedupe'` - remove duplicate source contents
929* `'label'` - apply integer labels to files
930* `'emit-deps'` - emit `'dep'` event
931* `'debug'` - apply source maps
932* `'pack'` - [browser-pack](https://npmjs.org/package/browser-pack)
933* `'wrap'` - apply final wrapping, `require=` and a newline and semicolon
934
935Because there is now a proper pipeline, `opts.pack`, `opts.deps`, `b.deps()`,
936and `b.pack()` are removed.
937
938## bundle()
939
940Big changes have been made to the `bundle()` function. All options have been
941moved out of the `bundle(opts)` form and into the browserify constructor. Before
942there was an unclear split between which arguments went into which function.
943
944You can now call `bundle()` multiple times on the same instance, even in
945parallel. This will greatly simplify the caching system under watchify and will
946fix many long-standing bugs.
947
948The callback to `bundle(cb)` is now called with `cb(err, buf)` instead of
949`cb(err, string)` as before.
950
951## labeling
952
953The former hashing system is removed, in favor of file paths rooted at the
954`opts.basedir`, or the cwd.
955
956This removal means that browserify can be much more consistent about applying
957integer ids, which avoids exposing system paths in bundle output.
958
959Hashes are used internally for deduping purposes, but they operate on the
960source content only.
961
962## others
963
964The matching logic in the `--noparse` feature is greatly improved.
965
966derequire has been taken out of core, which should speed up `--standalone`.
967
968# 4.2.3
969
970reverts 4.2.2 due to breaking some existing use-cases
971
972# 4.2.2
973
974fixes a bug applying transforms to symlinked files by resolving the realpath
975first https://github.com/substack/node-browserify/pull/831
976
977# 4.2.1
978
979SECURITY NOTICE
980
981Make sure your installation of browserify is using syntax-error@1.1.1 or
982later. there was a security vulnerability where a malicious file could
983execute code when browserified.
984
985The vulnerability involves breaking out of `Function()`, which was used to
986check syntax for more informative errors. In node 0.10, `Function()` seems
987to be implemented in terms of `eval()`, so malicious code can execute even
988if the function returned by `Function()` was never called. node 0.11 does
989not appear to be vulnerable.
990
991Thanks to Cal Leeming [cal@iops.io]
992for discovering and disclosing this bug!
993
994# 4.2.0
995
996upgrades http-browserify, crypto-browserify, and sets more versions to float
997with ^ semvers
998
999# 4.1.11
1000
1001fixes a bug with transform argument handling https://github.com/substack/node-browserify/pull/795
1002
1003# 4.1.10
1004
1005upgrades browser-resolve to get opts.path fixes https://github.com/defunctzombie/node-browser-resolve/pull/43
1006
1007# 4.1.9
1008
1009upgrades resolve to fix relative NODE_PATH paths https://github.com/substack/node-resolve/pull/46
1010
1011# 4.1.8
1012
1013bumps the module-deps version to get an ordering bugfix https://github.com/substack/module-deps/pull/39 https://github.com/substack/node-browserify/pull/774
1014
1015# 4.1.7
1016
1017fixes ignoreMissing when set in the constructor https://github.com/substack/node-browserify/pull/785
1018
1019# 4.1.6
1020
1021emits the 'id' event on the correct instance https://github.com/substack/node-browserify/pull/780
1022
1023# 4.1.5
1024
1025added this document
1026
1027# 4.1.4
1028
1029fixes a bug in `ie<=8` support for querystring https://github.com/substack/node-browserify/issues/764
1030
1031# 4.1.2
1032
1033upgrades umd to fix some issues with --standalone https://github.com/substack/node-browserify/pull/714
1034
1035# 4.1.1
1036
1037makes deps() behave more like bundle() https://github.com/substack/node-browserify/issues/757 and fixes global transform precedence https://github.com/substack/node-browserify/issues/759
1038
1039# 4.1.0
1040
1041upgrades the version of buffer to ^2.3.0
1042
1043# 4.0
1044
1045Here are the new breaking changes in browserify v4. Most users should be unaffected.
1046
1047## readable-stream
1048
1049`require('stream')` is now using [readable-stream](https://npmjs.org/package/readable-stream) (but the classic-mode shim persists in stream-browserify just like in node core). This should result in much smaller files for all modules using a similar-enough version of readable-stream as browserify itself. Other modules should be relatively unaffected.
1050
1051## removed .expose()
1052
1053Removal of the previously-deprecated and obscure `bundle.expose()`.
1054
1055## took out implicit reading from stdin
1056
1057Previously if you invoked the browserify command without any entry files as arguments and stdin was a tty, stdin would be implicitly added as an entry file. This feature was causing problems so it has been removed. https://github.com/substack/node-browserify/issues/724#issuecomment-42731877
1058
1059## more!
1060
1061In the run-up to the 4.0, [module-deps](https://npmjs.org/package/module-deps) got an extensive rewrite with minimal test changes. Mostly it was just getting really messy because it was a giant ball-of-mud closure instead of a more straightforward prototype-based implementation with more clearly-defined methods.
1062
1063The module-deps rewrite was triggered by [system paths showing up in build output](https://github.com/substack/node-browserify/issues/675) but was fixed in 3.46.1. The solution actually didn't end up needing changes in module-deps as originally anticipated but module-deps was in dire need of a cleanup.
1064
1065# 3.46.1
1066
1067fixes a bug exposing the host path of the process module in the bundle output https://github.com/substack/insert-module-globals/pull/32
1068
1069# 3.46.0
1070
1071allows array arguments in b.require(), b.add(), and b.external() https://github.com/substack/node-browserify/pull/742 from @spacepluk
1072
1073# 3.45.0
1074
1075renders complete stack traces where before they were getting truncated https://github.com/substack/node-browserify/pull/741 patch from @secoif
1076
1077# 3.44.2
1078
1079slims down the dependency payload by 20M https://github.com/substack/node-browserify/pull/736
1080
1081# 3.44.1
1082
1083fixes the recursion error many people were getting https://github.com/substack/node-browserify/pull/713 Thanks to @MattMcKegg for isolating the bug!
1084
1085# 3.44.0
1086
1087upgrades module-deps to 1.10.0 to make all the packageFilter dir argument pathways are consistent
1088
1089# 3.43.0
1090
1091lets b.transform(opts, t) args to be swapped around since opts is more common as a last argument
1092
1093# 3.42.0
1094
1095passes through the dir parameter in opts.packageFilter from module-deps 1.10.0 https://github.com/substack/node-browserify/pull/731
1096
1097# 3.41.0
1098
1099has an option to disable external files, making it easier to run bundles in node for code coverage https://github.com/substack/node-browserify/pull/672
1100
1101# 3.40.4
1102
1103makes --list work again https://github.com/substack/node-browserify/pull/727
1104
1105# 3.40.3
1106
1107merges a patch for piping via stdin and --require at the same time https://github.com/substack/node-browserify/pull/728
1108
1109# 3.40.2
1110
1111upgrades module-deps to fix --list for $NODE_PATH https://github.com/substack/node-browserify/issues/726
1112
1113# 3.40.1
1114
1115upgrades module-deps to get this packageTransform bugfix https://github.com/substack/module-deps/pull/32
1116
1117# 3.40.0
1118
1119modifies the behavior of opts.builtins to be more useful and intuitive https://github.com/substack/node-browserify/pull/717
1120
1121# 3.39.0
1122
1123adds a zlib that has parity with node https://github.com/substack/node-browserify/pull/721
1124
1125# 3.38.0
1126
1127upgrades derequire which uses esprima-fb https://github.com/substack/node-browserify/pull/710
1128
1129# 3.37.2
1130
1131adds 'close' events back to the bundle stream. This should fix some issues with watchify.
1132
1133# 3.37.1
1134
1135fixes a bug with through being required in the bin/cmd.js instead of through2
1136
1137# 3.37.0
1138
1139also reverts that require('process') thing which was mistakenly briefly put in the builtins list
1140
1141# 3.37.0
1142
1143gives streams2 semantics for bundle() https://github.com/substack/node-browserify/pull/646
1144
1145# 3.36.1
1146
1147fixes a dumb bug with ^ for versions that don't work in old npm clients
1148
1149# 3.36.0
1150
1151adds require('process') and removes the path resolution for process out of insert-module-globals
1152
1153# 3.35.0
1154
1155adds an empty tls stub to the builtins list https://github.com/substack/node-browserify/issues/703
1156
1157# 3.34.0
1158
1159fixes a bug with transforms not being applied in deps() https://github.com/substack/node-browserify/pull/708
1160
1161# 3.33.1
1162
1163fixes a bug with options in --global-transform on the command-line https://github.com/substack/node-browserify/pull/705
1164
1165# 3.33.0
1166
1167fixes parsing errors while maintaining es6 support by switching to esprima-fb https://github.com/substack/node-browserify/issues/698
1168
1169# 3.32.1
1170
1171should be easier to shinkwrap and install on windows https://github.com/substack/node-browserify/pull/684
1172
1173# 3.32.0
1174
1175adds --full-path and opts.fullPath to always expand ids to full paths https://github.com/substack/node-browserify/pull/668#issuecomment-36586786
1176
1177# 3.31.2
1178
1179fixes a bug in the subarg argument parsing for multiple transforms https://github.com/substack/node-browserify/issues/678
1180
1181# 3.31.1
1182
1183uses process.cwd() as the default rebase target instead of commondir https://github.com/substack/node-browserify/pull/669#issuecomment-36078282
1184
1185# 3.31.0
1186
1187merges https://github.com/substack/node-browserify/pull/669 which should help with more deterministic builds across systems
1188
1189# 3.30.4
1190
1191fixes parsing the --insert-global-vars argument properly https://github.com/substack/node-browserify/pull/674
1192
1193# 3.30.3
1194
1195fixes exclude globbing in the arg parser https://github.com/substack/node-browserify/pull/676
1196
1197# 3.30.2
1198
1199included a fix for --no-builtins for non-wrapped modules https://github.com/substack/node-browserify/pull/666
1200
1201# 3.30.1
1202
1203upgrades buffer for a utf8 fix https://github.com/substack/node-browserify/pull/656
1204
1205# 3.30.0
1206
1207adds globs for -u, -i, and -x https://github.com/substack/node-browserify/issues/654
1208
1209# 3.29.1
1210
1211adds relatively-resolved paths to ignored and excluded files
1212
1213# 3.29.0
1214
1215upgrades http-browserify to 1.3.1
1216
1217# 3.28.2
1218
1219now always includes the full package.json content in the 'package' event
1220
1221# 3.28.1
1222
1223fixes a bug with stream entry order https://github.com/substack/node-browserify/pull/643
1224
1225# 3.28.0
1226
1227adds plugins for doing super fancy things like factored bundle output https://github.com/substack/node-browserify#plugins
1228
1229# 3.27.1
1230
1231fixes a bug resolving transform modules when browserify is under a symlink
1232
1233# 3.27.0
1234
1235adds transform configuration in the package.json browserify.transform field https://github.com/substack/module-deps#packagejson-transformkey
1236
1237# 3.26.0
1238
1239you can pass arguments to transforms https://github.com/substack/node-browserify/blob/master/bin/advanced.txt#L67-L77
1240
1241# 3.25.2
1242
1243fixes a bug where the transform event didn't fire while IO was pending
1244
1245# 3.25.1
1246
1247fixes the transform docs
1248
1249# 3.25.0
1250
1251adds 'bundle' and 'transform' events https://github.com/substack/node-browserify#bonbundle-function-bundle-
1252
1253# 3.24.11
1254
1255upgrades derequire to 0.6.0. That should be the last piece needed for full es6 syntax support.
1256
1257# 3.24.10
1258
1259expands the documentation for the package.json browser and browserify.transform fields https://github.com/substack/node-browserify#packagejson
1260
1261# 3.24.9
1262
1263fixes generator syntax and other es6-isms in browserify https://github.com/substack/node-browserify/issues/614
1264
1265# 3.24.7
1266
1267fixes noParse, which had accidentally been disabled in the insert-module-global changes and also closes https://github.com/substack/node-browserify/issues/504
1268
1269# 3.24.6
1270
1271similar to 3.24.5, 3.24.6 fixes some error reporting propagation from the browserify command
1272
1273# 3.24.3
1274
1275fixes how require('buffer').Buffer wasn't the same as implicit Buffer https://github.com/substack/node-browserify/issues/612
1276
1277# 3.24.2
1278
1279fixes where the output stream didn't emit "close" in standalone mode https://github.com/substack/node-browserify/pull/608
1280
1281# 3.24.1
1282
1283fixes an issue where --standalone combined with expose caused a syntax error https://github.com/substack/node-browserify/issues/489
1284
1285# 3.24.0
1286
1287removes require() calls from --standalone so you can require() a standalone bundle again
1288
1289# 3.23.0
1290
1291merges this tiny fix returning `this` in noParse() https://github.com/substack/node-browserify/pull/592
1292
1293# 3.22.0
1294
1295merges https://github.com/substack/node-browserify/pull/587 which changes the source map prefix from //@ to //#
1296
1297# 3.21.0
1298
1299standardizes the module missing error formats to have filename, parent, and type === 'not found' fields
1300
1301# 3.20.1
1302
1303has a fix for the case where stdin is implicitly treated as the input stream instead of a file
1304
1305# 3.20.0
1306
13073.20.0 is out: parity with how $NODE_PATH works in node https://github.com/substack/node-browserify/issues/593
1308
1309# 3.19.1
1310
1311restores support for node 0.8 by upgrading concat-stream
1312
1313# 3.0
1314
1315A new [browserify](http://browserify.org) version is upon us, just in time for
1316the FESTIVE SEASON during which we in the northern hemisphere at mid to high
1317latitudes huddle for warmth around oxidizing hydrocarbons!
1318
1319There are 2 big changes in v3 but most code should be relatively unaffected.
1320
1321## shiny new Buffer
1322
1323[feross](https://github.com/feross) forked
1324the [buffer-browserify](https://npmjs.org/package/buffer-browserify) package
1325to create
1326[native-buffer-browserify](https://npmjs.org/package/native-buffer-browserify),
1327a `Buffer` implementation that uses `Uint8Array` to get `buf[i]` notation and
1328parity with the node core `Buffer` api without the performance hit of the
1329previous implementation and a much smaller file size. The downside is that
1330`Buffer` now only works in browsers with `Uint8Array` and `DataView` support.
1331All the other modules should maintain existing browser support.
1332
1333*Update*: a [shim was added](https://npmjs.org/package/typedarray)
1334to in 3.1 for Uint8Array and DataView support. Now you can use `Buffer` in every
1335browser.
1336
1337## direct builtin dependencies
1338
1339In v3, browserify no longer depends on
1340[browser-builtins](https://npmjs.org/package/browser-builtins), in favor of
1341depending on packages directly. Instead of having some separate packages and
1342some files in a `builtin/` directory like browser-builtins, browserify now uses
1343*only* external packages for the shims it uses. By only using external packages
1344we can keep browserify core focused purely on the static analysis and bundling
1345machinery while letting the individual packages worry about things like browser
1346compatibility and parity with the node core API as it evolves.
1347
1348Individual, tiny packages should also be much easier for newcomers to contribute
1349packages toward because they won't need to get up to speed with all the other
1350pieces going on and the packages can have their own tests and documentation.
1351Additionally, each package may find uses in other projects beside browserify
1352more easily and if people want variations on the versions of shims that ship
1353with browserify core this is easier to do when everything is separate.
1354
1355Back when we were using browser-builtins there was a large latency between
1356pushing out fixes to the individual packages and getting them into browserify
1357core because we had to wait on browser-builtins to upgrade the semvers in its
1358package.json. With direct dependencies we get much lower latency for package
1359upgrades and much more granular control over upgrading packages.
1360
1361Here is the list of packages we now directly depend on in v3:
1362
1363* [assert](https://npmjs.org/package/assert)
1364* [buffer](https://npmjs.org/package/native-buffer-browserify)
1365* [console](https://npmjs.org/package/console-browserify)
1366* [constants](https://npmjs.org/package/constants-browserify)
1367* [crypto](https://npmjs.org/package/crypto-browserify)
1368* [events](https://npmjs.org/package/events-browserify)
1369* [http](https://npmjs.org/package/http-browserify)
1370* [https](https://npmjs.org/package/https-browserify)
1371* [os](https://npmjs.org/package/os-browserify)
1372* [path](https://npmjs.org/package/path-browserify)
1373* [punycode](https://npmjs.org/package/punycode)
1374* [querystring](https://npmjs.org/package/querystring)
1375* [stream](https://npmjs.org/package/stream-browserify)
1376* [string_decoder](https://npmjs.org/package/string_decoder)
1377* [timers](https://npmjs.org/package/timers-browserify)
1378* [tty](https://npmjs.org/package/tty-browserify)
1379* [url](https://npmjs.org/package/url)
1380* [util](https://npmjs.org/package/util)
1381* [vm](https://npmjs.org/package/vm-browserify)
1382* [zlib](https://npmjs.org/package/zlib-browserify)
1383
1384That's it! If you're bold enough to give v3 a spin, just do:
1385
1386```
1387npm install -g browserify
1388```
1389
\No newline at end of file