Skip to content

Commit

Permalink
fix: update dependencies to clean up yarn audit
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Update minimum node version to >=14
  • Loading branch information
MarshallOfSound committed Dec 8, 2022
1 parent 4fe5b00 commit da15130
Show file tree
Hide file tree
Showing 13 changed files with 3,087 additions and 4,630 deletions.
28 changes: 17 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,37 @@ steps-test: &steps-test
- run: git config --global core.autocrlf input
- checkout
- *step-restore-cache
- run: yarn --frozen-lockfile
- run: npx yarn --frozen-lockfile --ignore-engines
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ arch }}-{{ checksum "yarn.lock" }}
- run: yarn test
- run: yarn build:docs
- run: npx yarn test
- run: npx yarn build:docs

version: 2.1
orbs:
win: circleci/windows@1.0.0
win: circleci/windows@5.0
jobs:
test-linux-12:
test-linux-14:
docker:
- image: cimg/node:12.13
- image: cimg/node:14.21
<<: *steps-test
test-linux-14:
test-linux-16:
docker:
- image: cimg/node:14.17
- image: cimg/node:16.18
<<: *steps-test
test-linux-18:
docker:
- image: cimg/node:18.12
<<: *steps-test
test-mac:
macos:
xcode: "13.0.0"
<<: *steps-test
test-windows:
executor:
name: win/vs2019
name: win/default
shell: bash.exe
<<: *steps-test

Expand All @@ -52,14 +56,16 @@ workflows:
test_and_release:
# Run the test jobs first, then the release only when all the test jobs are successful
jobs:
- test-linux-12
- test-linux-14
- test-linux-16
- test-linux-18
- test-mac
- test-windows
- release:
requires:
- test-linux-12
- test-linux-14
- test-linux-16
- test-linux-18
- test-mac
- test-windows
filters:
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"license": "MIT",
"scripts": {
"build": "tsc && tsc -p tsconfig.esm.json",
"build:docs": "typedoc --out docs",
"build:docs": "typedoc --out docs src/index.ts",
"eslint": "eslint --ext .ts src test",
"jest": "jest --coverage",
"lint": "npm run prettier && npm run eslint",
Expand All @@ -19,11 +19,11 @@
"test:nonetwork": "npm run lint && npm run jest -- --testPathIgnorePatterns network.spec"
},
"files": [
"dist/*",
"dist/",
"README.md"
],
"engines": {
"node": ">=12"
"node": ">=14"
},
"dependencies": {
"debug": "^4.1.1",
Expand All @@ -35,10 +35,10 @@
"sumchecker": "^3.0.1"
},
"devDependencies": {
"@continuous-auth/semantic-release-npm": "^2.0.0",
"@continuous-auth/semantic-release-npm": "^3.0.0",
"@types/debug": "^4.1.4",
"@types/fs-extra": "^8.0.0",
"@types/jest": "^24.0.13",
"@types/jest": "^29.0.0",
"@types/node": "^12.20.55",
"@types/progress": "^2.0.3",
"@types/semver": "^6.2.0",
Expand All @@ -49,12 +49,12 @@
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "< 24.0.0",
"husky": "^2.3.0",
"jest": "^24.8.0",
"lint-staged": "^8.1.7",
"jest": "^29.3.1",
"lint-staged": "^13.0.4",
"prettier": "^1.17.1",
"ts-jest": "^24.0.0",
"typedoc": "^0.17.2",
"typescript": "^3.8.0"
"ts-jest": "^29.0.0",
"typedoc": "^0.23.21",
"typescript": "^4.9.3"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
Expand All @@ -78,8 +78,7 @@
"lint-staged": {
"*.ts": [
"eslint --fix",
"prettier --write",
"git add"
"prettier --write"
]
},
"keywords": [
Expand All @@ -97,4 +96,4 @@
"eslint/inquirer": "< 7.3.0",
"**/@typescript-eslint/typescript-estree/semver": "^6.3.0"
}
}
}
6 changes: 4 additions & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { Downloader } from './Downloader';

export { Downloader };

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export type DownloadOptions = any;

Expand Down Expand Up @@ -95,8 +97,8 @@ export interface ElectronDownloadRequestOptions {
*/
mirrorOptions?: MirrorOptions;
/**
* The custom [[Downloader]] class used to download artifacts. Defaults to the
* built-in [[GotDownloader]].
* The custom {@link Downloader} class used to download artifacts. Defaults to the
* built-in `GotDownloader`.
*/
downloader?: Downloader<DownloadOptions>;
/**
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export function getHostArch(): string {

export function ensureIsTruthyString<T, K extends keyof T>(obj: T, key: K): void {
if (!obj[key] || typeof obj[key] !== 'string') {
throw new Error(`Expected property "${key}" to be provided as a string but it was not`);
throw new Error(`Expected property "${String(key)}" to be provided as a string but it was not`);
}
}

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/electron-v1.0.0-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v1.0.0-darwin-x64.zip
1 change: 1 addition & 0 deletions test/fixtures/electron-v1.3.3-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v1.3.2-darwin-x64.zip
1 change: 1 addition & 0 deletions test/fixtures/electron-v1.3.5-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v1.3.5-darwin-x64.zip
1 change: 1 addition & 0 deletions test/fixtures/electron-v2.0.10-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v2.0.10-darwin-x64.zip
1 change: 1 addition & 0 deletions test/fixtures/electron-v2.0.3-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v2.0.3-darwin-x64.zip
1 change: 1 addition & 0 deletions test/fixtures/electron-v2.0.9-darwin-arm64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v2.0.9-darwin-x64.zip
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
electron-v6.0.0-nightly.20190213-darwin-x64.zip
6 changes: 5 additions & 1 deletion test/utils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ describe('utils', () => {
describe('uname()', () => {
if (process.platform !== 'win32') {
it('should return the correct arch for your system', () => {
expect(uname()).toEqual('x86_64');
if (process.arch === 'arm64') {
expect(uname()).toEqual('arm64');
} else {
expect(uname()).toEqual('x86_64');
}
});
}
});
Expand Down
Loading

0 comments on commit da15130

Please sign in to comment.