From cc8a7ff94b649bba2f10c59d4cf9b1c936c8c9e1 Mon Sep 17 00:00:00 2001 From: drew08t Date: Wed, 1 Nov 2023 18:32:11 -0700 Subject: [PATCH] Update to Yarn 4 --- .yarn/sdks/eslint/package.json | 10 +++++++++- .yarn/sdks/prettier/index.js | 20 -------------------- .yarn/sdks/prettier/package.json | 5 +++-- .yarn/sdks/typescript/lib/typescript.js | 6 +++--- .yarn/sdks/typescript/package.json | 6 +++++- 5 files changed, 20 insertions(+), 27 deletions(-) delete mode 100755 .yarn/sdks/prettier/index.js diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json index 9e220ece4c0..ef371cb8e72 100644 --- a/.yarn/sdks/eslint/package.json +++ b/.yarn/sdks/eslint/package.json @@ -2,5 +2,13 @@ "name": "eslint", "version": "8.52.0-sdk", "main": "./lib/api.js", - "type": "commonjs" + "type": "commonjs", + "bin": { + "eslint": "./bin/eslint.js" + }, + "exports": { + "./package.json": "./package.json", + ".": "./lib/api.js", + "./use-at-your-own-risk": "./lib/unsupported-api.js" + } } diff --git a/.yarn/sdks/prettier/index.js b/.yarn/sdks/prettier/index.js deleted file mode 100755 index 8758e367a72..00000000000 --- a/.yarn/sdks/prettier/index.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = createRequire(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require prettier - require(absPnpApiPath).setup(); - } -} - -// Defer to the real prettier your application uses -module.exports = absRequire(`prettier`); diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json index 3c1bb0be150..4301e0948f1 100644 --- a/.yarn/sdks/prettier/package.json +++ b/.yarn/sdks/prettier/package.json @@ -1,6 +1,7 @@ { "name": "prettier", "version": "3.0.0-sdk", - "main": "./index.js", - "type": "commonjs" + "main": "./index.cjs", + "type": "commonjs", + "bin": "./bin/prettier.cjs" } diff --git a/.yarn/sdks/typescript/lib/typescript.js b/.yarn/sdks/typescript/lib/typescript.js index e14fa87beaa..b5f4db25bee 100644 --- a/.yarn/sdks/typescript/lib/typescript.js +++ b/.yarn/sdks/typescript/lib/typescript.js @@ -11,10 +11,10 @@ const absRequire = createRequire(absPnpApiPath); if (existsSync(absPnpApiPath)) { if (!process.versions.pnp) { - // Setup the environment to be able to require typescript/lib/typescript.js + // Setup the environment to be able to require typescript require(absPnpApiPath).setup(); } } -// Defer to the real typescript/lib/typescript.js your application uses -module.exports = absRequire(`typescript/lib/typescript.js`); +// Defer to the real typescript your application uses +module.exports = absRequire(`typescript`); diff --git a/.yarn/sdks/typescript/package.json b/.yarn/sdks/typescript/package.json index 15466d2023f..417fa1369db 100644 --- a/.yarn/sdks/typescript/package.json +++ b/.yarn/sdks/typescript/package.json @@ -2,5 +2,9 @@ "name": "typescript", "version": "4.8.4-sdk", "main": "./lib/typescript.js", - "type": "commonjs" + "type": "commonjs", + "bin": { + "tsc": "./bin/tsc", + "tsserver": "./bin/tsserver" + } }