Skip to content

Commit

Permalink
feat: with worker path 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 0b5850f
Show file tree
Hide file tree
Showing 5 changed files with 1,734 additions and 1,776 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: with worker path as URL for Windows

related mdx-js/eslint-mdx#389
10 changes: 7 additions & 3 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 Down
20 changes: 10 additions & 10 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 @@ -52,27 +52,27 @@
"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 0b5850f

Please sign in to comment.