Skip to content

Commit

Permalink
feat: use workerPath as URL for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed May 7, 2022
1 parent ed8b1b6 commit c53d9dc
Show file tree
Hide file tree
Showing 6 changed files with 1,737 additions and 1,779 deletions.
7 changes: 7 additions & 0 deletions .changeset/silent-badgers-raise.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'synckit': patch
---

feat: use workerPath as URL for Windows

related mdx-js/eslint-mdx#389
2 changes: 1 addition & 1 deletion .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"node": "14",
"node": "16",
"sandboxes": []
}
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ on:

jobs:
ci:
name: Lint and Test with Node.js ${{ matrix.node }}
name: Lint and Test with Node.js ${{ matrix.node }} on ${{ matrix.os }}
strategy:
matrix:
node:
- 12
- 14
- 16
runs-on: ubuntu-latest
- 18
os:
- macos-latest
- ubuntu-latest
- windows-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v3
Expand All @@ -28,7 +32,7 @@ jobs:
run: echo "$(yarn global bin)" >> $GITHUB_PATH

- name: Install Dependencies
run: yarn --frozen-lockfile --ignore-engines
run: yarn --frozen-lockfile

- name: Build, Lint and test
run: |
Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"main": "./lib/index.cjs",
"module": "./lib/index.js",
"exports": {
"types": "./lib/index.d.ts",
"import": "./lib/index.js",
"require": "./lib/index.cjs",
"types": "./lib/index.d.ts"
"require": "./lib/index.cjs"
},
"types": "./lib/index.d.ts",
"files": [
Expand Down Expand Up @@ -48,31 +48,31 @@
"prerelease": "npm run build",
"pretest": "yarn build",
"release": "clean-publish && changeset publish",
"test": "node --experimental-vm-modules node_modules/.bin/jest",
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
"typecov": "type-coverage"
},
"dependencies": {
"@pkgr/utils": "^2.0.3",
"tslib": "^2.3.1"
"@pkgr/utils": "^2.1.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@1stg/lib-config": "^5.5.0",
"@1stg/lib-config": "^6.0.0",
"@changesets/changelog-github": "^0.4.4",
"@changesets/cli": "^2.22.0",
"@types/jest": "^27.4.1",
"@types/node": "^17.0.23",
"@types/jest": "^27.5.0",
"@types/node": "^17.0.31",
"clean-publish": "^4.0.0",
"deasync": "^0.1.26",
"sync-threads": "^1.0.1",
"ts-expect": "^1.3.0",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.1",
"ts-node": "^10.7.0",
"type-coverage": "^2.21.1",
"typescript": "^4.6.3"
"typescript": "^4.6.4"
},
"resolutions": {
"prettier": "^2.6.2",
"tslib": "^2.3.1"
"tslib": "^2.4.0"
},
"commitlint": {
"extends": "@1stg"
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function startWorkerThread<R, T extends AnyAsyncFn<R>>(
? tsUseEsm
? dataUrl(`import '${String(pathToFileURL(finalWorkerPath))}'`)
: `require('ts-node/register');require('${finalWorkerPath}')`
: finalWorkerPath,
: pathToFileURL(finalWorkerPath),
{
eval: isTs && !tsUseEsm,
workerData: { workerPort },
Expand Down
Loading

0 comments on commit c53d9dc

Please sign in to comment.