Skip to content

Commit e384367

Browse files
Include windows in CICD pipeline. Use @v4 (#249)
* Include windows in CICD pipeline. Use @v4 * Remove strategy * Action name * declare prettierrc path * Correct path to the file * Update prettier and options * Set end of line to auto * Apply default formatting proposed by prettier latest (#252) * Apply default formatting proposed by prettier latest * Force to use prettierrc.json * Print file structure * Escape file name * Auto end of line * Use powershell * Correct YAML * Use win-node-env * Do not require powershell if not needed * Remove changes that dont belong to this pull request * use cross-env for setting NODE_ENV variables * cli: fix test errors on Windows * Apply formatting --------- Co-authored-by: Sebastian Alex <sebastian.alex@saucelabs.com> --------- Co-authored-by: Sebastian Alex <sebastian.alex@saucelabs.com>
1 parent b26514b commit e384367

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+316
-151
lines changed

.github/workflows/test.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ on:
66
pull_request:
77

88
jobs:
9-
build:
9+
test_linux:
1010
runs-on: ubuntu-latest
1111

1212
strategy:
1313
matrix:
1414
node-version: [16.x, 18.x, 20.x]
1515

1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- name: Use Node.js ${{ matrix.node-version }}
19-
uses: actions/setup-node@v3
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
2222
- run: npm ci
@@ -33,9 +33,9 @@ jobs:
3333
node-version: [14.x]
3434

3535
steps:
36-
- uses: actions/checkout@v3
36+
- uses: actions/checkout@v4
3737
- name: Use Node.js ${{ matrix.node-version }}
38-
uses: actions/setup-node@v3
38+
uses: actions/setup-node@v4
3939
with:
4040
node-version: ${{ matrix.node-version }}
4141
- run: npm i -g npm@8
@@ -44,3 +44,17 @@ jobs:
4444
- run: npm run lint
4545
- run: npm run format:check
4646
- run: npm test
47+
48+
test_windows:
49+
runs-on: windows-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
- name: Use Node.js 18.x
53+
uses: actions/setup-node@v4
54+
with:
55+
node-version: 18.x
56+
- run: npm ci
57+
- run: npm run build
58+
- run: npm run lint
59+
- run: npm run format:check
60+
- run: npm test
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"printWidth": 120,
3-
"proseWrap": "always",
43
"singleQuote": true,
54
"trailingComma": "all",
65
"arrowParens": "always",
7-
"tabWidth": 4
6+
"tabWidth": 4,
7+
"endOfLine": "auto"
88
}

examples/sdk/node/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"clean": "rimraf \"lib\"",
1313
"format": "prettier --write '**/*.ts'",
1414
"lint": "eslint . --ext .ts",
15-
"start": "NODE_ENV=production node ./lib/index.js",
15+
"start": "cross-env NODE_ENV=production node ./lib/index.js",
1616
"watch": "tsc -w"
1717
},
1818
"repository": {

package-lock.json

Lines changed: 40 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@
5252
"@types/semver": "^7.5.3",
5353
"@typescript-eslint/eslint-plugin": "^5.59.7",
5454
"@typescript-eslint/parser": "^5.59.7",
55+
"cross-env": "^7.0.3",
5556
"eslint": "^8.41.0",
5657
"eslint-config-prettier": "^8.8.0",
5758
"eslint-plugin-import": "^2.27.5",
5859
"eslint-plugin-local-rules": "^1.3.2",
59-
"prettier": "^2.8.8",
60+
"prettier": "^3.3.2",
6061
"rimraf": "^5.0.1",
6162
"semver": "^7.5.4",
6263
"ts-node": "^10.9.1",

packages/browser/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"clean": "rimraf \"lib\"",
1111
"format": "prettier --write '**/*.ts'",
1212
"lint": "eslint . --ext .ts",
13-
"prepublishOnly": "NODE_ENV=production npm run build",
13+
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
1414
"watch": "webpack -w",
15-
"test": "NODE_ENV=test jest"
15+
"test": "cross-env NODE_ENV=test jest"
1616
},
1717
"repository": {
1818
"type": "git",

packages/electron/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"clean": "rimraf common main renderer",
1010
"format": "prettier --write '**/*.ts'",
1111
"lint": "eslint src --ext .ts",
12-
"prepublishOnly": "NODE_ENV=production npm run build",
12+
"prepublishOnly": "cross-env NODE_ENV=production npm run build",
1313
"watch": "webpack -w",
14-
"test": "NODE_ENV=test jest --passWithNoTests"
14+
"test": "cross-env NODE_ENV=test jest --passWithNoTests"
1515
},
1616
"keywords": [
1717
"Error",

packages/electron/src/main/attributes/WindowAttributeProvider.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ export interface WindowAttributeProviderOptions {
1717
}
1818

1919
export class WindowAttributeProvider implements BacktraceAttributeProvider {
20-
constructor(private readonly _window: BrowserWindow, private readonly _options?: WindowAttributeProviderOptions) {}
20+
constructor(
21+
private readonly _window: BrowserWindow,
22+
private readonly _options?: WindowAttributeProviderOptions,
23+
) {}
2124

2225
public readonly type = 'dynamic';
2326

packages/electron/src/main/ipc/ReadableIpcStream.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ import { ipcHandshake } from '../../common/ipc/ipcHandshake';
77
export class ReadableIpcStream extends Readable {
88
private _isConnected = false;
99

10-
constructor(private readonly _name: string, private readonly _ipc: IpcTransport, opts?: ReadableOptions) {
10+
constructor(
11+
private readonly _name: string,
12+
private readonly _ipc: IpcTransport,
13+
opts?: ReadableOptions,
14+
) {
1115
super(opts);
1216

1317
const close = () => this.destroy();

packages/electron/src/main/modules/BacktraceMainElectronModule.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,11 @@ export class BacktraceMainElectronModule implements BacktraceModule {
121121
}
122122

123123
function toStringDictionary(record: Record<string, unknown>): Record<string, string> {
124-
return Object.keys(record).reduce((obj, key) => {
125-
obj[key] = record[key]?.toString() ?? '';
126-
return obj;
127-
}, {} as Record<string, string>);
124+
return Object.keys(record).reduce(
125+
(obj, key) => {
126+
obj[key] = record[key]?.toString() ?? '';
127+
return obj;
128+
},
129+
{} as Record<string, string>,
130+
);
128131
}

0 commit comments

Comments
 (0)