Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BrowserSync/browser-sync
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.26.7
Choose a base ref
...
head repository: BrowserSync/browser-sync
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.29.1
Choose a head ref
Loading
Showing with 42,483 additions and 28,899 deletions.
  1. +42 −0 .github/workflows/main.yml
  2. +1 −3 .travis.yml
  3. +11 −16 README.md
  4. +0 −25 appveyor.yml
  5. +2 −2 cypress/integration/file-reloading.js
  6. +1 −1 cypress/integration/ui-remote-debug.js
  7. +1 −1 cypress/setup/bs.js
  8. +1 −1 lerna.json
  9. +14,357 −10,949 package-lock.json
  10. +17 −26 package.json
  11. +1 −0 packages/browser-sync-client/.gitignore
  12. +0 −4 packages/browser-sync-client/crossbow.yaml
  13. +2 −2 packages/browser-sync-client/index.js
  14. +3 −1 packages/browser-sync-client/lib/browser.utils.ts
  15. +1 −1 packages/browser-sync-client/lib/effects/browser-reload.effect.ts
  16. +2 −2 packages/browser-sync-client/lib/effects/file-reload.effect.ts
  17. +3 −1 packages/browser-sync-client/lib/index.ts
  18. +1 −1 packages/browser-sync-client/lib/log.ts
  19. +1 −1 packages/browser-sync-client/lib/messages/FileReload.ts
  20. +27 −30 packages/browser-sync-client/lib/socket.ts
  21. +1 −1 packages/browser-sync-client/{ → lib}/types/socket.ts
  22. 0 packages/browser-sync-client/{ → lib}/types/types.d.ts
  23. +4 −4 packages/browser-sync-client/{ → lib}/vendor/Reloader.ts
  24. 0 packages/browser-sync-client/{ → lib}/vendor/Timer.ts
  25. 0 packages/browser-sync-client/{ → lib}/vendor/logger.ts
  26. +6,104 −4,901 packages/browser-sync-client/package-lock.json
  27. +60 −53 packages/browser-sync-client/package.json
  28. +6 −3 packages/browser-sync-client/tsconfig.json
  29. +19 −6 packages/browser-sync-client/webpack.config.js
  30. +0 −8 packages/browser-sync-ui/.travis.yml
  31. +3 −2 packages/browser-sync-ui/lib/UI.js
  32. +1 −1 packages/browser-sync-ui/lib/client-js.js
  33. +3 −3 packages/browser-sync-ui/lib/plugins/remote-debug/client-files.js
  34. +1 −1 packages/browser-sync-ui/lib/plugins/sync-options/sync-options.client.js
  35. +2 −2 packages/browser-sync-ui/lib/plugins/sync-options/sync-options.plugin.js
  36. +2 −2 packages/browser-sync-ui/lib/server.js
  37. +10,413 −7,443 packages/browser-sync-ui/package-lock.json
  38. +62 −60 packages/browser-sync-ui/package.json
  39. +27 −25 packages/browser-sync-ui/public/js/app.js
  40. +0 −1 packages/browser-sync-ui/public/js/app.js.map
  41. +1 −1 packages/browser-sync-ui/src/crossbow/_config.yml
  42. +1 −4 packages/browser-sync-ui/src/crossbow/components/footer.hbs
  43. +2 −2 packages/browser-sync-ui/src/crossbow/components/help-content.hbs
  44. +3 −6 packages/browser-sync-ui/static/components/footer.html
  45. +7 −7 packages/browser-sync-ui/static/components/help-content.html
  46. +7 −7 packages/browser-sync-ui/static/components/lists.html
  47. +7 −7 packages/browser-sync-ui/static/content/help.content.html
  48. +12 −7 packages/browser-sync-ui/tasks/crossbow.js
  49. +1 −9 packages/browser-sync-ui/webpack.config.js
  50. 0 packages/browser-sync/.prettierignore
  51. +3 −0 packages/browser-sync/cli-options/opts.start.json
  52. +0 −45 packages/browser-sync/crossbow.yaml
  53. +27 −17 packages/browser-sync/lib/async.js
  54. +29 −24 packages/browser-sync/lib/bin.ts
  55. +3 −2 packages/browser-sync/lib/browser-sync.js
  56. +3 −2 packages/browser-sync/lib/cli/cli-info.js
  57. +8 −5 packages/browser-sync/lib/cli/command.recipe.js
  58. +3 −3 packages/browser-sync/lib/cli/transforms/addCwdToWatchOptions.ts
  59. +10 −8 packages/browser-sync/lib/cli/transforms/addDefaultIgnorePatterns.ts
  60. +16 −20 packages/browser-sync/lib/cli/transforms/addToFilesOption.ts
  61. +10 −5 packages/browser-sync/lib/cli/transforms/appendServerDirectoryOption.ts
  62. +7 −5 packages/browser-sync/lib/cli/transforms/appendServerIndexOption.ts
  63. +12 −6 packages/browser-sync/lib/cli/transforms/copyCLIIgnoreToWatchOptions.ts
  64. +12 −6 packages/browser-sync/lib/cli/transforms/handleExtensionsOption.ts
  65. +5 −5 packages/browser-sync/lib/cli/transforms/handleFilesOption.ts
  66. +40 −32 packages/browser-sync/lib/cli/transforms/handleGhostModeOption.ts
  67. +25 −20 packages/browser-sync/lib/cli/transforms/handleHostOption.ts
  68. +6 −6 packages/browser-sync/lib/cli/transforms/handlePortsOption.ts
  69. +6 −6 packages/browser-sync/lib/cli/transforms/handleProxyOption.ts
  70. +9 −9 packages/browser-sync/lib/cli/transforms/handleServerOption.ts
  71. +2 −2 packages/browser-sync/lib/config.js
  72. +12 −0 packages/browser-sync/lib/connect-utils.js
  73. +8 −1 packages/browser-sync/lib/default-config.js
  74. +15 −14 packages/browser-sync/lib/file-event-handler.js
  75. +9 −6 packages/browser-sync/lib/hooks.js
  76. +9 −9 packages/browser-sync/lib/http-protocol.js
  77. +4 −1 packages/browser-sync/lib/index.js
  78. +1 −1 packages/browser-sync/lib/internal-events.js
  79. +18 −6 packages/browser-sync/lib/lodash.custom.js
  80. +40 −31 packages/browser-sync/lib/logger.js
  81. +67 −40 packages/browser-sync/lib/options.ts
  82. +11 −8 packages/browser-sync/lib/server/utils.js
  83. +2 −2 packages/browser-sync/lib/snippet.js
  84. +25 −20 packages/browser-sync/lib/{sockets.js → sockets.ts}
  85. +21 −21 packages/browser-sync/lib/types.ts
  86. +22 −24 packages/browser-sync/lib/utils.ts
  87. +10,456 −4,615 packages/browser-sync/package-lock.json
  88. +95 −92 packages/browser-sync/package.json
  89. +9 −14 packages/browser-sync/readme.md
  90. 0 packages/browser-sync/templates/{script-tags-simple.tmpl → script-tags-simple.html}
  91. +16 −0 packages/browser-sync/templates/script-tags.html
  92. +0 −3 packages/browser-sync/templates/script-tags.tmpl
  93. +2 −2 packages/browser-sync/test/fixtures/base.html
  94. +1 −1 packages/browser-sync/test/fixtures/forms.html
  95. +2 −2 packages/browser-sync/test/fixtures/iframe.html
  96. +1 −1 packages/browser-sync/test/fixtures/index-amd.html
  97. +1 −1 packages/browser-sync/test/fixtures/index.html
  98. +1 −1 packages/browser-sync/test/fixtures/scrolling.html
  99. +2 −2 packages/browser-sync/test/fixtures/socket.io.html
  100. +3 −3 packages/browser-sync/test/protractor/logger.js
  101. +6 −1 packages/browser-sync/test/protractor/setup.single.js
  102. +5 −2 packages/browser-sync/test/specs/api/init.js
  103. +3 −1 packages/browser-sync/test/specs/cli/cli.exec.js
  104. +41 −0 packages/browser-sync/test/specs/cli/cli.help.js
  105. +11 −8 packages/browser-sync/test/specs/commands/recipes.js
  106. +1 −1 packages/browser-sync/test/specs/e2e/cli/e2e.cli.proxy.ws.js
  107. +4 −6 packages/browser-sync/test/specs/e2e/e2e.options.logPrefix.js
  108. +1 −1 packages/browser-sync/test/specs/e2e/e2e.options.script.async.js
  109. +65 −0 packages/browser-sync/test/specs/e2e/e2e.options.snippet.js
  110. +0 −44 packages/browser-sync/test/specs/e2e/e2e.sockets.js
  111. +1 −1 packages/browser-sync/test/specs/e2e/files/e2e.file.changed.js
  112. +2 −2 packages/browser-sync/test/specs/e2e/middleware/middleware.server.option.js
  113. +2 −1 packages/browser-sync/test/specs/e2e/proxy/e2e.proxy.ws.js
  114. +1 −1 packages/browser-sync/test/specs/e2e/server/e2e.server.httpModule.js
  115. +20 −43 packages/browser-sync/test/specs/logger/logger.baseDir.js
  116. +3 −3 packages/browser-sync/test/specs/plugins/logger.js
  117. +5 −2 packages/browser-sync/tsconfig.json
