Skip to content

Commit c53d9dc

Browse files
committedMay 7, 2022
feat: use workerPath as URL for Windows
related mdx-js/eslint-mdx#389
1 parent ed8b1b6 commit c53d9dc

File tree

6 files changed

+1737
-1779
lines changed

6 files changed

+1737
-1779
lines changed
 

‎.changeset/silent-badgers-raise.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'synckit': patch
3+
---
4+
5+
feat: use workerPath as URL for Windows
6+
7+
related mdx-js/eslint-mdx#389

‎.codesandbox/ci.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
2-
"node": "14",
2+
"node": "16",
33
"sandboxes": []
44
}

‎.github/workflows/ci.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ on:
66

77
jobs:
88
ci:
9-
name: Lint and Test with Node.js ${{ matrix.node }}
9+
name: Lint and Test with Node.js ${{ matrix.node }} on ${{ matrix.os }}
1010
strategy:
1111
matrix:
1212
node:
13-
- 12
1413
- 14
1514
- 16
16-
runs-on: ubuntu-latest
15+
- 18
16+
os:
17+
- macos-latest
18+
- ubuntu-latest
19+
- windows-latest
20+
runs-on: ${{ matrix.os }}
1721
steps:
1822
- name: Checkout Repo
1923
uses: actions/checkout@v3
@@ -28,7 +32,7 @@ jobs:
2832
run: echo "$(yarn global bin)" >> $GITHUB_PATH
2933

3034
- name: Install Dependencies
31-
run: yarn --frozen-lockfile --ignore-engines
35+
run: yarn --frozen-lockfile
3236

3337
- name: Build, Lint and test
3438
run: |

‎package.json

+11-11
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
"main": "./lib/index.cjs",
1313
"module": "./lib/index.js",
1414
"exports": {
15+
"types": "./lib/index.d.ts",
1516
"import": "./lib/index.js",
16-
"require": "./lib/index.cjs",
17-
"types": "./lib/index.d.ts"
17+
"require": "./lib/index.cjs"
1818
},
1919
"types": "./lib/index.d.ts",
2020
"files": [
@@ -48,31 +48,31 @@
4848
"prerelease": "npm run build",
4949
"pretest": "yarn build",
5050
"release": "clean-publish && changeset publish",
51-
"test": "node --experimental-vm-modules node_modules/.bin/jest",
51+
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
5252
"typecov": "type-coverage"
5353
},
5454
"dependencies": {
55-
"@pkgr/utils": "^2.0.3",
56-
"tslib": "^2.3.1"
55+
"@pkgr/utils": "^2.1.0",
56+
"tslib": "^2.4.0"
5757
},
5858
"devDependencies": {
59-
"@1stg/lib-config": "^5.5.0",
59+
"@1stg/lib-config": "^6.0.0",
6060
"@changesets/changelog-github": "^0.4.4",
6161
"@changesets/cli": "^2.22.0",
62-
"@types/jest": "^27.4.1",
63-
"@types/node": "^17.0.23",
62+
"@types/jest": "^27.5.0",
63+
"@types/node": "^17.0.31",
6464
"clean-publish": "^4.0.0",
6565
"deasync": "^0.1.26",
6666
"sync-threads": "^1.0.1",
6767
"ts-expect": "^1.3.0",
68-
"ts-jest": "^27.1.4",
68+
"ts-jest": "^28.0.1",
6969
"ts-node": "^10.7.0",
7070
"type-coverage": "^2.21.1",
71-
"typescript": "^4.6.3"
71+
"typescript": "^4.6.4"
7272
},
7373
"resolutions": {
7474
"prettier": "^2.6.2",
75-
"tslib": "^2.3.1"
75+
"tslib": "^2.4.0"
7676
},
7777
"commitlint": {
7878
"extends": "@1stg"

‎src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ function startWorkerThread<R, T extends AnyAsyncFn<R>>(
165165
? tsUseEsm
166166
? dataUrl(`import '${String(pathToFileURL(finalWorkerPath))}'`)
167167
: `require('ts-node/register');require('${finalWorkerPath}')`
168-
: finalWorkerPath,
168+
: pathToFileURL(finalWorkerPath),
169169
{
170170
eval: isTs && !tsUseEsm,
171171
workerData: { workerPort },

0 commit comments

Comments
 (0)
Please sign in to comment.