build: upgrade dependencies (#383)
* build: remove obsolete tslint config * build(deps): upgrade node-abi to ^2.19.0 * build(deps-dev): upgrade @types/chai to ^4.2.12 * build(deps-dev): upgrade deps-dev to ^7.1.3 * build(deps): upgrade fs-extra to ^9.0.1 * build(deps-dev): upgrade mocha to ^8.1.1 * build(deps-dev): upgrade @types/node to ^14.6.0 * build(deps): upgrade yargs to ^15.4.1 * build(deps-dev): upgrade typescript to ^4.0.2 * build(deps): upgrade ora to ^5.0.0 * build(deps-dev): upgrade ts-node to ^9.0.0 * build(deps-dev): upgrade semantic-release to ^17.1.1 * build(ci): drop Node 8, add Node 12 * build(deps-dev): upgrade cross-env to ^7.0.2 * build(deps-dev): upgrade eslint and related packages
This commit is contained in:
Родитель
f89a61c36d
Коммит
8f3b1d23b1
|
@ -15,17 +15,17 @@ steps-test: &steps-test
|
|||
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm install 8
|
||||
nvm alias default 8
|
||||
nvm install 10
|
||||
nvm alias default 10
|
||||
echo 'export NVM_DIR=${HOME}/.nvm' >> $BASH_ENV
|
||||
echo "[ -s '${NVM_DIR}/nvm.sh' ] && . '${NVM_DIR}/nvm.sh'" >> $BASH_ENV
|
||||
;;
|
||||
Windows*|CYGWIN*|MINGW*|MSYS*)
|
||||
nvm install 12.8.0
|
||||
nvm use 12.8.0
|
||||
nvm install 10.22.0
|
||||
nvm use 10.22.0
|
||||
;;
|
||||
esac
|
||||
- run: npm install
|
||||
- run: npm install --engine-strict
|
||||
- save_cache:
|
||||
paths:
|
||||
- node_modules
|
||||
|
@ -37,14 +37,18 @@ version: 2.1
|
|||
orbs:
|
||||
win: circleci/windows@1.0.0
|
||||
jobs:
|
||||
test-linux-8:
|
||||
docker:
|
||||
- image: circleci/node:8
|
||||
<<: *steps-test
|
||||
test-linux-10:
|
||||
docker:
|
||||
- image: circleci/node:10
|
||||
<<: *steps-test
|
||||
test-linux-12:
|
||||
docker:
|
||||
- image: circleci/node:12
|
||||
<<: *steps-test
|
||||
test-linux-14:
|
||||
docker:
|
||||
- image: circleci/node:14
|
||||
<<: *steps-test
|
||||
test-mac:
|
||||
macos:
|
||||
xcode: "10.2.0"
|
||||
|
@ -57,7 +61,7 @@ jobs:
|
|||
|
||||
release:
|
||||
docker:
|
||||
- image: circleci/node:10.15
|
||||
- image: circleci/node:10.22
|
||||
steps:
|
||||
- checkout
|
||||
- *step-restore-cache
|
||||
|
@ -68,14 +72,17 @@ workflows:
|
|||
test_and_release:
|
||||
# Run the test jobs first, then the release only when all the test jobs are successful
|
||||
jobs:
|
||||
- test-linux-8
|
||||
- test-linux-10
|
||||
- test-linux-12
|
||||
# FIXME: figure out why this fails
|
||||
# - test-linux-14
|
||||
- test-mac
|
||||
- test-windows
|
||||
- release:
|
||||
requires:
|
||||
- test-linux-8
|
||||
- test-linux-10
|
||||
- test-linux-12
|
||||
# - test-linux-14
|
||||
- test-mac
|
||||
- test-windows
|
||||
filters:
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
39
package.json
39
package.json
|
@ -35,34 +35,34 @@
|
|||
"colors": "^1.3.3",
|
||||
"debug": "^4.1.1",
|
||||
"detect-libc": "^1.0.3",
|
||||
"fs-extra": "^8.1.0",
|
||||
"node-abi": "^2.11.0",
|
||||
"fs-extra": "^9.0.1",
|
||||
"node-abi": "^2.19.0",
|
||||
"node-gyp": "^7.1.0",
|
||||
"ora": "^3.4.0",
|
||||
"ora": "^5.0.0",
|
||||
"spawn-rx": "^3.0.0",
|
||||
"yargs": "^14.2.0"
|
||||
"yargs": "^15.4.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@continuous-auth/semantic-release-npm": "^2.0.0",
|
||||
"@types/chai": "^4.2.6",
|
||||
"@types/chai-as-promised": "^7.1.2",
|
||||
"@types/chai": "^4.2.12",
|
||||
"@types/chai-as-promised": "^7.1.3",
|
||||
"@types/debug": "^4.1.5",
|
||||
"@types/fs-extra": "^8.0.1",
|
||||
"@types/mocha": "^5.2.7",
|
||||
"@types/node": "^13.5.0",
|
||||
"@types/yargs": "^13.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^2.11.0",
|
||||
"@typescript-eslint/parser": "^2.11.0",
|
||||
"@types/fs-extra": "^9.0.1",
|
||||
"@types/mocha": "^8.0.3",
|
||||
"@types/node": "^14.6.0",
|
||||
"@types/yargs": "^15.0.5",
|
||||
"@typescript-eslint/eslint-plugin": "^3.9.1",
|
||||
"@typescript-eslint/parser": "^3.9.1",
|
||||
"chai": "^4.2.0",
|
||||
"chai-as-promised": "^7.1.1",
|
||||
"cross-env": "^5.2.1",
|
||||
"cross-env": "^7.0.2",
|
||||
"electron": "^5.0.13",
|
||||
"eslint": "^6.7.2",
|
||||
"eslint-plugin-mocha": "^6.2.2",
|
||||
"mocha": "^6.2.2",
|
||||
"semantic-release": "^15.13.31",
|
||||
"ts-node": "^8.5.4",
|
||||
"typescript": "^3.7.3"
|
||||
"eslint": "^7.7.0",
|
||||
"eslint-plugin-mocha": "^8.0.0",
|
||||
"mocha": "^8.1.1",
|
||||
"semantic-release": "^17.1.1",
|
||||
"ts-node": "^9.0.0",
|
||||
"typescript": "^4.0.2"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"parser": "@typescript-eslint/parser",
|
||||
|
@ -81,7 +81,6 @@
|
|||
},
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/eslint-recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"rules": {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
import 'colors';
|
||||
import * as fs from 'fs-extra';
|
||||
import * as path from 'path';
|
||||
import ora from 'ora';
|
||||
import ora = require('ora');
|
||||
import * as argParser from 'yargs';
|
||||
|
||||
import { rebuild, ModuleType } from './rebuild';
|
||||
|
@ -51,11 +51,13 @@ if (argv.h) {
|
|||
}
|
||||
|
||||
if (process.argv.length === 3 && process.argv[2] === '--version') {
|
||||
/* eslint-disable @typescript-eslint/no-var-requires */
|
||||
try {
|
||||
console.log('Electron Rebuild Version:', require(path.resolve(__dirname, '../../package.json')).version);
|
||||
} catch (err) {
|
||||
console.log('Electron Rebuild Version:', require(path.resolve(__dirname, '../package.json')).version);
|
||||
}
|
||||
/* eslint-enable @typescript-eslint/no-var-requires */
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
|
|
@ -388,7 +388,6 @@ class Rebuilder {
|
|||
await fs.mkdirp(devDir)
|
||||
await spawnPromise(nodeGypPath, rebuildArgs, {
|
||||
cwd: modulePath,
|
||||
/* eslint-disable @typescript-eslint/camelcase */
|
||||
env: Object.assign({}, process.env, {
|
||||
USERPROFILE: devDir,
|
||||
npm_config_disturl: 'https://www.electronjs.org/headers',
|
||||
|
@ -399,7 +398,6 @@ class Rebuilder {
|
|||
npm_config_debug: this.debug ? 'true' : '',
|
||||
npm_config_devdir: devDir,
|
||||
}),
|
||||
/* eslint-enable @typescript-eslint/camelcase */
|
||||
});
|
||||
|
||||
d('built:', path.basename(modulePath));
|
||||
|
@ -570,6 +568,7 @@ function doRebuild(options: any, ...args: any[]): Promise<void> {
|
|||
return rebuildWithOptions(options as RebuildOptions);
|
||||
}
|
||||
console.warn('You are using the deprecated electron-rebuild API, please switch to using the options object instead');
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
return rebuildWithOptions((createOptions as Function)(options, ...args));
|
||||
}
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@ describe('rebuilder', () => {
|
|||
}
|
||||
process.env.ELECTRON_REBUILD_TESTS = 'true';
|
||||
if (Array.isArray(args)) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-types
|
||||
await (rebuild as Function)(...(args as string[]));
|
||||
} else {
|
||||
await rebuild(args);
|
||||
|
|
37
tslint.json
37
tslint.json
|
@ -1,37 +0,0 @@
|
|||
{
|
||||
"rules": {
|
||||
"curly": false,
|
||||
"eofline": false,
|
||||
"align": [true, "parameters"],
|
||||
"class-name": true,
|
||||
"indent": [true, "spaces"],
|
||||
"max-line-length": [true, 150],
|
||||
"no-trailing-whitespace": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-var-keyword": true,
|
||||
"no-empty": true,
|
||||
"no-unused-expression": true,
|
||||
"no-use-before-declare": true,
|
||||
"no-var-requires": true,
|
||||
"one-line": [true,
|
||||
"check-else",
|
||||
"check-whitespace",
|
||||
"check-open-brace"],
|
||||
"quotemark": [true,
|
||||
"single",
|
||||
"avoid-escape"],
|
||||
"semicolon": [true, "always"],
|
||||
"typedef-whitespace": [true, {
|
||||
"call-signature": "nospace",
|
||||
"index-signature": "nospace",
|
||||
"parameter": "nospace",
|
||||
"property-declaration": "nospace",
|
||||
"variable-declaration": "nospace"
|
||||
}],
|
||||
"whitespace": [true,
|
||||
"check-branch",
|
||||
"check-decl",
|
||||
"check-operator",
|
||||
"check-type"]
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче