Skip to content

Commit

Permalink
chore: add prettier as dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JounQin committed Jan 4, 2024
1 parent 46ae94e commit 123098c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@

````ts
export interface GlobalShim {
moduleName: string;
moduleName: string
/**
* `undefined` means side effect only
*/
globalName?: string;
globalName?: string
/**
* 1. `undefined` or empty string means `default`, for example:
* ```js
Expand All @@ -43,7 +43,7 @@
* ```
*
*/
named?: string | null;
named?: string | null
/**
* If not `false`, the shim will only be applied when the original `globalName` unavailable,
* for example you may only want polyfill `globalThis.fetch` when it's unavailable natively:
Expand All @@ -55,21 +55,21 @@
* }
* ```
*/
conditional?: boolean;
conditional?: boolean
}
````

You can aslo reuse the exported `DEFAULT_GLOBAL_SHIMS_PRESET` for extanding:

```js
import { DEFAULT_GLOBAL_SHIMS_PRESET, createSyncFn } from "synckit";
import { DEFAULT_GLOBAL_SHIMS_PRESET, createSyncFn } from 'synckit'

const syncFn = createSyncFn(require.resolve("./worker"), {
const syncFn = createSyncFn(require.resolve('./worker'), {
globalShims: [
...DEFAULT_GLOBAL_SHIMS_PRESET,
// your own shim here
],
});
})
```

## 0.8.6
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"execa": "^8.0.1",
"jest": "^29.7.0",
"patch-package": "^8.0.0",
"prettier": "^3.1.1",
"sync-threads": "^1.0.1",
"ts-expect": "^1.3.0",
"ts-jest": "^29.1.1",
Expand All @@ -80,6 +81,7 @@
"yarn-deduplicate": "^6.0.2"
},
"resolutions": {
"prettier": "^3.1.1",
"synckit": "link:."
},
"commitlint": {
Expand Down
9 changes: 3 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9438,12 +9438,7 @@ prettier-plugin-toml@^2.0.1:
dependencies:
"@taplo/lib" "^0.4.0-alpha.2"

prettier@2, prettier@>=2.3, prettier@^2.7.1:
version "2.8.8"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da"
integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==

prettier@^3.1.1:
prettier@2, prettier@>=2.3, prettier@^2.7.1, prettier@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
Expand Down Expand Up @@ -11275,9 +11270,11 @@ sync-threads@^1.0.1:

synckit@^0.8.5:
version "0.0.0"
uid ""

synckit@^0.8.6:
version "0.0.0"
uid ""

"synckit@link:.":
version "0.0.0"
Expand Down

0 comments on commit 123098c

Please sign in to comment.