Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependencies (including web-ext) #2145

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js environment
uses: actions/setup-node@v2.1.2
uses: actions/setup-node@v4
with:
node-version: 14
node-version: 20
cache: npm

- name: Configure git
run: |
Expand Down
31 changes: 17 additions & 14 deletions .github/workflows/web-ext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ jobs:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Lint WebExtension
Expand All @@ -21,17 +22,18 @@ jobs:
needs: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Build WebExtension
run: npm run build
- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: build
path: web-ext-artifacts
Expand All @@ -42,11 +44,12 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- name: Use Node.js 12
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
- name: Sign WebExtension
Expand All @@ -55,7 +58,7 @@ jobs:
WEB_EXT_API_KEY: ${{ secrets.WEB_EXT_API_KEY }}
WEB_EXT_API_SECRET: ${{ secrets.WEB_EXT_API_SECRET }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: sign
path: web-ext-artifacts
6 changes: 2 additions & 4 deletions dev/builders/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@

'use strict';

var gutil = require('gulp-util'),
var File = require('vinyl'),
PluginError = require('plugin-error'),
path = require('path'),
through = require('through2');

var File = gutil.File,
PluginError = gutil.PluginError;

var resourceUtil = require('./resource');

/**
Expand Down
9 changes: 4 additions & 5 deletions dev/builders/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@
'use strict';

var fs = require('fs'),
gutil = require('gulp-util'),
File = require('vinyl'),
PluginError = require('plugin-error'),
replaceExtension = require('replace-ext'),
path = require('path'),
through = require('through2');

var File = gutil.File,
PluginError = gutil.PluginError;

/** Builds a distributable resource object.
* @see [vinyl]{@link https://github.com/wearefractal/vinyl}
*
Expand Down Expand Up @@ -48,7 +47,7 @@ module.exports.resourceBuilder = function(file, resource, contentsKey, attribute
});

file.contents = Buffer.from(JSON.stringify(resource));
file.path = gutil.replaceExtension(file.path, '.json');
file.path = replaceExtension(file.path, '.json');

return file;
};
Expand Down
4 changes: 1 addition & 3 deletions dev/builders/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@

'use strict';

var gutil = require('gulp-util'),
var PluginError = require('plugin-error'),
path = require('path'),
through = require('through2');

var PluginError = gutil.PluginError;

var resourceUtil = require('./resource');

/**
Expand Down
3 changes: 1 addition & 2 deletions docs/contributing/Build-XKit.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
## Prerequisites:

* Download [Node.js](https://nodejs.org/download/) for your platform.
* Optional: Install [Node Version Manager](https://github.com/nvm-sh/nvm) and run `nvm use v8` to travel back in time to a point when the dev server worked perfectly.
* Ensure you have the `npm` command available. Test this with `npm --version`.
* Install `gulp` globally: `npm install -g gulp`.
* Install the `gulp` command line utility globally: `npm install -g gulp-cli`.
* Install the [EditorConfig](http://editorconfig.org/#download) plugin for your favourite editor. We use this to enforce some style rules not covered by code linting.
* Make a clone of the project, or update an existing copy.
* Install project dependencies with `npm install`.
Expand Down
16 changes: 7 additions & 9 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ var connect = require('connect'),
del = require('del'),
fs = require('fs'),
gulp = require('gulp'),
gutil = require('gulp-util'),
log = require('fancy-log'),
colors = require('ansi-colors'),
https = require('https');

var paths = {
Expand All @@ -26,14 +27,14 @@ var paths = {
]
};

gulp.task('clean:extensions', function(cb) {
del(['Extensions/dist/*.json',
gulp.task('clean:extensions', function() {
return del(['Extensions/dist/*.json',
'Extensions/dist/page/gallery.json',
'Extensions/dist/page/list.json'], cb);
'Extensions/dist/page/list.json']);
});

gulp.task('clean:themes', function(cb) {
del(['Extensions/dist/page/themes.json'], cb);
gulp.task('clean:themes', function() {
return del(['Extensions/dist/page/themes.json']);
});

gulp.task('clean', gulp.series('clean:extensions', 'clean:themes'));
Expand Down Expand Up @@ -61,9 +62,6 @@ gulp.task('build', gulp.series('build:extensions', 'build:themes'));

// Server code from http://blog.overzealous.com/post/74121048393/why-you-shouldnt-create-a-gulp-plugin-or-how-to
gulp.task('server', gulp.series('build', function(callback) {
var log = gutil.log;
var colors = gutil.colors;

var devApp = connect();
devApp.use(connectLogger('dev'));
devApp.use(function(request, response, next) {
Expand Down
Loading