diff --git a/.yarn/sdks/eslint/package.json b/.yarn/sdks/eslint/package.json index 1a0ae379cdf..af171fc99a7 100644 --- a/.yarn/sdks/eslint/package.json +++ b/.yarn/sdks/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "7.28.0-sdk", + "version": "8.8.0-sdk", "main": "./lib/api.js", "type": "commonjs" } diff --git a/.yarn/sdks/prettier/package.json b/.yarn/sdks/prettier/package.json index 045baae792b..8fb580474c5 100644 --- a/.yarn/sdks/prettier/package.json +++ b/.yarn/sdks/prettier/package.json @@ -1,6 +1,6 @@ { "name": "prettier", - "version": "2.2.1-sdk", + "version": "2.5.1-sdk", "main": "./index.js", "type": "commonjs" } diff --git a/.yarn/sdks/stylelint/bin/stylelint.js b/.yarn/sdks/stylelint/bin/stylelint.js deleted file mode 100755 index 04ffaf8eefa..00000000000 --- a/.yarn/sdks/stylelint/bin/stylelint.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, createRequireFromPath} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require stylelint/bin/stylelint.js - require(absPnpApiPath).setup(); - } -} - -// Defer to the real stylelint/bin/stylelint.js your application uses -module.exports = absRequire(`stylelint/bin/stylelint.js`); diff --git a/.yarn/sdks/stylelint/lib/index.js b/.yarn/sdks/stylelint/lib/index.js deleted file mode 100644 index 1b0b443f818..00000000000 --- a/.yarn/sdks/stylelint/lib/index.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -const {existsSync} = require(`fs`); -const {createRequire, createRequireFromPath} = require(`module`); -const {resolve} = require(`path`); - -const relPnpApiPath = "../../../../.pnp.cjs"; - -const absPnpApiPath = resolve(__dirname, relPnpApiPath); -const absRequire = (createRequire || createRequireFromPath)(absPnpApiPath); - -if (existsSync(absPnpApiPath)) { - if (!process.versions.pnp) { - // Setup the environment to be able to require stylelint/lib/index.js - require(absPnpApiPath).setup(); - } -} - -// Defer to the real stylelint/lib/index.js your application uses -module.exports = absRequire(`stylelint/lib/index.js`); diff --git a/.yarn/sdks/stylelint/package.json b/.yarn/sdks/stylelint/package.json deleted file mode 100644 index 8afaf7a3a3f..00000000000 --- a/.yarn/sdks/stylelint/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "stylelint", - "version": "14.0.1-sdk", - "main": "lib/index.js", - "type": "commonjs" -} diff --git a/.yarn/sdks/typescript/lib/tsserver.js b/.yarn/sdks/typescript/lib/tsserver.js index 71e35cf6119..b46100699e4 100644 --- a/.yarn/sdks/typescript/lib/tsserver.js +++ b/.yarn/sdks/typescript/lib/tsserver.js @@ -143,8 +143,9 @@ const moduleWrapper = tsserver => { let hostInfo = `unknown`; Object.assign(Session.prototype, { - onMessage(/** @type {string} */ message) { - const parsedMessage = JSON.parse(message) + onMessage(/** @type {string | object} */ message) { + const isStringMessage = typeof message === 'string'; + const parsedMessage = isStringMessage ? JSON.parse(message) : message; if ( parsedMessage != null && @@ -158,9 +159,14 @@ const moduleWrapper = tsserver => { } } - return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => { - return typeof value === `string` ? fromEditorPath(value) : value; - })); + const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => { + return typeof value === 'string' ? fromEditorPath(value) : value; + }); + + return originalOnMessage.call( + this, + isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON) + ); }, send(/** @type {any} */ msg) { diff --git a/.yarn/sdks/typescript/lib/tsserverlibrary.js b/.yarn/sdks/typescript/lib/tsserverlibrary.js index 7a2d65ea220..73a026534a0 100644 --- a/.yarn/sdks/typescript/lib/tsserverlibrary.js +++ b/.yarn/sdks/typescript/lib/tsserverlibrary.js @@ -143,8 +143,9 @@ const moduleWrapper = tsserver => { let hostInfo = `unknown`; Object.assign(Session.prototype, { - onMessage(/** @type {string} */ message) { - const parsedMessage = JSON.parse(message) + onMessage(/** @type {string | object} */ message) { + const isStringMessage = typeof message === 'string'; + const parsedMessage = isStringMessage ? JSON.parse(message) : message; if ( parsedMessage != null && @@ -158,9 +159,14 @@ const moduleWrapper = tsserver => { } } - return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => { - return typeof value === `string` ? fromEditorPath(value) : value; - })); + const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => { + return typeof value === 'string' ? fromEditorPath(value) : value; + }); + + return originalOnMessage.call( + this, + isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON) + ); }, send(/** @type {any} */ msg) {