42 changes: 42 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build" boo2
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup Node.js environment
uses: actions/setup-node@v2.5.0
with:
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0
node-version: 16
# Used to specify a package manager for caching in the default directory. Supported values: npm, yarn, pnpm
cache: npm
# Used to specify the path to a dependency file: package-lock.json, yarn.lock, etc. Supports wildcards or a list of file names for caching multiple dependencies.
cache-dependency-path: package-lock.json

# Runs a single command using the runners shell
- name: Install
run: npm ci
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Test E2E
run: npm run test:e2e
4 changes: 1 addition & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -2,8 +2,6 @@ git:
depth: 2
language: node_js
node_js:
- "14"
- "12"
- "10"
- "8"
- "6"
- "4"
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
<p align="center">
<a href="https://ci.appveyor.com/project/shakyShane/browser-sync" title="AppVeyor branch">
<img src="https://img.shields.io/appveyor/ci/shakyshane/browser-sync/master.svg?style=flat-square&label=windows" />
</a><a href="https://travis-ci.org/BrowserSync/browser-sync" title="Travis branch">
<a href="https://travis-ci.org/BrowserSync/browser-sync" title="Travis branch">
<img src="https://img.shields.io/travis/BrowserSync/browser-sync/master.svg?style=flat-square&label=linux" />
</a><a href="https://www.npmjs.com/package/browser-sync">
<img src="https://img.shields.io/npm/dm/browser-sync.svg?style=flat-square" />
@@ -10,19 +8,12 @@
<p align="center">
<a href="https://www.npmjs.com/package/browser-sync" title="NPM version">
<img src="https://img.shields.io/npm/v/browser-sync.svg?style=flat-square" />
</a><a href="https://david-dm.org/Browsersync/browser-sync" title="Dependency Status">
<img src="https://img.shields.io/david/Browsersync/browser-sync.svg?style=flat-square&label=deps" />
</a>
<a href="https://david-dm.org/Browsersync/browser-sync#info=devDependencies" title="devDependency Status">
<img src="https://img.shields.io/david/dev/Browsersync/browser-sync.svg?style=flat-square&label=devDeps" />
</a>
</p>
<p align="center"><a href="https://www.browsersync.io"><img src="https://raw.githubusercontent.com/BrowserSync/browsersync.github.io/master/public/img/logo-gh.png" /></a></p>
<p align="center">Keep multiple browsers & devices in sync when building websites.</p>

