UNPKG

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