Update dependency browser-sync to ~2.26.9 - autoclosed #147
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
~2.9.11
->~2.26.9
By merging this PR, the below vulnerabilities will be automatically resolved:
Release Notes
BrowserSync/browser-sync
v2.26.9
Compare Source
v2.26.7
Compare Source
v2.26.6
Compare Source
v2.26.5
Compare Source
v2.26.4
Compare Source
v2.26.3
Compare Source
fixes
d60cd91
0a2ff5a
9f3fea4
v2.26.2
Compare Source
v2.26.1
Compare Source
v2.26.0
Compare Source
these notes describe the change from 2.24.6 -> 2.26.0
fixes
257fba6
domain
key in proxy responsesdacfc8b
11729cc
06ee1b7
9e96603
48286e0
chore
0d4ab81
900e23e
ef12e9a
lerna
7c0ad4e
c108af8
4ac3a49
d6198f9
325c775
feature
d641916
docs
cf0febd
16487ad
deps
27f2173
a6578a3
v2.25.0
Compare Source
Browsersync can now be used in more restrictive areas, ones where you cannot simply bind to all addresses on the host (such as schools or universities) - this is enabled via the
listen
option.For backwards compatibility reasons, we actually cannot use the
host
option to acheive this (even though that would make the most sense), as it would break some people's existing setups.This is mainly because in the past,
host
was not used to determine an address to bind to, but rather just as a way of changing the urls Browsersync displays to the user. :( :( :(It was a big mistake, but now with the sheer size of the user base we have, every tiny change to any existing option causes some kind of breakage. I'm not prepared to do that again with
host
.So, instead we're back to the old method of instead adding a new option, that I've called
listen
. It's the only way we can acheive the goal without breaking existing users who are usinghost
for other reasons.The idea is that you'd only ever use the
listen
option if you want to restrict the address being bound to. For example, the following will serve files from the current directory, but behind the scenes Browsersync will only bind tolocalhost
(this does mean that other features such asexternal urls
will not work any more, but if you need thislisten
option in the first place, that will not be a concern for you)v2.24.7
Compare Source
fix
b6ba0dd
9e96603
48286e0
deps
a6578a3
v2.24.6
Compare Source
v2.24.5
Compare Source
fix
dd70eba
90e7306
v2.24.4
Compare Source
fix
a6d39e6
v2.24.3
Compare Source
2.24.0 was a very large release - and with that, a handful of patch releases inevitably follow. Please move straight to 2.24.3 :)
fixes
cc5118c
1153845
9cef9c1
568e64e
b37e11c
v2.24.2
Compare Source
v2.24.1
Compare Source
v2.24.0
Compare Source
Features
99a69ce
9d9dfb1
injectNotification
option & defaulted to false06608fb
4803786
e4754c9
Fixes
b8685bc
watch
boolean when falseb41f602
Dependencies
0ad5f3a
f6ac69f
0e1dd37
679fbbc
Tests
31bace2
misc
1c9ae43
8a957e9
31956ab
78c3854
teh
tothe
4ce533c
v2.23.7
Compare Source
66dd19c
v2.23.6
Compare Source
v2.23.5
Compare Source
v2.23.4
Compare Source
v2.23.3
Compare Source
misc
type: array
in server field of startOpts" - fixes #1483 (This reverts commitb24514b
)31150d6
620e9ae
v2.23.2
Compare Source
CLI
type: array
in server field of startOptsb24514b
v2.23.1
Compare Source
2.23.1 (2018-01-01)
v2.23.0
Compare Source
e6be4e9
notify
command over HTTP protocolac86665
(closes #1467)3b7e8cb
91b7e89
watch
option - (see below)@imports
- thanks to Live Reloadfb26e82
(closes #10)b5cc56e
single
option - adds a middleware to help with SPAs (serves index.html for all non-matching routes)91480aa
ignore
option - shortcut for adding towatchOptions.ignored
- added because of the newwatch
optiongit checkout
without any configurationfd3d074
dbb1267
cb5b44c
Highlights
Easier CLI commands
In an attempt to streamline the common use-cases, Browsersync will now attempt to 'do the right thing' when no command is provided, for example:
To run a static server, serving from the current directory
To run a static server, serving from 2 directories:
If the directory contains a 'index.html' file, you can omit any input and just run:
### after browser-sync
You can run the proxy in this manner too
### after browser-sync https://example.com
To run a proxy, whilst also serving static files
### after browser-sync https://example.com htdocs/themes/example
New
watch
optionBecause we now have the shorthand ways of launching servers/proxies, eg:
browser-sync .
- it also made sense to automatically watch files too. So, ifwatch: true
- then Browsersync will make a best-guess at which files to automatically watch.Here's a comparison to the old way (which will still work, of course)
Behind the scenes, Browsersync is just looking at served directories (in this case,
app
) andadding it to the regular
files
option as normal.It means the following the 2 configurations are identical, but the latter is better since there's no
repetition.
New
ignore
optionAdded as a convenience since we have simpler watching via the
watch
flag. Use it to ignore any patterns that should not cause Browsersync reloads/injectionsExample:
- Serve files from the 'app' directory
- Watch all files
- But, exclude
**/*.js
(if using Webpack, etc)CLI:
browser-sync app -w --ignore '**/*.js'
Config:
New
single
option, easy SPA developmentThis option will add the
connect-history-api-fallback
middleware automatically for you, meaning that developing with client-side routers can be done without configuring this middleware manuallyExample:
- Serve files from the
app
directory- Watch all files
- Serve
index.html
for all none matching routesFall back to a directory listing if a request gives a 404
No more
Cannot Get /' messages
. If you run Browsersync in a directory where there's noindex.html
, a directory listing will be shown instead.v2.22.0
Compare Source
v2.21.0
Compare Source
v2.20.1
Compare Source
v2.20.0
Compare Source
v2.19.0
Compare Source
v2.18.13
Compare Source
v2.18.12
Compare Source
v2.18.11
Compare Source
FIXED Source map files are now ignored by default.
c990ea2
BrowserSync/browser-sync-client@24de0ecPreviously, if you were watching a directory into which source maps were being written (alongside your CSS/JS etc) then Browsersync would instruct all browsers to actually RELOAD as it wouldn't know how to handle the 'map' files.
This was particularly frustrating for
gulp
users - take this following example (where we compile sass-> css)With this, each time a file is saved, there would be 2 output files
core.css
&core.css.map
and Browsersync would be informed of both. With the CSS file, it would update any references to that file in all connected browsers, but for themap
file, it would perform a full page reload instead... This is never what a user expects, so I've fixed it.FIXED default
ghostMode.location: true
BrowserSync/browser-sync@1a0505cA recent change stopped a module being loaded on the client-side that handled UI events such as 'SYNC ALL' etc.
Issue: BrowserSync/browser-sync#1363
FIXED Added pointer-events: none to notification BrowserSync/browser-sync-client#36
FIXED Page blinking on styles reload is fixed BrowserSync/browser-sync-client#39
v2.18.10
Compare Source
v2.18.9
Compare Source
v2.18.8
Compare Source
FIXED: re-implemented
reloadDebounce
to better suit the Browsersync use-case. Now we debounce and buffer events to allow multiple files to be injected following the specified window of event silence.FIXED:
de2e2fa
addedwatchEvents
option to solve BrowserSync/browser-sync#1291 - now you can override which file-watching events Browsersync will respond to.For example, if you wanted to respond to the
add
event, along with the defaultchange
event, you could provide the followingor
FIXED:
c6d7d16
always sendoverride: true
on public notify method to fix BrowserSync/browser-sync#538This means you can now silence the default notify messages, whilst still using your own.
v2.18.7
Compare Source
v2.18.6
Compare Source
v2.18.5
Compare Source
FIXED - white-screen in UI
Removed cache headers from run-time generated JS file that was causing a 'white screen' in the UI when switching between protocols. BrowserSync/browser-sync@069927a
FIXED - accept
port
option as a stringThere was a regression from a dependency. I've now pinned the version to the latest that works :) BrowserSync/browser-sync@348597e
FIXED - don't register event handlers when ghostMode disabled
Previously Browsersync would always register things such as click/scroll on every page load, but if you had set
ghostMode: false
we just wouldn't attempt to replicate those actions across devices.This was intentional as it allows the user to re-enable these options within the UI without requiring a full page reload, but on reflection that is very much 'unexpected' behaviour, so following this release no listeners will be registered if you explicitly opt-out of them via your configuration.
v2.18.4
Compare Source
v2.18.3
Compare Source
v2.18.2
Compare Source
v2.18.1
Compare Source
This release brings a small but important change, the ability to provide a different HTTP module to be used in place of the default ones that ship with node. This is only really interesting when you realise this effectively enables anyone to try out things such HTTP2.
We may well switch to an HTTP2 as standard in the near future (if I can figure out how to get the proxy working with it) - but for now this small change allows you to drop any old module into the place of the defaults.
API example with
http2
(note that you need to install the module along with Browsersync, for now)CLI example (as above)
Browsersync Proxy + custom httpModule ?
Nope, not just yet I'm afraid - if someone out there can make http-proxy play nicely with something like http2 - then please share the knowledge :)
Thanks
to @itslenny for kick-starting it :)
v2.18.0
Compare Source
v2.17.6
Compare Source
FIXED - stop localtunnel errors from crashing the process
80120dc
FIXED - allow the
reload
command to work with https urls3bb5b8d
eg: If you have a Browsersync instance running at
https://localhost:3000
, you can instruct all browsers to reload by executing the commandbrowser-sync reload --url https://localhost:3000
. This previously failed since Browersync uses self-signed SSL certs.UPDATED bumped
bs-recipes
to include a new minimalist preact starter with hot-reloading.To try it out, just run the following command and follow the instructions :)
v2.17.5
Compare Source
v2.17.4
Compare Source
v2.17.3
Compare Source
v2.17.2
Compare Source
v2.17.1
Compare Source
addRewriteRule
clobbers proxy rules BrowserSync/browser-sync#1223v2.17.0
Compare Source
https
option is no longer clobbered when running from the CLI BrowserSync/browser-sync@27a08c2ADDED - better support for per-route static file serving BrowserSync/browser-sync@97dd907
For example, let's say you have a deployed Wordpress website at
http://example.com
where the assets live insidewp-content/themes/awesome/
. Now lets imagine you need to make small CSS tweaks instyle.css
, but you don't want the hassle of running PHP + MySQL on your local machine... With Browsersync you can now easily map remote paths to local ones. So if you have the filewp-content/themes/awesome/style.css
on your machine, you could run the following and have your changes update the live website.This kind of magic was always possible with Browsersync, but it required more complicated setup that we're happy to see the back of. The best bit is that the proxy will kick in if a file is not found locally. So in our Wordpress example, you could have nothing but a CSS file and everything would still work.
A knock-on effect of this feature is that now you can map multiple remote paths to multiple local directories... I know, it's magical and amazing.
ADDED support for opening browsers with flags** support opn's options for loading a browser with arguments BrowserSync/browser-sync#1179
For example, if you wanted to open Chrome with certain flags when Browsersync starts, you can do
This can also be combined with the string-only versions too - so to open chrome with flags, but safari + firefox as normal:
v2.16.1
Compare Source
v2.16.0
Compare Source
2 fixes & a really useful new option.
FIXED - the version number of the Browsersync client script is now added as a query param instead of within the file path. This is a massive help for users that have the snippet saved in a file.
Fun fact: other than a sanity check to show which release of Browsersync you're using, the version number actually serves no purpose, and that's why:
ADDED - new option
cors: true
- setting this will ensure that all assets served by Browsersync (including the script file itself) in all modes will have HTTP access control headers added.This allows any domain to access your files, which can lead to some creative workflows - for example, you could create a chrome extension that added some files you have locally into a live site & have Browsersync auto-update them when they change.
enjoy :)
v2.15.0
Compare Source
Updates from 2.14 -> 2.15
proxy.proxyReqWs
to allow users to intercept/alter proxied web sockets (this is an api mirror to the underlying http-proxy lib) BrowserSync/browser-sync@277c17cis correctly re-written to something like...
--https
with anon-https
target no longer fails, and allows some pretty nice workflows BrowserSync/browser-sync@80c091deg:
$ browser-sync start --proxy 'localhost:8000' --https
v2.14.3
Compare Source
v2.14.2
Compare Source
v2.14.1
Compare Source
v2.14.0
Compare Source
This release includes the addition of a few new options.
script.domain
for situations where you want full control over the domain used to serve the client JSlocalOnly
for situations where you need to opt-out of Browsersync's dynamic host rewriting.See the previous discussion for details, but here's the tl;dr:
Browsersync goes out of it's way to 'just work' in most use-cases - but this requires some dynamic aspects that are OTT for something as simple as an Electron workflow, where you probably just want to reload files when they change.
Electron users
To have Browsersync watch over your files and reload your app when they change, just use the
localOnly
flag & then copy/paste the snippet into your footer.cli
browser-sync start --localOnly --files './app'
api
Adding
localOnly
will remove any attempts to set the domain automagically in script tags or WebSocket addresses and instead will hard-code the correctlocalhost
address. This is exactly what is needed for use in electron.v2.13.0
Compare Source
v2.12.12
Compare Source
v2.12.11
Compare Source
v2.12.10
Compare Source
v2.12.9
Compare Source
v2.12.8
Compare Source
v2.12.7
Compare Source
v2.12.6
Compare Source
v2.12.5
Compare Source
v2.12.4
Compare Source
v2.12.3
Compare Source
v2.12.2
Compare Source
v2.12.1
Compare Source
As work continues on Browsersync V3, I've decided to take some time to back-port some improvements that have been discovered during the re-write. Many new features are not compatible with the architecture of this 2.x master branch, but those that are have made it into this
2.12
release.Proxy
proxyReq
&proxyRes
to better align with http-proxy API - this allows you to modify the request before and after it hits the target.Middleware
route is hit. (see below for examples)
CLI
meow
toyargs
- for more features re: processing CLI input--proxy.ws
)--files "*.html" "*.css"
)browser-sync start --help
,browser-sync recipe --help
etc)-s
for server,-p
for proxy etc)browser-sync
key in package.json #1040Plugins
browser-sync start -s --plugins bs-html-injector?files[]=*.html
)Snippet
<body>
tag. During testing for V3 I discovered that every single browser that we support is more than happy to accept a JS file that is loaded as the final thing on the page (even after the body/html tags) - this discovery alone should solve the countless hours that have been consumed reporting & replying to issues related to this.Bug fixes
Examples
Below are a few examples showing what is now possible in 2.12.0
Proxy -
proxyReq
&proxyRes
Middleware - applied on a per-route basis
Before - you needed to check the url manually
After - define the route up front
Mix and match - some middleware are global, some per-route. No problem. Here's an example where 2 global middleware apply to every route, and one applies to
/api
onlyCLI improvements
new short hand examples
-p
=--proxy
-s
=--server
-f
=--files
-b
=--browser
-c
=--config
--ss
=--serveStatic
inline plugin options
Have fun!
This is meant to be a non-breaking-change release, so please inform me if you encounter any issues. :)
v2.11.2
Compare Source
v2.11.1
Compare Source
v2.11.0
Compare Source
v2.10.1
Compare Source
This is an important bug-fix release related to gulp-style workflows. The
stream()
method accepts a 'match' option to exclude things such as.map
files - this was broken for directories beginning with a.
(dot) - this is now fixed in this release, so the following will work as you expectv2.10.0
Compare Source
v2.9.12
Compare Source