<p align="center">Browsersync is developed and maintained internally at <a href="http://www.wearejh.com">JH</a></p>
<p align="center">Follow <a href="https://twitter.com/browsersync">@Browsersync</a> on twitter for news & updates.</p>
<p align="center">Community <a href="https://browsersync.herokuapp.com"><img src="https://browsersync.herokuapp.com/badge.svg" /></a></p>

## Features

@@ -36,20 +27,20 @@ can provide a custom rule for the snippet using [snippetOptions](https://www.bro

## Upgrading from 1.x to 2.x ?
Providing you haven't accessed any internal properties, everything will just work as
there are no breaking changes to the public API. Internally however, we now use an
immutable data structure for storing/retrieving options. So whereas before you could access urls like this...
there are no breaking changes to the public API. Internally however, we now use an
immutable data structure for storing/retrieving options. So whereas before you could access urls like this...

```js
browserSync({server: true}, function(err, bs) {
console.log(bs.options.urls.local);
console.log(bs.options.urls.local);
});
```

... you now access them in the following way:

```js
browserSync({server: true}, function(err, bs) {
console.log(bs.options.getIn(["urls", "local"]));
console.log(bs.options.getIn(["urls", "local"]));
});
```

@@ -61,12 +52,16 @@ browserSync({server: true}, function(err, bs) {

[Browsersync recipes](https://github.com/Browsersync/recipes)


## Support

If you've found Browser-sync useful and would like to contribute to its continued development & support, please feel free to send a donation of any size - it would be greatly appreciated!

[![Support via PayPal](https://rawgithub.com/chris---/Donation-Badges/master/paypal.jpeg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=shakyshane%40gmail%2ecom&lc=US&item_name=browser%2dsync)
[Support via PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=shakyshane%40gmail%2ecom&lc=US&item_name=browser%2dsync)

## Supported by

Originally supported by [JH](https://www.wearejh.com) - they provided financial support as well as access to a professional designer to help with Branding.

Apache 2
Copyright (c) 2019 Shane Osbourne
Copyright (c) 2021 Shane Osbourne
25 changes: 0 additions & 25 deletions appveyor.yml

This file was deleted.

4 changes: 2 additions & 2 deletions cypress/integration/file-reloading.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ describe('Reloading files', function() {
expect(url.search).to.contain('?browsersync=');
});
});
it('should reload 2 css files', function() {
it.skip('should reload 2 css files', function() {
cy.exec('touch packages/browser-sync/test/fixtures/**/*.css');
cy.get('link').should($links => {
$links.each((i, elem) => {
@@ -34,7 +34,7 @@ describe('Reloading files', function() {
});
});
});
it('should reload with windows style paths', function() {
it.skip('should reload with windows style paths', function() {
cy.get('#__bs_notify__').should('have.length', 1);
cy.request('POST', 'http://localhost:3000/__browser_sync__',
JSON.stringify([
2 changes: 1 addition & 1 deletion cypress/integration/ui-remote-debug.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ describe('UI', function () {
"active": true,
"hidden": "",
"name": "pesticide",
"tagline": "Add simple CSS outlines to all elements. (powered by <a href=\"http://pesticide.io\" target=\"_blank\">Pesticide.io</a>)",
"tagline": "Add simple CSS outlines to all elements. (powered by <span style='text-decoration: line-through'>Pesticide.io</span>)",
"context": "remote-debug",
"served": true,
"title": "CSS Outlining",
2 changes: 1 addition & 1 deletion cypress/setup/bs.js
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ const cypress = require('cypress');
const exec = require('child_process');
const assert = require('assert');
const {join} = require('path');
const {Observable} = require('rxjs/Observable');
const {Observable} = require('rxjs');

module.exports = function(opts, ctx) {

2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "2.26.7"
"version": "2.29.1"
}
Loading