mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 01:15:46 +08:00
Yarn: Updates to SDK packages (#45043)
This commit is contained in:
2
.yarn/sdks/eslint/package.json
vendored
2
.yarn/sdks/eslint/package.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eslint",
|
"name": "eslint",
|
||||||
"version": "7.28.0-sdk",
|
"version": "8.8.0-sdk",
|
||||||
"main": "./lib/api.js",
|
"main": "./lib/api.js",
|
||||||
"type": "commonjs"
|
"type": "commonjs"
|
||||||
}
|
}
|
||||||
|
2
.yarn/sdks/prettier/package.json
vendored
2
.yarn/sdks/prettier/package.json
vendored
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "prettier",
|
"name": "prettier",
|
||||||
"version": "2.2.1-sdk",
|
"version": "2.5.1-sdk",
|
||||||
"main": "./index.js",
|
"main": "./index.js",
|
||||||
"type": "commonjs"
|
"type": "commonjs"
|
||||||
}
|
}
|
||||||
|
20
.yarn/sdks/stylelint/bin/stylelint.js
vendored
20
.yarn/sdks/stylelint/bin/stylelint.js
vendored
@ -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`);
|
|
20
.yarn/sdks/stylelint/lib/index.js
vendored
20
.yarn/sdks/stylelint/lib/index.js
vendored
@ -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`);
|
|
6
.yarn/sdks/stylelint/package.json
vendored
6
.yarn/sdks/stylelint/package.json
vendored
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "stylelint",
|
|
||||||
"version": "14.0.1-sdk",
|
|
||||||
"main": "lib/index.js",
|
|
||||||
"type": "commonjs"
|
|
||||||
}
|
|
16
.yarn/sdks/typescript/lib/tsserver.js
vendored
16
.yarn/sdks/typescript/lib/tsserver.js
vendored
@ -143,8 +143,9 @@ const moduleWrapper = tsserver => {
|
|||||||
let hostInfo = `unknown`;
|
let hostInfo = `unknown`;
|
||||||
|
|
||||||
Object.assign(Session.prototype, {
|
Object.assign(Session.prototype, {
|
||||||
onMessage(/** @type {string} */ message) {
|
onMessage(/** @type {string | object} */ message) {
|
||||||
const parsedMessage = JSON.parse(message)
|
const isStringMessage = typeof message === 'string';
|
||||||
|
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
parsedMessage != null &&
|
parsedMessage != null &&
|
||||||
@ -158,9 +159,14 @@ const moduleWrapper = tsserver => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
|
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
|
||||||
return typeof value === `string` ? fromEditorPath(value) : value;
|
return typeof value === 'string' ? fromEditorPath(value) : value;
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
return originalOnMessage.call(
|
||||||
|
this,
|
||||||
|
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
send(/** @type {any} */ msg) {
|
send(/** @type {any} */ msg) {
|
||||||
|
16
.yarn/sdks/typescript/lib/tsserverlibrary.js
vendored
16
.yarn/sdks/typescript/lib/tsserverlibrary.js
vendored
@ -143,8 +143,9 @@ const moduleWrapper = tsserver => {
|
|||||||
let hostInfo = `unknown`;
|
let hostInfo = `unknown`;
|
||||||
|
|
||||||
Object.assign(Session.prototype, {
|
Object.assign(Session.prototype, {
|
||||||
onMessage(/** @type {string} */ message) {
|
onMessage(/** @type {string | object} */ message) {
|
||||||
const parsedMessage = JSON.parse(message)
|
const isStringMessage = typeof message === 'string';
|
||||||
|
const parsedMessage = isStringMessage ? JSON.parse(message) : message;
|
||||||
|
|
||||||
if (
|
if (
|
||||||
parsedMessage != null &&
|
parsedMessage != null &&
|
||||||
@ -158,9 +159,14 @@ const moduleWrapper = tsserver => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return originalOnMessage.call(this, JSON.stringify(parsedMessage, (key, value) => {
|
const processedMessageJSON = JSON.stringify(parsedMessage, (key, value) => {
|
||||||
return typeof value === `string` ? fromEditorPath(value) : value;
|
return typeof value === 'string' ? fromEditorPath(value) : value;
|
||||||
}));
|
});
|
||||||
|
|
||||||
|
return originalOnMessage.call(
|
||||||
|
this,
|
||||||
|
isStringMessage ? processedMessageJSON : JSON.parse(processedMessageJSON)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
send(/** @type {any} */ msg) {
|
send(/** @type {any} */ msg) {
|
||||||
|
Reference in New Issue
Block a user