-
Notifications
You must be signed in to change notification settings - Fork 260
build: update to yarn v4 #565
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
Open
MarshallOfSound
wants to merge
3
commits into
main
Choose a base branch
from
sam/yarn-v4
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
enableScripts: false | ||
|
||
nodeLinker: node-modules | ||
|
||
npmMinimalAgeGate: 10080 | ||
|
||
npmPreapprovedPackages: | ||
- "@electron/*" | ||
|
||
yarnPath: .yarn/releases/yarn-4.10.3.cjs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import eslint from '@eslint/js'; | ||
import tseslint from 'typescript-eslint'; | ||
|
||
export default tseslint.config( | ||
eslint.configs.recommended, | ||
...tseslint.configs.recommended, | ||
{ | ||
languageOptions: { | ||
parser: tseslint.parser, | ||
parserOptions: { | ||
ecmaVersion: 'latest', | ||
sourceType: 'module', | ||
}, | ||
globals: { | ||
// Node.js globals | ||
console: 'readonly', | ||
process: 'readonly', | ||
Buffer: 'readonly', | ||
__dirname: 'readonly', | ||
__filename: 'readonly', | ||
module: 'readonly', | ||
require: 'readonly', | ||
exports: 'writable', | ||
global: 'readonly', | ||
}, | ||
}, | ||
rules: { | ||
'strict': 0, | ||
'indent': [2, 2], | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'semi': [2, 'always'], | ||
'no-console': 0, | ||
'quotes': [2, 'single', 'avoid-escape'], | ||
}, | ||
} | ||
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,9 @@ | |
"name": "electron-winstaller", | ||
"version": "0.0.0-development", | ||
"description": "Module to generate Windows installers for Electron apps", | ||
"main": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"type": "module", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
|
@@ -19,55 +20,44 @@ | |
"!vendor/7z.exe" | ||
], | ||
"scripts": { | ||
"install": "node ./script/select-7z-arch.js", | ||
"build": "tsc", | ||
"docs": "npx typedoc", | ||
"prepublish": "npm run build", | ||
"docs": "yarn typedoc", | ||
"prepack": "yarn build", | ||
"lint": "eslint --ext .ts src spec", | ||
"ava": "ava --timeout=60s", | ||
"test": "npm run lint && npm run ava", | ||
"tdd": "ava --watch" | ||
"test": "yarn lint && vitest run", | ||
"tdd": "vitest" | ||
}, | ||
"dependencies": { | ||
"@electron/asar": "^3.2.1", | ||
"@electron/asar": "^4.0.1", | ||
"debug": "^4.1.1", | ||
"fs-extra": "^7.0.1", | ||
"lodash": "^4.17.21", | ||
"semver": "^7.6.3", | ||
"temp": "^0.9.0" | ||
}, | ||
"devDependencies": { | ||
"@types/fs-extra": "^5.0.5", | ||
"@types/lodash": "^4.17.0", | ||
"@types/node": "^20.6.0", | ||
"@eslint/js": "^9.37.0", | ||
"@tsconfig/node22": "^22.0.2", | ||
"@types/debug": "^4.1.12", | ||
"@types/lodash": "^4.17.20", | ||
"@types/node": "^20.19.19", | ||
"@types/semver": "^7.7.1", | ||
"@types/temp": "^0.8.34", | ||
"@typescript-eslint/eslint-plugin": "^5.62.0", | ||
"@typescript-eslint/parser": "^5.62.0", | ||
"ava": "^5.1.1", | ||
"eslint": "^8.49.0", | ||
"eslint-plugin-ava": "^14.0.0", | ||
"ts-node": "^10.9.1", | ||
"typedoc": "0.25.13", | ||
"typescript": "^4.9.3" | ||
"@typescript-eslint/eslint-plugin": "^8.45.0", | ||
"@typescript-eslint/parser": "^8.45.0", | ||
"eslint": "^9.37.0", | ||
"typedoc": "0.28.13", | ||
"typescript": "^5.9.3", | ||
"typescript-eslint": "^8.45.0", | ||
"vitest": "^3.2.4" | ||
}, | ||
"optionalDependencies": { | ||
"@electron/windows-sign": "^1.1.2" | ||
"@electron/windows-sign": "^2.0.2" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"publishConfig": { | ||
"provenance": true | ||
}, | ||
"ava": { | ||
"extensions": [ | ||
"ts" | ||
], | ||
"files": [ | ||
"spec/*.ts" | ||
], | ||
"require": [ | ||
"ts-node/register/transpile-only" | ||
] | ||
} | ||
"packageManager": "[email protected]+sha512.c38cafb5c7bb273f3926d04e55e1d8c9dfa7d9c3ea1f36a4868fa028b9e5f72298f0b7f401ad5eb921749eb012eb1c3bb74bf7503df3ee43fd600d14a018266f" | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
import test from 'ava'; | ||
import { describe, it, expect } from 'vitest'; | ||
import { convertVersion } from '../src/index'; | ||
|
||
test('makes semver versions into valid NuGet versions', (t): void => { | ||
t.is(convertVersion('1'), '1'); | ||
t.is(convertVersion('1.2'), '1.2'); | ||
t.is(convertVersion('1.2.3'), '1.2.3'); | ||
t.is(convertVersion('1.2.3-alpha'), '1.2.3-alpha'); | ||
t.is(convertVersion('1.2.3-alpha.1'), '1.2.3-alpha1'); | ||
t.is(convertVersion('1.2.3-alpha.1.2'), '1.2.3-alpha12'); | ||
t.is(convertVersion('1.2.3-alpha-1-2'), '1.2.3-alpha-1-2'); | ||
t.is(convertVersion('1.2.3-alpha.1.2+build-meta.1.2'), '1.2.3-alpha12'); | ||
t.is(convertVersion('1.2.3-alpha-1-2+build-meta.1.2'), '1.2.3-alpha-1-2'); | ||
describe('convertVersion', () => { | ||
it('makes semver versions into valid NuGet versions', (): void => { | ||
expect(convertVersion('1')).toBe('1'); | ||
expect(convertVersion('1.2')).toBe('1.2'); | ||
expect(convertVersion('1.2.3')).toBe('1.2.3'); | ||
expect(convertVersion('1.2.3-alpha')).toBe('1.2.3-alpha'); | ||
expect(convertVersion('1.2.3-alpha.1')).toBe('1.2.3-alpha1'); | ||
expect(convertVersion('1.2.3-alpha.1.2')).toBe('1.2.3-alpha12'); | ||
expect(convertVersion('1.2.3-alpha-1-2')).toBe('1.2.3-alpha-1-2'); | ||
expect(convertVersion('1.2.3-alpha.1.2+build-meta.1.2')).toBe('1.2.3-alpha12'); | ||
expect(convertVersion('1.2.3-alpha-1-2+build-meta.1.2')).toBe('1.2.3-alpha-1-2'); | ||
}); | ||
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import path from 'path'; | ||
import fs from 'fs-extra'; | ||
import fs from 'node:fs/promises'; | ||
import path from 'node:path'; | ||
|
||
import { createTempDir } from '../../src/temp-utils'; | ||
|
||
export const FIXTURE_APP_DIR = path.join(__dirname, '../fixtures/app'); | ||
|
||
export async function createTempAppDirectory(): Promise<string> { | ||
const appDirectory = await createTempDir('electron-winstaller-ad-'); | ||
await fs.copy(FIXTURE_APP_DIR, appDirectory); | ||
await fs.cp(FIXTURE_APP_DIR, appDirectory, { recursive: true }); | ||
return appDirectory; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also mark this as a breaking change.