From 123098cf33dbc9034511f336e32578354effac2c Mon Sep 17 00:00:00 2001 From: JounQin Date: Thu, 4 Jan 2024 13:17:25 +0800 Subject: [PATCH] chore: add prettier as dev dependency --- CHANGELOG.md | 14 +++++++------- package.json | 2 ++ yarn.lock | 9 +++------ 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fbcf1170..c3b4cf5a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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: @@ -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 diff --git a/package.json b/package.json index 74e8a04c5..1047a2b2b 100644 --- a/package.json +++ b/package.json @@ -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", @@ -80,6 +81,7 @@ "yarn-deduplicate": "^6.0.2" }, "resolutions": { + "prettier": "^3.1.1", "synckit": "link:." }, "commitlint": { diff --git a/yarn.lock b/yarn.lock index f7e0e4fdf..b4bb1e515 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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== @@ -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"