Merge branch 'main' into next-rebase

# Conflicts:
#	.eslintrc.cjs
#	package.json
#	scripts/build/bundler.mjs
#	scripts/build/config.mjs
#	scripts/build/esbuild-plugins/replace-module.mjs
#	src/cli/file-info.js
#	src/cli/find-config-path.js
#	src/cli/index.js
This commit is contained in:
fisker Cheung committed 2022-03-24 15:02:29 +08:00
commit a21dfbfa21
50 files changed
+1519 -355

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
.tmp
!/*.js
/tests/format/**/*.js
/tests/integration/cli/
+62
View File
@@ -0,0 +1,62 @@
name: Bundler_Friendly
on:
schedule:
# “At 00:00 on Sunday.” https://crontab.guru/#0%C2%A00%C2%A0*%C2%A0*%C2%A00
- cron: "0 0 * * 0"
pull_request:
paths:
- "scripts/tools/bundle-test/**"
# This workflow file
- ".github/workflows/bundler-friendly.yml"
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: "yarn"
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Build Package
run: yarn build
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
webpack:
name: Bundle Prettier with webpack
runs-on: ubuntu-latest
needs: [build]
defaults:
run:
working-directory: scripts/tools/bundle-test
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Setup Node.js
uses: actions/setup-node@v2.5.1
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: dist
path: dist
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Test
run: yarn test
+4 -2
View File
@@ -2,12 +2,14 @@ name: Dev_Package_Test
on:
schedule:
- cron: "0 0 * * 1"
# “At 00:00 on Sunday.” https://crontab.guru/#0%C2%A00%C2%A0*%C2%A0*%C2%A00
- cron: "0 0 * * 0"
pull_request:
paths:
- "package.json"
- ".github/workflows/dev-package-test.yml"
- "yarn.lock"
# This workflow file
- ".github/workflows/dev-package-test.yml"
jobs:
test:
+2
View File
@@ -4,10 +4,12 @@ on:
push:
paths:
- "scripts/tools/eslint-plugin-prettier-internal-rules/**"
# This workflow file
- ".github/workflows/eslint-rules.yml"
pull_request:
paths:
- "scripts/tools/eslint-plugin-prettier-internal-rules/**"
# This workflow file
- ".github/workflows/eslint-rules.yml"
jobs:
+7 -3
View File
@@ -1,12 +1,17 @@
/.cache
# node_modules
# We have `node_modules` directory for tests, don't ignore them all
/node_modules
/website/node_modules
/scripts/release/node_modules
/scripts/tools/bundle-test/node_modules
/scripts/tools/eslint-plugin-prettier-internal-rules/node_modules
.tmp
*.log
/errors
/test*.*
/.vscode
/dist
/website/node_modules
/website/build
/website/i18n
/website/static/playground.js
@@ -22,5 +27,4 @@ package-lock.json
!.yarn/versions
.pnp.*
.nyc_output
/scripts/tools/eslint-plugin-prettier-internal-rules/node_modules
.devcontainer
+1
View File
@@ -1,3 +1,4 @@
.tmp
dist/
.cache/
coverage/
+12
View File
@@ -0,0 +1,12 @@
#### Ignore `loglevel` when printing information (#12477 by @fisker)
<!-- prettier-ignore -->
```bash
# Prettier stable
prettier --loglevel silent --find-config-path index.js
# Nothing printed
# Prettier main
prettier --loglevel silent --help no-color
# .prettierrc
```
+3
View File
@@ -0,0 +1,3 @@
#### Fix minimist security issue (#12513 by @dependabot)
Details: [Prototype Pollution](https://security.snyk.io/vuln/SNYK-JS-MINIMIST-559764)
+6
View File
@@ -0,0 +1,6 @@
#### Make artifact friendly for webpack (#12485, #12511 by @fisker)
Fixes two problems when bundling our UMD files with webpack:
- A error `` "`....__exportStar` is not a function" `` throws when running the bundles.
- Some files cause warning about `"Critical dependency: the request of a dependency is an expression"`.
+37
View File
@@ -0,0 +1,37 @@
#### Fix non-idempotent formatting of function calls with complex type arguments (#12508 by @sosukesuzuki)
<!-- prettier-ignore -->
```tsx
// Input
const foo =
doSomething<{ foo1: "foo1", foo2: "foo2", foo3: "foo3", foo4: "foo4", foo5: "foo5" }>();
// Prettier stable (first)
const foo =
doSomething<{
foo1: "foo1";
foo2: "foo2";
foo3: "foo3";
foo4: "foo4";
foo5: "foo5";
}>();
// Prettier stable (second)
const foo = doSomething<{
foo1: "foo1";
foo2: "foo2";
foo3: "foo3";
foo4: "foo4";
foo5: "foo5";
}>();
// Prettier main
const foo = doSomething<{
foo1: "foo1";
foo2: "foo2";
foo3: "foo3";
foo4: "foo4";
foo5: "foo5";
}>();
```
+10 -10
View File
@@ -24,10 +24,10 @@
"dependencies": {
"@angular/compiler": "12.2.16",
"@babel/code-frame": "7.16.7",
"@babel/parser": "7.17.3",
"@babel/parser": "7.17.8",
"@glimmer/syntax": "0.84.1",
"@iarna/toml": "2.2.5",
"@typescript-eslint/typescript-estree": "5.15.0",
"@typescript-eslint/typescript-estree": "5.16.0",
"acorn": "8.7.0",
"acorn-jsx": "5.3.2",
"angular-estree-parser": "2.5.0",
@@ -49,7 +49,7 @@
"fast-glob": "3.2.11",
"fast-json-stable-stringify": "2.1.0",
"find-parent-dir": "0.3.1",
"flow-parser": "0.173.0",
"flow-parser": "0.174.1",
"get-stdin": "8.0.0",
"graphql": "15.6.1",
"html-element-attributes": "3.1.0",
@@ -58,7 +58,7 @@
"html-void-elements": "2.0.1",
"ignore": "5.2.0",
"jest-docblock": "27.5.1",
"json5": "2.2.0",
"json5": "2.2.1",
"leven": "4.0.0",
"lines-and-columns": "2.0.3",
"linguist-languages": "7.15.0",
@@ -66,7 +66,7 @@
"mem": "9.0.2",
"meriyah": "4.2.0",
"micromatch": "4.0.4",
"minimist": "1.2.5",
"minimist": "1.2.6",
"n-readlines": "1.0.1",
"outdent": "0.8.0",
"parse-srcset": "ikatyang/parse-srcset#54eb9c1cb21db5c62b4d0e275d7249516df6f0ee",
@@ -93,7 +93,7 @@
"yaml-unist-parser": "1.3.1"
},
"devDependencies": {
"@babel/core": "7.17.7",
"@babel/core": "7.17.8",
"@babel/preset-env": "7.16.11",
"@babel/types": "7.17.0",
"@esbuild-plugins/node-modules-polyfill": "0.1.4",
@@ -102,7 +102,7 @@
"@prettier/jest-light-runner": "file:./tests/config/jest-light-runner",
"@types/estree": "0.0.51",
"@types/jest": "27.4.1",
"@typescript-eslint/eslint-plugin": "5.15.0",
"@typescript-eslint/eslint-plugin": "5.16.0",
"babel-jest": "27.5.1",
"benchmark": "2.1.4",
"browserslist-to-esbuild": "1.1.1",
@@ -116,11 +116,11 @@
"eslint-formatter-friendly": "7.0.0",
"eslint-plugin-compat": "4.0.2",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-jest": "26.1.1",
"eslint-plugin-jest": "26.1.2",
"eslint-plugin-prettier-internal-rules": "2.0.1",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-regexp": "1.5.1",
"eslint-plugin-unicorn": "41.0.0",
"eslint-plugin-regexp": "1.6.0",
"eslint-plugin-unicorn": "41.0.1",
"esm-utils": "3.0.0",
"execa": "6.1.0",
"jest": "27.5.1",
+77 -30
View File
@@ -6,7 +6,6 @@ import browserslistToEsbuild from "browserslist-to-esbuild";
import { PROJECT_ROOT, DIST_DIR } from "../utils/index.mjs";
import esbuildPluginEvaluate from "./esbuild-plugins/evaluate.mjs";
import esbuildPluginReplaceModule from "./esbuild-plugins/replace-module.mjs";
import esbuildPluginReplaceText from "./esbuild-plugins/replace-text.mjs";
import esbuildPluginLicense from "./esbuild-plugins/license.mjs";
import esbuildPluginUmd from "./esbuild-plugins/umd.mjs";
import esbuildPluginInteropDefault from "./esbuild-plugins/interop-default.mjs";
@@ -19,9 +18,53 @@ const { __dirname, readJsonSync, require } = createEsmUtils(import.meta);
const packageJson = readJsonSync("../../package.json");
const umdTarget = browserslistToEsbuild(packageJson.browserslist);
const EXPORT_UNDEFINED_MODULE_REPLACEMENT = {
contents: "export default undefined",
};
function getBabelConfig(bundle) {
const config = {
babelrc: false,
assumptions: {
setSpreadProperties: true,
},
sourceType: "unambiguous",
plugins: bundle.babelPlugins || [],
compact: false,
exclude: [/\/core-js\//],
};
const targets = { node: "10" };
if (bundle.target === "universal") {
targets.browsers = packageJson.browserslist;
}
config.presets = [
[
"@babel/preset-env",
{
targets,
exclude: [
"es.array.unscopables.flat",
"es.array.unscopables.flat-map",
"es.array.sort",
"es.promise",
"es.promise.finally",
"es.string.replace",
"es.symbol.description",
"es.typed-array.*",
"web.*",
],
modules: false,
useBuiltIns: "usage",
corejs: {
version: 3,
},
debug: false,
},
],
];
config.plugins.push([
"@babel/plugin-proposal-object-rest-spread",
{ useBuiltIns: true },
]);
return config;
}
const bundledFiles = [
...bundles,
@@ -32,7 +75,7 @@ const bundledFiles = [
}));
function* getEsbuildOptions(bundle, buildOptions) {
const replaceText = [
const replaceModule = [
// Use `require` directly
{
file: "*",
@@ -45,11 +88,10 @@ function* getEsbuildOptions(bundle, buildOptions) {
find: "const __dirname = path.dirname(fileURLToPath(import.meta.url));",
replacement: "",
},
// `tslib` exports global variables
// #12493, not sure what the problem is, but replace the cjs version with esm version seems fix it
{
file: require.resolve("tslib"),
find: "factory(createExporter(root",
replacement: "factory(createExporter({}",
module: require.resolve("tslib"),
path: require.resolve("tslib").replace(/tslib\.js$/, "tslib.es6.js"),
},
];
@@ -61,8 +103,8 @@ function* getEsbuildOptions(bundle, buildOptions) {
if (bundle.target === "universal") {
// We can't reference `process` in UMD bundles and this is
// an undocumented "feature"
replaceText.push({
file: "*",
replaceModule.push({
module: "*",
find: "process.env.PRETTIER_DEBUG",
replacement: "globalThis.PRETTIER_DEBUG",
});
@@ -78,20 +120,20 @@ function* getEsbuildOptions(bundle, buildOptions) {
define.__dirname = JSON.stringify("/prettier-security-dirname-placeholder");
}
const replaceModule = {};
// Replace other bundled files
if (bundle.target === "node") {
// Replace bundled files and `package.json` with dynamic `require()`
for (const { input, output } of bundledFiles) {
replaceModule[input] = { path: output, external: true };
replaceModule.push({ module: input, external: output });
}
} else {
// Universal bundle only use version info from package.json
// Replace package.json with `{version: "{VERSION}"}`
replaceModule[path.join(PROJECT_ROOT, "package.json")] = {
contents: JSON.stringify({ version: packageJson.version }),
replaceModule.push({
module: path.join(PROJECT_ROOT, "package.json"),
text: JSON.stringify({ version: packageJson.version }),
loader: "json",
};
});
// Replace parser getters with `undefined`
for (const file of [
@@ -105,17 +147,24 @@ function* getEsbuildOptions(bundle, buildOptions) {
// This module requires file access, should not include in universal bundle
"src/utils/get-interpreter.js",
]) {
replaceModule[path.join(PROJECT_ROOT, file)] =
EXPORT_UNDEFINED_MODULE_REPLACEMENT;
replaceModule.push({
module: path.join(PROJECT_ROOT, file),
text: "export default undefined;",
});
}
// Prevent `esbuildPluginNodeModulePolyfills` include shim for this module
replaceModule.assert = require.resolve("./shims/assert.cjs");
// `esbuildPluginNodeModulePolyfills` didn't shim this module
replaceModule.module = {
contents: "export const createRequire = () => {};",
};
replaceModule.push(
// Prevent `esbuildPluginNodeModulePolyfills` include shim for this module
{
module: "assert",
path: require.resolve("./shims/assert.cjs"),
},
// `esbuildPluginNodeModulePolyfills` didn't shim this module
{
module: "module",
text: "export const createRequire = () => {};",
}
);
}
let shouldMinify = buildOptions.minify;
@@ -134,12 +183,10 @@ function* getEsbuildOptions(bundle, buildOptions) {
plugins: [
esbuildPluginEvaluate(),
esbuildPluginStripNodeProtocol(),
esbuildPluginReplaceModule({ ...replaceModule, ...bundle.replaceModule }),
bundle.target === "universal" && esbuildPluginNodeModulePolyfills(),
esbuildPluginReplaceText({
filter: /\.[cm]?js$/,
replacements: [...replaceText, ...(bundle.replaceText ?? [])],
esbuildPluginReplaceModule({
replacements: [...replaceModule, ...(bundle.replaceModule ?? [])],
}),
bundle.target === "universal" && esbuildPluginNodeModulePolyfills(),
buildOptions.onLicenseFound &&
esbuildPluginLicense({
cwd: PROJECT_ROOT,
+99 -57
View File
@@ -1,6 +1,7 @@
import path from "node:path";
import { createRequire } from "node:module";
import createEsmUtils from "esm-utils";
import { PROJECT_ROOT } from "../utils/index.mjs";
const { require } = createEsmUtils(import.meta);
@@ -12,8 +13,7 @@ const { require } = createEsmUtils(import.meta);
* @property {'node' | 'universal'} target - should generate a CJS only for node or universal bundle
* @property {'core' | 'plugin'} type - it's a plugin bundle or core part of prettier
* @property {string[]} external - array of paths that should not be included in the final bundle
* @property {Object.<string, string | {code?: string, file?: string | URL}>} replaceModule - module replacement path or code
* @property {{file: string, find: string, replacement: string}[]} replaceText - Text replacements
* @property {object[]} replaceModule - Module replacements
* @property {string[]} babelPlugins - babel plugins
* @property {boolean?} minify - minify
* @property {string[]?} esbuildTarget - ESBuild target
@@ -32,10 +32,8 @@ We can switch to deep require once https://github.com/kpdecker/jsdiff/pull/351 g
*/
const diffPackageDirectory = path.dirname(require.resolve("diff/package.json"));
const replaceDiffPackageEntry = (file) => ({
[path.join(diffPackageDirectory, "lib/index.mjs")]: path.join(
diffPackageDirectory,
file
),
module: path.join(diffPackageDirectory, "lib/index.mjs"),
path: path.join(diffPackageDirectory, file),
});
/** @type {Bundle[]} */
@@ -45,10 +43,10 @@ const parsers = [
},
{
input: "src/language-js/parse/flow.js",
replaceText: [
replaceModule: [
// `flow-parser` use this for `globalThis`, can't work in strictMode
{
file: require.resolve("flow-parser"),
module: require.resolve("flow-parser"),
find: "(function(){return this}())",
replacement: "(globalThis)",
},
@@ -56,43 +54,61 @@ const parsers = [
},
{
input: "src/language-js/parse/typescript.js",
replaceText: [
replaceModule: [
// `@typescript-eslint/typescript-estree` v4
{
file: "*",
module: "*",
find: 'require("globby")',
replacement: "{}",
},
{
file: "*",
module: "*",
find: "extra.projects = prepareAndTransformProjects(",
replacement: "extra.projects = [] || prepareAndTransformProjects(",
},
{
file: "*",
module: "*",
find: "process.versions.node",
replacement: JSON.stringify("999.999.999"),
},
{
file: "*",
module: "*",
find: "process.cwd()",
replacement: JSON.stringify("/prettier-security-dirname-placeholder"),
},
{
file: "*",
module: "*",
find: 'require("perf_hooks")',
replacement: "{}",
},
{
file: "*",
module: "*",
find: 'require("inspector")',
replacement: "{}",
},
{
file: "*",
module: "*",
find: "typescriptVersionIsAtLeast[version] = semverCheck(version);",
replacement: "typescriptVersionIsAtLeast[version] = true;",
},
// The next two replacement fixed webpack warning `Critical dependency: require function is used in a way in which dependencies cannot be statically extracted`
// #12338
{
module: require.resolve(
"@typescript-eslint/typescript-estree/dist/create-program/shared.js"
),
find: "moduleResolver = require(moduleResolverPath);",
replacement: "throw new Error('Dynamic require is not supported');",
},
{
module: require.resolve("typescript"),
process(text) {
return text.replace(
/(?<=\n)(?<indentString>\s+)function tryGetNodePerformanceHooks\(\) {.*?\n\k<indentString>}(?=\n)/s,
"function tryGetNodePerformanceHooks() {}"
);
},
},
...Object.entries({
// `typescript/lib/typescript.js` expose extra global objects
@@ -138,29 +154,29 @@ const parsers = [
'require("source-map-support").install()': "",
"require(modulePath)": "undefined",
}).map(([find, replacement]) => ({
file: require.resolve("typescript"),
module: require.resolve("typescript"),
find,
replacement,
})),
{
module: require.resolve("debug/src/browser.js"),
path: require.resolve("./shims/debug.cjs"),
},
],
replaceModule: {
[require.resolve("debug/src/browser.js")]:
require.resolve("./shims/debug.cjs"),
},
},
{
input: "src/language-js/parse/acorn-and-espree.js",
name: "prettierPlugins.espree",
// TODO: Rename this file to `parser-acorn-and-espree.js` or find a better way
output: "parser-espree.js",
replaceText: [
replaceModule: [
{
file: require.resolve("espree"),
module: require.resolve("espree"),
find: "const Syntax = (function() {",
replacement: "const Syntax = undefined && (function() {",
},
{
file: require.resolve("espree"),
module: require.resolve("espree"),
find: "var visitorKeys = require('eslint-visitor-keys');",
replacement: "var visitorKeys;",
},
@@ -171,9 +187,9 @@ const parsers = [
},
{
input: "src/language-js/parse/angular.js",
replaceText: [
replaceModule: [
{
file: "*",
module: "*",
find: 'require("@angular/compiler/src/',
replacement: 'require("@angular/compiler/esm2015/src/',
},
@@ -181,14 +197,23 @@ const parsers = [
},
{
input: "src/language-css/parser-postcss.js",
replaceText: [
replaceModule: [
// `postcss-values-parser` uses constructor.name, it will be changed by bundler
// https://github.com/shellscape/postcss-values-parser/blob/c00f858ab8c86ce9f06fdb702e8f26376f467248/lib/parser.js#L499
{
// `postcss-values-parser` uses constructor.name, it will be changed by bundler
// https://github.com/shellscape/postcss-values-parser/blob/c00f858ab8c86ce9f06fdb702e8f26376f467248/lib/parser.js#L499
file: require.resolve("postcss-values-parser/lib/parser.js"),
module: require.resolve("postcss-values-parser/lib/parser.js"),
find: "node.constructor.name === 'Word'",
replacement: "node.type === 'word'",
},
// The following two replacements prevent load `source-map` module
{
module: require.resolve("postcss/lib/previous-map.js"),
text: "module.exports = class {};",
},
{
module: require.resolve("postcss/lib/map-generator.js"),
text: "module.exports = class { generate() {} };",
},
],
},
{
@@ -196,10 +221,12 @@ const parsers = [
},
{
input: "src/language-markdown/parser-markdown.js",
replaceModule: {
[require.resolve("parse-entities/decode-entity.browser.js")]:
require.resolve("parse-entities/decode-entity.js"),
},
replaceModule: [
{
module: require.resolve("parse-entities/decode-entity.browser.js"),
path: require.resolve("parse-entities/decode-entity.js"),
},
],
},
{
input: "src/language-handlebars/parser-glimmer.js",
@@ -209,12 +236,6 @@ const parsers = [
},
{
input: "src/language-yaml/parser-yaml.js",
replaceModule: {
// Use `tslib.es6.js`, so we can avoid `globalThis` shim
[require.resolve("tslib")]: require
.resolve("tslib")
.replace(/tslib\.js$/, "tslib.es6.js"),
},
},
].map((bundle) => {
const { name } = bundle.input.match(
@@ -234,14 +255,26 @@ const parsers = [
const coreBundles = [
{
input: "src/index.js",
replaceText: [
replaceModule: [
{
file: require.resolve("@iarna/toml/lib/toml-parser.js"),
module: require.resolve("@iarna/toml/lib/toml-parser.js"),
find: "const utilInspect = eval(\"require('util').inspect\")",
replacement: "const utilInspect = require('util').inspect",
},
// `editorconfig` use a older version of `semver` and only uses `semver.gte`
{
module: require.resolve("editorconfig"),
find: 'var semver = __importStar(require("semver"));',
replacement: `
var semver = {
gte: require(${JSON.stringify(
require.resolve("semver/functions/gte")
)})
};
`,
},
replaceDiffPackageEntry("lib/diff/array.js"),
],
replaceModule: replaceDiffPackageEntry("lib/diff/array.js"),
},
{
input: "src/document/index.js",
@@ -255,14 +288,22 @@ const coreBundles = [
input: "src/standalone.js",
name: "prettier",
target: "universal",
replaceModule: {
[require.resolve("@babel/highlight")]: require.resolve(
"./shims/babel-highlight.cjs"
),
[createRequire(require.resolve("vnopts")).resolve("chalk")]:
require.resolve("./shims/chalk.cjs"),
...replaceDiffPackageEntry("lib/diff/array.js"),
},
replaceModule: [
{
module: require.resolve("@babel/highlight"),
path: require.resolve("./shims/babel-highlight.cjs"),
},
{
module: createRequire(require.resolve("vnopts")).resolve("chalk"),
path: require.resolve("./shims/chalk.cjs"),
},
replaceDiffPackageEntry("lib/diff/array.js"),
{
module: path.join(PROJECT_ROOT, "src/main/parser.js"),
find: "return requireParser(opts.parser);",
replacement: "",
},
],
},
{
input: "bin/prettier.js",
@@ -276,17 +317,18 @@ const coreBundles = [
output: "cli.js",
external: ["benchmark"],
interopDefault: false,
replaceModule: replaceDiffPackageEntry("lib/patch/create.js"),
replaceModule: [replaceDiffPackageEntry("lib/patch/create.js")],
},
{
input: "src/common/third-party.cjs",
output: "third-party.js",
replaceModule: {
replaceModule: [
// cosmiconfig@6 -> import-fresh can't find parentModule, since module is bundled
[require.resolve("parent-module")]: require.resolve(
"./shims/parent-module.cjs"
),
},
{
module: require.resolve("parent-module"),
path: require.resolve("./shims/parent-module.cjs"),
},
],
},
].map((bundle) => ({
type: "core",
@@ -10,6 +10,10 @@ export default function esbuildPluginLicense(options) {
build.initialOptions.metafile = true;
build.onEnd((result) => {
if (result.errors.length > 0) {
return;
}
const files = Object.keys(result.metafile.inputs);
const chunk = {
modules: Object.fromEntries(
+197 -49
View File
@@ -1,66 +1,214 @@
export default function esbuildPluginReplaceModule(replacements = {}) {
const pathReplacements = new Map();
const contentsReplacements = new Map();
import fs from "node:fs/promises";
for (let [file, options] of Object.entries(replacements)) {
if (typeof options === "string") {
options = { path: options };
const DEFAULT_ON_RESOLVE_CONCEPTS = { filter: /./, namespace: "file" };
const DEFAULT_ON_LOAD_CONCEPTS = {
filter: /.(?:js|json|mjs|cjs)$/,
namespace: "file",
};
function processReplacements(replacements) {
const onResolveReplacements = new Map();
const onLoadReplacements = new Map();
const onLoadProcessors = new Map();
const checkPathReplaced = (module) => {
if (!onResolveReplacements.has(module)) {
return;
}
if (Reflect.has(options, "path")) {
pathReplacements.set(file, options);
throw new Error(`module: '${module}' already replaced with another path.`);
};
const checkTextReplaced = (module) => {
if (!onLoadReplacements.has(module)) {
return;
}
throw new Error(
`module: '${module}' already replaced with another content.`
);
};
for (const replacement of replacements) {
const { module } = replacement;
if (typeof module !== "string") {
throw new TypeError("'module' option is required.");
}
if (
Reflect.has(replacement, "external") ||
Reflect.has(replacement, "path")
) {
if (module === "*") {
throw new Error("Can not replace all modules with the same path.");
}
checkPathReplaced(module);
onResolveReplacements.set(
module,
Reflect.has(replacement, "external")
? { external: true, path: replacement.external }
: { path: replacement.path }
);
continue;
}
if (Reflect.has(options, "contents")) {
contentsReplacements.set(file, options);
if (Reflect.has(replacement, "text")) {
if (module === "*") {
throw new Error("Can not replace all modules with the same content.");
}
checkPathReplaced(module);
checkTextReplaced(module);
onLoadReplacements.set(module, {
contents: replacement.text,
loader: replacement.loader,
});
continue;
}
throw new Error("'path' or 'contents' is required.");
checkPathReplaced(module);
checkTextReplaced(module);
if (!onLoadProcessors.has(module)) {
onLoadProcessors.set(module, []);
}
const processFunctions = onLoadProcessors.get(module);
if (Reflect.has(replacement, "process")) {
const { process } = replacement;
if (typeof process !== "function") {
throw new TypeError("'process' option should be a function.");
}
processFunctions.push(process);
continue;
}
if (
Reflect.has(replacement, "find") &&
Reflect.has(replacement, "replacement")
) {
processFunctions.push((text) =>
text.replaceAll(replacement.find, replacement.replacement)
);
continue;
}
console.log(replacement);
throw new Error("Unexpected replacement option.");
}
return { onResolveReplacements, onLoadReplacements, onLoadProcessors };
}
function setupOnResolveListener(build, { concepts, replacements }) {
if (replacements.size === 0) {
return;
}
// `build.resolve()` will call `onResolve` listener
// Use a `Set` to avoid infinite loop
const seenModules = new Set();
build.onResolve(concepts, async (args) => {
if (
!(
args.kind === "require-call" ||
args.kind === "import-statement" ||
args.kind === "dynamic-import"
)
) {
return;
}
const key = JSON.stringify(args);
if (seenModules.has(key)) {
return;
}
seenModules.add(key);
const resolveResult = await build.resolve(args.path, {
importer: args.importer,
namespace: args.namespace,
resolveDir: args.resolveDir,
kind: args.kind,
pluginData: args.pluginData,
});
// `build.resolve()` seems not respecting `browser` field in `package.json`,
// `resolveResult` maybe not correct, return `undefined` to let esbuild process the file.
return replacements.get(resolveResult.path);
});
}
function setupOnLoadListener(build, { concepts, replacements, processors }) {
if (replacements.size === 0 && processors.size === 0) {
return;
}
const processFunctionsForAllModules = processors.has("*")
? processors.get("*")
: [];
build.onLoad(concepts, async ({ path: file }) => {
if (replacements.has(file)) {
return replacements.get(file);
}
const processFunctions = [
...processFunctionsForAllModules,
...(processors.has(file) ? processors.get(file) : []),
];
if (processFunctions.length === 0) {
return;
}
const original = await fs.readFile(file, "utf8");
let text = original;
for (const process of processFunctions) {
text = process(text);
}
// For files not JavaScript, we need add correct `loader` to the result,
// We can simply return `undefined` to let esbuild process the file.
if (original === text) {
return;
}
return { contents: text };
});
}
export default function esbuildPluginReplaceModule({
onLoadConcepts = DEFAULT_ON_LOAD_CONCEPTS,
onResolveConcepts = DEFAULT_ON_RESOLVE_CONCEPTS,
replacements,
}) {
const { onResolveReplacements, onLoadReplacements, onLoadProcessors } =
processReplacements(replacements);
const onResolveListenerOptions = {
concepts: onResolveConcepts,
replacements: onResolveReplacements,
};
const onLoadListenerOptions = {
concepts: onLoadConcepts,
replacements: onLoadReplacements,
processors: onLoadProcessors,
};
return {
name: "replace-module",
setup(build) {
// `build.resolve()` will call `onResolve` listener
// Avoid infinite loop
const seen = new Set();
build.onResolve({ filter: /./ }, async (args) => {
if (
!(
args.kind === "require-call" ||
args.kind === "import-statement" ||
args.kind === "dynamic-import"
) ||
args.namespace !== "file"
) {
return;
}
const key = JSON.stringify(args);
if (seen.has(key)) {
return;
}
seen.add(key);
const resolveResult = await build.resolve(args.path, {
importer: args.importer,
namespace: args.namespace,
resolveDir: args.resolveDir,
kind: args.kind,
pluginData: args.pluginData,
});
// `build.resolve()` seems not respecting `browser` field in `package.json`
// Return `undefined` instead of `resolveResult` so esbuild can resolve correctly
return pathReplacements.get(resolveResult.path);
});
build.onLoad({ filter: /./ }, ({ path }) =>
contentsReplacements.get(path)
);
setupOnResolveListener(build, onResolveListenerOptions);
setupOnLoadListener(build, onLoadListenerOptions);
},
};
}
@@ -1,34 +0,0 @@
import fs from "node:fs/promises";
function replaceText(text, options) {
return text.replaceAll(options.find, options.replacement);
}
export default function esbuildPluginReplaceText({
filter = /./,
replacements,
}) {
for (const replacement of replacements) {
if (!replacement.file) {
throw new Error("'file' option is required.");
}
}
return {
name: "replace-text",
setup(build) {
build.onLoad({ filter }, async ({ path: file }) => {
let text = await fs.readFile(file, "utf8");
for (const replacement of replacements) {
if (replacement.file !== "*" && replacement.file !== file) {
continue;
}
text = replaceText(text, replacement);
}
return { contents: text };
});
},
};
}
@@ -7,8 +7,12 @@ export default function esbuildPluginThrowWarnings() {
return {
name: "throw-warnings",
setup(build) {
build.onEnd(({ warnings }) => {
for (const warning of warnings) {
build.onEnd((result) => {
if (result.errors.length > 0) {
return;
}
for (const warning of result.warnings) {
if (ignoredWarnings.has(warning.text)) {
continue;
}
+5 -1
View File
@@ -99,7 +99,11 @@ export default function esbuildPluginUmd(options) {
esbuildOptions.globalName = temporaryName;
esbuildOptions.format = "iife";
build.onEnd(() => {
build.onEnd((result) => {
if (result.errors.length > 0) {
return;
}
if (!fs.existsSync(outfile)) {
throw new Error(`${outfile} not exists`);
}
+96
View File
@@ -0,0 +1,96 @@
import { fileURLToPath } from "node:url";
import path from "node:path";
import fs from "node:fs/promises";
import { createRequire } from "node:module";
import webpack from "webpack";
import { DIST_DIR } from "../../../scripts/utils/index.mjs";
function runWebpack(config) {
return new Promise((resolve, reject) => {
webpack(config, (error, stats) => {
if (error) {
reject(error);
return;
}
if (stats.hasErrors()) {
const { errors } = stats.toJson();
const error = new Error(errors[0].message);
error.errors = errors;
reject(error);
return;
}
resolve(stats);
});
});
}
const TEMPORARY_DIRECTORY = fileURLToPath(new URL("./.tmp", import.meta.url));
/* `require` in `parser-typescript.js`, #12338 */
(async () => {
const esmFilesDirectory = path.join(DIST_DIR, "esm");
const files = [
(await fs.readdir(DIST_DIR))
.filter(
(name) =>
name.startsWith("parser-") ||
name === "standalone.js" ||
name === "doc.js"
)
.map((name) => ({
displayName: name,
name,
file: path.join(DIST_DIR, name),
})),
(await fs.readdir(esmFilesDirectory)).map((name) => ({
displayName: `esm/${name}`,
name,
file: path.join(esmFilesDirectory, name),
})),
].flat();
for (const { displayName, name, file } of files) {
console.log(`${displayName}: `);
const isEsmModule = name.endsWith(".mjs");
const stats = await runWebpack({
mode: "production",
entry: file,
output: {
path: TEMPORARY_DIRECTORY,
filename: `${name}.[contenthash:7].${isEsmModule ? "mjs" : "cjs"}`,
},
performance: { hints: false },
optimization: { minimize: false },
});
const result = stats.toJson();
const { warnings, assets } = result;
if (warnings.length > 0) {
console.log(warnings);
throw new Error("Unexpected webpack warning.");
}
if (assets.length > 1) {
console.log(assets);
throw new Error("Unexpected assets.");
}
if (!isEsmModule) {
const outputFile = assets[0].name;
const require = createRequire(import.meta.url);
try {
require(path.join(TEMPORARY_DIRECTORY, assets[0].name));
} catch (error) {
console.log(`'${outputFile}' is not functional.`);
throw error;
}
}
console.log(" Passed.");
}
})();
+12
View File
@@ -0,0 +1,12 @@
{
"name": "@prettier/bundle-test",
"version": "0.0.0",
"private": "true",
"type": "module",
"devDependencies": {
"webpack": "5.70.0"
},
"scripts": {
"test": "node ./index.js"
}
}
+489
View File
@@ -0,0 +1,489 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@types/eslint-scope@^3.7.3":
version "3.7.3"
resolved "https://registry.yarnpkg.com/@types/eslint-scope/-/eslint-scope-3.7.3.tgz#125b88504b61e3c8bc6f870882003253005c3224"
integrity sha512-PB3ldyrcnAicT35TWPs5IcwKD8S333HMaa2VVv4+wdvebJkjWuW/xESoB8IwRcog8HYVYamb1g/R31Qv5Bx03g==
dependencies:
"@types/eslint" "*"
"@types/estree" "*"
"@types/eslint@*":
version "8.4.1"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-8.4.1.tgz#c48251553e8759db9e656de3efc846954ac32304"
integrity sha512-GE44+DNEyxxh2Kc6ro/VkIj+9ma0pO0bwv9+uHSyBrikYOHr8zYcdPvnBOp1aw8s+CjRvuSx7CyWqRrNFQ59mA==
dependencies:
"@types/estree" "*"
"@types/json-schema" "*"
"@types/estree@*", "@types/estree@^0.0.51":
version "0.0.51"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.51.tgz#cfd70924a25a3fd32b218e5e420e6897e1ac4f40"
integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ==
"@types/json-schema@*", "@types/json-schema@^7.0.8":
version "7.0.10"
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.10.tgz#9b05b7896166cd00e9cbd59864853abf65d9ac23"
integrity sha512-BLO9bBq59vW3fxCpD4o0N4U+DXsvwvIcl+jofw0frQo/GrBFC+/jRZj1E7kgp6dvTyNmA4y6JCV5Id/r3mNP5A==
"@types/node@*":
version "17.0.21"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
"@webassemblyjs/ast@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==
dependencies:
"@webassemblyjs/helper-numbers" "1.11.1"
"@webassemblyjs/helper-wasm-bytecode" "1.11.1"
"@webassemblyjs/floating-point-hex-parser@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz#f6c61a705f0fd7a6aecaa4e8198f23d9dc179e4f"
integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==
"@webassemblyjs/helper-api-error@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz#1a63192d8788e5c012800ba6a7a46c705288fd16"
integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==
"@webassemblyjs/helper-buffer@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz#832a900eb444884cde9a7cad467f81500f5e5ab5"
integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==
"@webassemblyjs/helper-numbers@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz#64d81da219fbbba1e3bd1bfc74f6e8c4e10a62ae"
integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==
dependencies:
"@webassemblyjs/floating-point-hex-parser" "1.11.1"
"@webassemblyjs/helper-api-error" "1.11.1"
"@xtuc/long" "4.2.2"
"@webassemblyjs/helper-wasm-bytecode@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz#f328241e41e7b199d0b20c18e88429c4433295e1"
integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==
"@webassemblyjs/helper-wasm-section@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz#21ee065a7b635f319e738f0dd73bfbda281c097a"
integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/helper-buffer" "1.11.1"
"@webassemblyjs/helper-wasm-bytecode" "1.11.1"
"@webassemblyjs/wasm-gen" "1.11.1"
"@webassemblyjs/ieee754@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz#963929e9bbd05709e7e12243a099180812992614"
integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==
dependencies:
"@xtuc/ieee754" "^1.2.0"
"@webassemblyjs/leb128@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/leb128/-/leb128-1.11.1.tgz#ce814b45574e93d76bae1fb2644ab9cdd9527aa5"
integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==
dependencies:
"@xtuc/long" "4.2.2"
"@webassemblyjs/utf8@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/utf8/-/utf8-1.11.1.tgz#d1f8b764369e7c6e6bae350e854dec9a59f0a3ff"
integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==
"@webassemblyjs/wasm-edit@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz#ad206ebf4bf95a058ce9880a8c092c5dec8193d6"
integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/helper-buffer" "1.11.1"
"@webassemblyjs/helper-wasm-bytecode" "1.11.1"
"@webassemblyjs/helper-wasm-section" "1.11.1"
"@webassemblyjs/wasm-gen" "1.11.1"
"@webassemblyjs/wasm-opt" "1.11.1"
"@webassemblyjs/wasm-parser" "1.11.1"
"@webassemblyjs/wast-printer" "1.11.1"
"@webassemblyjs/wasm-gen@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz#86c5ea304849759b7d88c47a32f4f039ae3c8f76"
integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/helper-wasm-bytecode" "1.11.1"
"@webassemblyjs/ieee754" "1.11.1"
"@webassemblyjs/leb128" "1.11.1"
"@webassemblyjs/utf8" "1.11.1"
"@webassemblyjs/wasm-opt@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz#657b4c2202f4cf3b345f8a4c6461c8c2418985f2"
integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/helper-buffer" "1.11.1"
"@webassemblyjs/wasm-gen" "1.11.1"
"@webassemblyjs/wasm-parser" "1.11.1"
"@webassemblyjs/wasm-parser@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz#86ca734534f417e9bd3c67c7a1c75d8be41fb199"
integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/helper-api-error" "1.11.1"
"@webassemblyjs/helper-wasm-bytecode" "1.11.1"
"@webassemblyjs/ieee754" "1.11.1"
"@webassemblyjs/leb128" "1.11.1"
"@webassemblyjs/utf8" "1.11.1"
"@webassemblyjs/wast-printer@1.11.1":
version "1.11.1"
resolved "https://registry.yarnpkg.com/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz#d0c73beda8eec5426f10ae8ef55cee5e7084c2f0"
integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==
dependencies:
"@webassemblyjs/ast" "1.11.1"
"@xtuc/long" "4.2.2"
"@xtuc/ieee754@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790"
integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==
"@xtuc/long@4.2.2":
version "4.2.2"
resolved "https://registry.yarnpkg.com/@xtuc/long/-/long-4.2.2.tgz#d291c6a4e97989b5c61d9acf396ae4fe133a718d"
integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==
acorn-import-assertions@^1.7.6:
version "1.8.0"
resolved "https://registry.yarnpkg.com/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz#ba2b5939ce62c238db6d93d81c9b111b29b855e9"
integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==
acorn@^8.4.1, acorn@^8.5.0:
version "8.7.0"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf"
integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==
ajv-keywords@^3.5.2:
version "3.5.2"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
ajv@^6.12.5:
version "6.12.6"
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
dependencies:
fast-deep-equal "^3.1.1"
fast-json-stable-stringify "^2.0.0"
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
browserslist@^4.14.5:
version "4.20.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88"
integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==
dependencies:
caniuse-lite "^1.0.30001317"
electron-to-chromium "^1.4.84"
escalade "^3.1.1"
node-releases "^2.0.2"
picocolors "^1.0.0"
buffer-from@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
caniuse-lite@^1.0.30001317:
version "1.0.30001317"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz#0548fb28fd5bc259a70b8c1ffdbe598037666a1b"
integrity sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ==
chrome-trace-event@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz#1015eced4741e15d06664a957dbbf50d041e26ac"
integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==
commander@^2.20.0:
version "2.20.3"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==
electron-to-chromium@^1.4.84:
version "1.4.86"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.86.tgz#90fe4a9787f48d6522957213408e08a8126b2ebc"
integrity sha512-EVTZ+igi8x63pK4bPuA95PXIs2b2Cowi3WQwI9f9qManLiZJOD1Lash1J3W4TvvcUCcIR4o/rgi9o8UicXSO+w==
enhanced-resolve@^5.9.2:
version "5.9.2"
resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz#0224dcd6a43389ebfb2d55efee517e5466772dd9"
integrity sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA==
dependencies:
graceful-fs "^4.2.4"
tapable "^2.2.0"
es-module-lexer@^0.9.0:
version "0.9.3"
resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19"
integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ==
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
eslint-scope@5.1.1:
version "5.1.1"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
dependencies:
esrecurse "^4.3.0"
estraverse "^4.1.1"
esrecurse@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.3.0.tgz#7ad7964d679abb28bee72cec63758b1c5d2c9921"
integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==
dependencies:
estraverse "^5.2.0"
estraverse@^4.1.1:
version "4.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d"
integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==
estraverse@^5.2.0:
version "5.3.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.3.0.tgz#2eea5290702f26ab8fe5370370ff86c965d21123"
integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==
events@^3.2.0:
version "3.3.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400"
integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==
fast-deep-equal@^3.1.1:
version "3.1.3"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==
fast-json-stable-stringify@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633"
integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==
glob-to-regexp@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e"
integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==
graceful-fs@^4.1.2, graceful-fs@^4.2.4, graceful-fs@^4.2.9:
version "4.2.9"
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96"
integrity sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==
has-flag@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b"
integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==
jest-worker@^27.4.5:
version "27.5.1"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.5.1.tgz#8d146f0900e8973b106b6f73cc1e9a8cb86f8db0"
integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==
dependencies:
"@types/node" "*"
merge-stream "^2.0.0"
supports-color "^8.0.0"
json-parse-better-errors@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==
json-schema-traverse@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==
loader-runner@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384"
integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==
merge-stream@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60"
integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==
mime-db@1.52.0:
version "1.52.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70"
integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==
mime-types@^2.1.27:
version "2.1.35"
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a"
integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==
dependencies:
mime-db "1.52.0"
neo-async@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==
node-releases@^2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01"
integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg==
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
punycode@^2.1.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
randombytes@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a"
integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==
dependencies:
safe-buffer "^5.1.0"
safe-buffer@^5.1.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
schema-utils@^3.1.0, schema-utils@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281"
integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==
dependencies:
"@types/json-schema" "^7.0.8"
ajv "^6.12.5"
ajv-keywords "^3.5.2"
serialize-javascript@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8"
integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==
dependencies:
randombytes "^2.1.0"
source-map-support@~0.5.20:
version "0.5.21"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.21.tgz#04fe7c7f9e1ed2d662233c28cb2b35b9f63f6e4f"
integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==
dependencies:
buffer-from "^1.0.0"
source-map "^0.6.0"
source-map@^0.6.0, source-map@^0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==
source-map@~0.7.2:
version "0.7.3"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.7.3.tgz#5302f8169031735226544092e64981f751750383"
integrity sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==
supports-color@^8.0.0:
version "8.1.1"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c"
integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==
dependencies:
has-flag "^4.0.0"
tapable@^2.1.1, tapable@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0"
integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==
terser-webpack-plugin@^5.1.3:
version "5.3.1"
resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.3.1.tgz#0320dcc270ad5372c1e8993fabbd927929773e54"
integrity sha512-GvlZdT6wPQKbDNW/GDQzZFg/j4vKU96yl2q6mcUkzKOgW4gwf1Z8cZToUCrz31XHlPWH8MVb1r2tFtdDtTGJ7g==
dependencies:
jest-worker "^27.4.5"
schema-utils "^3.1.1"
serialize-javascript "^6.0.0"
source-map "^0.6.1"
terser "^5.7.2"
terser@^5.7.2:
version "5.12.1"
resolved "https://registry.yarnpkg.com/terser/-/terser-5.12.1.tgz#4cf2ebed1f5bceef5c83b9f60104ac4a78b49e9c"
integrity sha512-NXbs+7nisos5E+yXwAD+y7zrcTkMqb0dEJxIGtSKPdCBzopf7ni4odPul2aechpV7EXNvOudYOX2bb5tln1jbQ==
dependencies:
acorn "^8.5.0"
commander "^2.20.0"
source-map "~0.7.2"
source-map-support "~0.5.20"
uri-js@^4.2.2:
version "4.4.1"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e"
integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==
dependencies:
punycode "^2.1.0"
watchpack@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-2.3.1.tgz#4200d9447b401156eeca7767ee610f8809bc9d25"
integrity sha512-x0t0JuydIo8qCNctdDrn1OzH/qDzk2+rdCOC3YzumZ42fiMqmQ7T3xQurykYMhYfHaPHTp4ZxAx2NfUo1K6QaA==
dependencies:
glob-to-regexp "^0.4.1"
graceful-fs "^4.1.2"
webpack-sources@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde"
integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==
webpack@5.70.0:
version "5.70.0"
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.70.0.tgz#3461e6287a72b5e6e2f4872700bc8de0d7500e6d"
integrity sha512-ZMWWy8CeuTTjCxbeaQI21xSswseF2oNOwc70QSKNePvmxE7XW36i7vpBMYZFAUHPwQiEbNGCEYIOOlyRbdGmxw==
dependencies:
"@types/eslint-scope" "^3.7.3"
"@types/estree" "^0.0.51"
"@webassemblyjs/ast" "1.11.1"
"@webassemblyjs/wasm-edit" "1.11.1"
"@webassemblyjs/wasm-parser" "1.11.1"
acorn "^8.4.1"
acorn-import-assertions "^1.7.6"
browserslist "^4.14.5"
chrome-trace-event "^1.0.2"
enhanced-resolve "^5.9.2"
es-module-lexer "^0.9.0"
eslint-scope "5.1.1"
events "^3.2.0"
glob-to-regexp "^0.4.1"
graceful-fs "^4.2.9"
json-parse-better-errors "^1.0.2"
loader-runner "^4.2.0"
mime-types "^2.1.27"
neo-async "^2.6.2"
schema-utils "^3.1.0"
tapable "^2.1.1"
terser-webpack-plugin "^5.1.3"
watchpack "^2.3.1"
webpack-sources "^3.2.3"
+13
View File
@@ -80,6 +80,19 @@ function optionToSchema(option) {
}
if (option.array) {
schema = wrapWithArraySchema(schema);
// #10274
if (option.name === "pluginSearchDirs") {
schema = {
oneOf: [
schema,
{
enum: [false],
description: "Disable plugin autoloading.",
},
],
};
}
}
return {
description: option.description,
+2 -1
View File
@@ -1,5 +1,6 @@
import stringify from "fast-json-stable-stringify";
import prettier from "../index.js";
import { printToScreen } from "./utils.js";
async function logFileInfoOrDie(context) {
const {
@@ -19,7 +20,7 @@ async function logFileInfoOrDie(context) {
resolveConfig: config !== false,
});
context.logger.log(prettier.format(stringify(fileInfo), { parser: "json" }));
printToScreen(prettier.format(stringify(fileInfo), { parser: "json" }));
}
export default logFileInfoOrDie;
+2 -1
View File
@@ -1,11 +1,12 @@
import path from "node:path";
import prettier from "../index.js";
import { printToScreen } from "./utils.js";
async function logResolvedConfigPathOrDie(context) {
const file = context.argv.findConfigPath;
const configFile = await prettier.resolveConfigFile(file);
if (configFile) {
context.logger.log(path.relative(process.cwd(), configFile));
printToScreen(path.relative(process.cwd(), configFile));
} else {
throw new Error(`Can not find configure file for "${file}"`);
}
+5 -4
View File
@@ -8,6 +8,7 @@ import { formatStdin, formatFiles } from "./format.js";
import logFileInfoOrDie from "./file-info.js";
import logResolvedConfigPathOrDie from "./find-config-path.js";
import prettierInternal from "./prettier-internal.js";
import { printToScreen } from "./utils.js";
const {
utils: { isNonEmptyArray },
@@ -68,12 +69,12 @@ async function main(rawArguments, logger) {
}
if (context.argv.version) {
logger.log(prettier.version);
printToScreen(prettier.version);
return;
}
if (context.argv.help !== undefined) {
logger.log(
printToScreen(
typeof context.argv.help === "string" && context.argv.help !== ""
? createDetailedUsage(context, context.argv.help)
: createUsage(context)
@@ -82,7 +83,7 @@ async function main(rawArguments, logger) {
}
if (context.argv.supportInfo) {
logger.log(
printToScreen(
prettier.format(stringify(prettier.getSupportInfo()), {
parser: "json",
})
@@ -103,8 +104,8 @@ async function main(rawArguments, logger) {
} else if (hasFilePatterns) {
await formatFiles(context);
} else {
logger.log(createUsage(context));
process.exitCode = 1;
printToScreen(createUsage(context));
}
}
+6
View File
@@ -0,0 +1,6 @@
"use strict";
// eslint-disable-next-line no-console
const printToScreen = console.log.bind(console);
module.exports = { printToScreen };
+3 -1
View File
@@ -441,7 +441,9 @@ function isCallExpressionWithComplexTypeArguments(node, print) {
firstArg.type === "TSUnionType" ||
firstArg.type === "UnionTypeAnnotation" ||
firstArg.type === "TSIntersectionType" ||
firstArg.type === "IntersectionTypeAnnotation"
firstArg.type === "IntersectionTypeAnnotation" ||
firstArg.type === "TSTypeLiteral" ||
firstArg.type === "ObjectTypeAnnotation"
) {
return true;
}
+16 -11
View File
@@ -49,17 +49,22 @@ function resolveParser(opts, parsers = getParsers(opts)) {
);
}
try {
return {
parse: require(path.resolve(process.cwd(), opts.parser)),
astFormat: "estree",
locStart,
locEnd,
};
} catch {
/* istanbul ignore next */
throw new ConfigError(`Couldn't resolve parser "${opts.parser}"`);
}
// This line of code will be removed when bundling `standalone.js`
return requireParser(opts.parser);
}
}
function requireParser(parser) {
try {
return {
parse: require(path.resolve(process.cwd(), parser)),
astFormat: "estree",
locStart,
locEnd,
};
} catch {
/* istanbul ignore next */
throw new ConfigError(`Couldn't resolve parser "${parser}"`);
}
}
@@ -110,3 +110,52 @@ const map: Map<Function, Foo<S>> = new Map();
================================================================================
`;
exports[`issue-12413.js format 1`] = `
====================================options=====================================
parsers: ["babel-flow", "flow"]
printWidth: 80
| printWidth
=====================================input======================================
let emit =
defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>();
let abc =
func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>();
=====================================output=====================================
let emit = defineEmits<{
(event: "ready", canvas: HTMLCanvasElement): void,
(event: "resize", canvas: HTMLCanvasElement): void,
}>();
let abc = func<{
a: 2,
b: 3,
d: 78,
e: 9,
f: 8,
g: 7,
h: 6,
i: 5,
j: 4,
k: 3,
l: 2,
m: 1,
n: 0,
o: 9,
p: 8,
q: 7,
r: 6,
s: 5,
t: 4,
u: 3,
v: 2,
w: 1,
x: 0,
y: 9,
z: 8,
}>();
================================================================================
`;
@@ -0,0 +1,5 @@
let emit =
defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>();
let abc =
func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>();
@@ -15,7 +15,7 @@ exports[`snippet: #0 [acorn] format 2`] = `
`;
exports[`snippet: #0 [babel] format 1`] = `
"'await' is not allowed in async function parameters. (2:20)
"'await' is only allowed within async functions and at the top levels of modules. (2:20)
1 | async function foo() {
> 2 | function bar(x = await 2) {}
| ^
@@ -8,7 +8,7 @@ exports[`invalid-const.js [acorn] format 1`] = `
`;
exports[`invalid-const.js [babel] format 1`] = `
"'Const declarations' require an initialization value. (1:10)
"Missing initializer in const declaration. (1:10)
> 1 | const foo;
| ^
2 |"
@@ -443,6 +443,55 @@ const map: Map<Function, Foo<S>> = new Map();
================================================================================
`;
exports[`issue-12413.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
let emit =
defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>();
let abc =
func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>();
=====================================output=====================================
let emit = defineEmits<{
(event: "ready", canvas: HTMLCanvasElement): void;
(event: "resize", canvas: HTMLCanvasElement): void;
}>();
let abc = func<{
a: 2;
b: 3;
d: 78;
e: 9;
f: 8;
g: 7;
h: 6;
i: 5;
j: 4;
k: 3;
l: 2;
m: 1;
n: 0;
o: 9;
p: 8;
q: 7;
r: 6;
s: 5;
t: 4;
u: 3;
v: 2;
w: 1;
x: 0;
y: 9;
z: 8;
}>();
================================================================================
`;
exports[`lone-arg.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
@@ -0,0 +1,5 @@
let emit =
defineEmits<{ (event: "ready", canvas: HTMLCanvasElement): void; (event:"resize",canvas:HTMLCanvasElement):void; }>();
let abc =
func<{a:2,b:3,d:78,e:9,f:8,g:7,h:6,i:5,j:4,k:3,l:2,m:1,n:0,o:9,p:8,q:7,r:6,s:5,t:4,u:3,v:2,w:1,x:0,y:9,z:8}>();
@@ -53,9 +53,9 @@ for (var of of) {
`;
exports[`parserForInStatement2.ts [babel-ts] format 1`] = `
"Missing semicolon. (1:12)
"Unexpected keyword 'in'. (1:10)
> 1 | for (var in X) {
| ^
| ^
2 | }
3 |"
`;
@@ -11,7 +11,7 @@ abstract
class X {}
const
abstract
abstract = 1;
class Y {}
export let
@@ -26,7 +26,7 @@ export class Y {}
var abstract;
class X {}
const abstract;
const abstract = 1;
class Y {}
export let abstract;
@@ -3,7 +3,7 @@ abstract
class X {}
const
abstract
abstract = 1;
class Y {}
export let
@@ -26,7 +26,7 @@ class MyComponent {
ngModel!: ng.INgModelController;
}
const x!: string
const x!: string = '';
var y!: MyComponent
@@ -35,7 +35,7 @@ class MyComponent {
ngModel!: ng.INgModelController;
}
const x!: string;
const x!: string = "";
var y!: MyComponent;
@@ -57,9 +57,9 @@ class Foo {
}
let a! = x
const b!
const b! = x
var c/* */! = x
export const d!
export const d! = x
=====================================output=====================================
class Foo {
@@ -71,9 +71,9 @@ class Foo {
}
let a! = x;
const b!;
const b! = x;
var c! /* */ = x;
export const d!;
export const d! = x;
================================================================================
`;
+1 -1
View File
@@ -2,6 +2,6 @@ class MyComponent {
ngModel!: ng.INgModelController;
}
const x!: string
const x!: string = '';
var y!: MyComponent
@@ -7,6 +7,6 @@ class Foo {
}
let a! = x
const b!
const b! = x
var c/* */! = x
export const d!
export const d! = x
@@ -281,10 +281,20 @@ This option cannot be used with --range-start and --range-end.",
"description": "Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.",
"items": Object {
"type": "string",
},
"type": "array",
"oneOf": Array [
Object {
"items": Object {
"type": "string",
},
"type": "array",
},
Object {
"description": "Disable plugin autoloading.",
"enum": Array [
false,
],
},
],
},
"plugins": Object {
"default": Array [],
+79
View File
@@ -35,6 +35,85 @@ describe("Should use default level logger to log `--loglevel` error", () => {
});
});
describe("loglevel should not effect information print", () => {
for (const { argv, runOptions, assertOptions } of [
{
argv: ["--version"],
assertOptions: {
stdout(value) {
expect(value).not.toBe("");
},
},
},
{
argv: ["--help"],
assertOptions: {
stdout(value) {
expect(value.includes("-v, --version")).toBe(true);
},
},
},
{
argv: ["--help", "write"],
assertOptions: {
stdout(value) {
expect(value.startsWith("-w, --write")).toBe(true);
},
},
},
{
argv: ["--support-info"],
assertOptions: {
stdout(value) {
expect(JSON.parse(value)).toBeDefined();
},
},
},
{
argv: ["--find-config-path", "any-file"],
assertOptions: {
stdout: ".prettierrc\n",
},
},
{
argv: ["--file-info", "any-js-file.js"],
assertOptions: {
stdout(value) {
expect(JSON.parse(value)).toEqual({
ignored: false,
inferredParser: "babel",
});
},
},
},
{
argv: [],
runOptions: { isTTY: true },
assertOptions: {
status: "non-zero",
stdout(value) {
expect(value.includes("-v, --version")).toBe(true);
},
},
},
{
argv: ["--parser", "babel"],
runOptions: { input: "foo" },
assertOptions: { stdout: "foo;\n" },
},
]) {
runPrettier("cli/loglevel", ["--loglevel", "silent", ...argv], {
...runOptions,
title: argv.join(" "),
}).test({
stderr: "",
status: 0,
write: [],
...assertOptions,
});
}
});
async function runPrettierWithLogLevel(logLevel, patterns) {
const result = await runPrettier("cli/loglevel", [
"--loglevel",
+3 -1
View File
@@ -180,7 +180,7 @@ function runPrettier(dir, args = [], options = {}) {
function testResult(testOptions) {
for (const name of ["status", "stdout", "stderr", "write"]) {
test(`(${name})`, async () => {
test(`${options.title || ""}(${name})`, async () => {
const result = await runCli();
const value =
// \r is trimmed from jest snapshots by default;
@@ -194,6 +194,8 @@ function runPrettier(dir, args = [], options = {}) {
if (name in testOptions) {
if (name === "status" && testOptions[name] === "non-zero") {
expect(value).not.toBe(0);
} else if (typeof testOptions[name] === "function") {
testOptions[name](value);
} else {
expect(value).toEqual(testOptions[name]);
}
+1 -1
View File
@@ -817,7 +817,7 @@ $ prettier . --no-plugin-search
#### Infer parser for `.swcrc` ([#12320](https://github.com/prettier/prettier/pull/12320) by [@sosukesuzuki](https://github.com/sosukesuzuki))
A [`.swcrc`](https://swc.rs/docs/configuration/swcrc) is handled using `json` parser.
Format the [`.swcrc`](https://swc.rs/docs/configuration/swcrc) file as a JSON file.
### Miscellaneous
+20 -20
View File
@@ -283,31 +283,34 @@ const UsersSection = ({ language }) => {
>
<div style={{ display: "flex", marginTop: "22px" }}>
<a
href="https://2020.stateofjs.com/en-US/other-tools/utilities"
className="growOnHover"
href="https://2021.stateofjs.com/en-US/other-tools/utilities"
style={{ marginTop: "15px" }}
>
<img
src="/images/state_of_js_grey.svg"
style={{ height: "100px" }}
style={{ width: "80px" }}
/>
</a>
<div style={{ marginLeft: ".7em", width: "260px" }}>
<p>
Regularly used by more than <strong>70%</strong> of respondents
to State of JS 2020
</p>
<Button href="https://2020.stateofjs.com/en-US/other-tools/utilities">
Go to Survey Results
</Button>
<p>Regularly used by:</p>
<ul style={{ marginBottom: "0" }}>
<li>
<a href="https://2021.stateofjs.com/en-US/other-tools/#utilities">
More than 83% of respondents to State of JS 2021.
</a>
</li>
<li>
<a href="https://2020.stateofjs.com/en-US/other-tools/#utilities">
More than 70% of respondents to State of JS 2020.
</a>
</li>
</ul>
</div>
</div>
<div style={{ display: "flex", marginTop: "22px" }}>
<a
href="https://github.com/prettier/prettier"
className="growOnHover"
>
<img src="/images/github_grey.svg" style={{ height: "100px" }} />
<a href="https://github.com/prettier/prettier">
<img src="/images/github_grey.svg" style={{ width: "80px" }} />
</a>
<div style={{ marginLeft: ".7em", width: "260px" }}>
<p>
@@ -322,11 +325,8 @@ const UsersSection = ({ language }) => {
</div>
<div style={{ display: "flex", marginTop: "22px" }}>
<a
href="https://npmjs.com/package/prettier"
className="growOnHover"
>
<img src="/images/npm_grey.svg" style={{ height: "100px" }} />
<a href="https://npmjs.com/package/prettier">
<img src="/images/npm_grey.svg" style={{ width: "80px" }} />
</a>
<div style={{ marginLeft: ".7em", width: "260px" }}>
<p>
+16 -19
View File
@@ -23,28 +23,25 @@ class Users extends React.Component {
</div>
<blockquote
style={{
display: "flex",
alignItems: "center",
fontSize: "125%",
textAlign: "left",
}}
>
<div className="prose">
Prettier is regularly used by more than <strong>70%</strong>
&nbsp;of the respondents to the “Utilities” section of
the&nbsp;
<a href="https://2020.stateofjs.com/en-US/other-tools/utilities">
State&nbsp;of&nbsp;JS&nbsp;2020
</a>{" "}
survey (14880&nbsp;developers out of 20974).
</div>
<a href="https://2020.stateofjs.com">
<img
title="State of JS 2020"
src="/images/state_of_js.svg"
width="180"
style={{ background: "#222429", borderRadius: 5 }}
/>
</a>
<p>Prettier is regularly used by:</p>
<ul>
<li>
<a href="https://2021.stateofjs.com/en-US/other-tools/#utilities">
More than <strong>83%</strong> of respondents to State of
JS 2021 (10282 developers out of 12360).
</a>
</li>
<li>
<a href="https://2020.stateofjs.com/en-US/other-tools/#utilities">
More than <strong>70%</strong> of respondents to State of
JS 2020 (14880 developers out of 20974).
</a>
</li>
</ul>
</blockquote>
<div className="logos">{showcase}</div>
<div className="prose">
-1
View File
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 344 334"><path stroke="#5c6069" stroke-width="1.614" d="M172 246.096h79.097v79.097H172z"/><path fill="#FE6A6A" d="M209.85 293.078h-10.14l4.416-3.574c2.935-2.353 5.172-4.533 5.172-7.845 0-3.487-2.469-6.015-6.799-6.015-4.213 0-6.421 2.383-7.293 5.056l3.313 1.25c.494-1.686 1.54-3.022 3.661-3.022 1.917 0 3.08 1.046 3.08 2.963v.291c0 1.714-1.046 3.138-3.197 4.998l-6.508 5.549v3.545h14.295v-3.196zm10.159 3.545c5.288 0 7.67-3.865 7.67-10.489 0-6.625-2.382-10.49-7.67-10.49-5.289 0-7.671 3.865-7.671 10.49 0 6.624 2.382 10.489 7.671 10.489zm0-3.051c-2.79 0-3.807-2.15-3.807-5.637v-3.603c0-3.487 1.017-5.637 3.807-5.637 2.789 0 3.806 2.15 3.806 5.637v3.603c0 3.487-1.017 5.637-3.806 5.637zm0-5.724c1.336 0 1.801-.61 1.801-1.395v-.639c0-.785-.465-1.395-1.801-1.395-1.337 0-1.802.61-1.802 1.395v.639c0 .785.465 1.395 1.802 1.395z"/><path fill="#e0e4e4" d="M180.295 254.77v5.433h1.816c.233-.436.712-1.046 1.787-1.046 1.279 0 2.136.872 2.136 2.339 0 1.569-.886 2.557-2.426 2.557-1.555 0-2.514-.915-2.514-2.484v-.218h-1.176v.261c0 2.15 1.496 3.53 3.69 3.53 2.193 0 3.632-1.554 3.632-3.646 0-2.063-1.351-3.4-3.109-3.4-1.438 0-2.107.654-2.485 1.351h-.174v-3.588h5.492v-1.089h-6.669z"/><path stroke="#5c6069" stroke-width="1.614" d="M251.096 167h79.097v79.097h-79.097z"/><path fill="#FE6A6A" d="M288.85 214.078h-10.14l4.416-3.574c2.935-2.353 5.172-4.533 5.172-7.845 0-3.487-2.469-6.015-6.799-6.015-4.213 0-6.421 2.383-7.293 5.056l3.313 1.25c.494-1.686 1.54-3.022 3.661-3.022 1.917 0 3.08 1.046 3.08 2.963v.291c0 1.714-1.046 3.138-3.197 4.998l-6.508 5.549v3.545h14.295v-3.196zm10.159 3.545c5.288 0 7.67-3.865 7.67-10.489 0-6.625-2.382-10.49-7.67-10.49-5.289 0-7.671 3.865-7.671 10.49 0 6.624 2.382 10.489 7.671 10.489zm0-3.051c-2.79 0-3.807-2.15-3.807-5.637v-3.603c0-3.487 1.017-5.637 3.807-5.637 2.789 0 3.806 2.15 3.806 5.637v3.603c0 3.487-1.017 5.637-3.806 5.637zm0-5.724c1.336 0 1.801-.61 1.801-1.395v-.639c0-.785-.465-1.395-1.801-1.395-1.337 0-1.802.61-1.802 1.395v.639c0 .785.465 1.395 1.802 1.395z"/><path fill="#e0e4e4" d="M266.322 182.53c0-2.092-1.497-3.472-3.255-3.472-1.481 0-2.193.726-2.557 1.337h-.174v-1.453c0-1.438.915-2.383 2.455-2.383 1.511 0 2.223.814 2.223 2.049h1.191c0-1.831-1.278-3.138-3.414-3.138-2.179 0-3.646 1.438-3.646 3.53v3.545c0 2.106 1.554 3.501 3.574 3.501 2.048 0 3.603-1.424 3.603-3.516zm-3.603-2.44c1.438 0 2.411.987 2.411 2.44 0 1.453-.973 2.426-2.411 2.426-1.409 0-2.383-.973-2.383-2.426 0-1.453.974-2.44 2.383-2.44z"/><path stroke="#5c6069" stroke-width="1.614" d="M172 8.807h79.097v79.097H172z"/><path fill="#e0e4e4" d="M210.955 58.985l-5.724-20.281h-5.289l-5.695 20.28h3.836l1.394-5.142h6.015l1.424 5.143h4.039zm-6.102-8.252h-4.707l2.237-8.281h.233l2.237 8.28zm21.809 8.252V56.05h-6.101v-9.123h6.101v-2.935h-6.101v-5.288h-3.458v3.632c0 1.25-.465 1.656-1.656 1.656h-2.964v2.935h4.359v7.99c0 2.383 1.336 4.068 4.184 4.068h5.636zm-46.686-38.25v.377h1.191v-.305c0-1.569.944-2.44 2.484-2.44 1.308 0 2.267.784 2.267 2.135 0 1.467-1.046 2.107-2.775 2.615-1.932.567-3.182 1.337-3.182 3.356v1.177h7.09v-1.09h-5.884v-.232c0-1.395.872-1.758 2.499-2.252 1.99-.61 3.443-1.482 3.443-3.53 0-1.962-1.438-3.27-3.458-3.27-2.15 0-3.675 1.323-3.675 3.459z"/><path stroke="#5c6069" stroke-width="1.614" d="M251.096 87.903h79.097V167h-79.097z"/><path fill="#e0e4e4" d="M296.402 138.081v-3.138h-9.007v-5.579h8.688v-3.138h-8.688v-5.288h9.007V117.8h-12.813v20.281h12.813zm-37.214-41.504v1.104h5.274l-3.167 2.789v1.119h1.453c1.235 0 2.252.726 2.252 2.063 0 1.264-.93 2.208-2.368 2.208-1.555 0-2.543-.857-2.543-2.383v-.581h-1.191v.625c0 2.107 1.54 3.429 3.748 3.429 1.976 0 3.545-1.337 3.545-3.269 0-1.874-1.322-3.037-3.007-3.037h-.364v-.159l3.269-2.848v-1.06h-6.901z"/><path stroke="#5c6069" stroke-width="1.614" d="M92.903 8.807H172v79.097H92.903z"/><path fill="#e0e4e4" d="M123.258 59.333c4.91 0 7.554-2.644 7.554-6.42 0-3.023-1.714-5.028-5.201-5.667l-2.121-.378c-2.237-.377-3.08-1.133-3.08-2.673 0-1.801 1.133-2.73 3.312-2.73 2.034 0 3.545.813 4.62 2.091l2.238-2.383c-1.395-1.743-3.719-2.818-6.887-2.818-4.416 0-7.118 2.15-7.118 6.015 0 2.818 1.453 5.085 5.201 5.724l2.15.348c2.208.349 3.051 1.133 3.051 2.732 0 1.946-1.279 3.05-3.603 3.05-2.005 0-3.777-.813-5.288-2.556l-2.296 2.382c1.54 1.976 4.01 3.283 7.468 3.283zm24.308-.348V56.05h-6.102v-9.123h6.102v-2.935h-6.102v-5.288h-3.457v3.632c0 1.25-.465 1.656-1.657 1.656h-2.963v2.935h4.358v7.99c0 2.383 1.337 4.068 4.184 4.068h5.637zM103.16 17.48l-2.905 4.388h1.351l2.063-3.226h.174v9.008h1.191l.015-10.17h-1.889z"/><path stroke="#5c6069" stroke-width="1.614" d="M92.807 246V87.807H251V246H92.807z"/><path fill="#e0e4e4" d="M132.501 216.607l12.23-7.401c2.359 4.183 4.506 7.723 9.654 7.723 4.934 0 8.046-1.931 8.046-9.439v-51.062h15.017v51.274c0 15.555-9.117 22.635-22.42 22.635-12.013 0-18.987-6.222-22.527-13.731m53.105-1.608l12.228-7.08c3.219 5.257 7.402 9.119 14.804 9.119 6.222 0 10.19-3.111 10.19-7.403 0-5.149-4.076-6.972-10.941-9.975l-3.754-1.61c-10.835-4.612-18.023-10.405-Line truncated

Before

Width:  |  Height:  |  Size: 5.9 KiB

+1 -1
View File
@@ -1 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 344 334"><path stroke="#6f7b81" stroke-width="1.614" d="M172 246.096h79.097v79.097H172z"/><path fill="#6f7b81" d="M209.85 293.078h-10.14l4.416-3.574c2.935-2.353 5.172-4.533 5.172-7.845 0-3.487-2.469-6.015-6.799-6.015-4.213 0-6.421 2.383-7.293 5.056l3.313 1.25c.494-1.686 1.54-3.022 3.661-3.022 1.917 0 3.08 1.046 3.08 2.963v.291c0 1.714-1.046 3.138-3.197 4.998l-6.508 5.549v3.545h14.295v-3.196zm10.159 3.545c5.288 0 7.67-3.865 7.67-10.489 0-6.625-2.382-10.49-7.67-10.49-5.289 0-7.671 3.865-7.671 10.49 0 6.624 2.382 10.489 7.671 10.489zm0-3.051c-2.79 0-3.807-2.15-3.807-5.637v-3.603c0-3.487 1.017-5.637 3.807-5.637 2.789 0 3.806 2.15 3.806 5.637v3.603c0 3.487-1.017 5.637-3.806 5.637zm0-5.724c1.336 0 1.801-.61 1.801-1.395v-.639c0-.785-.465-1.395-1.801-1.395-1.337 0-1.802.61-1.802 1.395v.639c0 .785.465 1.395 1.802 1.395zm-39.714-33.078v5.433h1.816c.233-.436.712-1.046 1.787-1.046 1.279 0 2.136.872 2.136 2.339 0 1.569-.886 2.557-2.426 2.557-1.555 0-2.514-.915-2.514-2.484v-.218h-1.176v.261c0 2.15 1.496 3.53 3.69 3.53 2.193 0 3.632-1.554 3.632-3.646 0-2.063-1.351-3.4-3.109-3.4-1.438 0-2.107.654-2.485 1.351h-.174v-3.588h5.492v-1.089h-6.669z"/><path stroke="#6f7b81" stroke-width="1.614" d="M251.096 167h79.097v79.097h-79.097z"/><path fill="#6f7b81" d="M288.85 214.078h-10.14l4.416-3.574c2.935-2.353 5.172-4.533 5.172-7.845 0-3.487-2.469-6.015-6.799-6.015-4.213 0-6.421 2.383-7.293 5.056l3.313 1.25c.494-1.686 1.54-3.022 3.661-3.022 1.917 0 3.08 1.046 3.08 2.963v.291c0 1.714-1.046 3.138-3.197 4.998l-6.508 5.549v3.545h14.295v-3.196zm10.159 3.545c5.288 0 7.67-3.865 7.67-10.489 0-6.625-2.382-10.49-7.67-10.49-5.289 0-7.671 3.865-7.671 10.49 0 6.624 2.382 10.489 7.671 10.489zm0-3.051c-2.79 0-3.807-2.15-3.807-5.637v-3.603c0-3.487 1.017-5.637 3.807-5.637 2.789 0 3.806 2.15 3.806 5.637v3.603c0 3.487-1.017 5.637-3.806 5.637zm0-5.724c1.336 0 1.801-.61 1.801-1.395v-.639c0-.785-.465-1.395-1.801-1.395-1.337 0-1.802.61-1.802 1.395v.639c0 .785.465 1.395 1.802 1.395zm-32.687-26.318c0-2.092-1.497-3.472-3.255-3.472-1.481 0-2.193.726-2.557 1.337h-.174v-1.453c0-1.438.915-2.383 2.455-2.383 1.511 0 2.223.814 2.223 2.049h1.191c0-1.831-1.278-3.138-3.414-3.138-2.179 0-3.646 1.438-3.646 3.53v3.545c0 2.106 1.554 3.501 3.574 3.501 2.048 0 3.603-1.424 3.603-3.516zm-3.603-2.44c1.438 0 2.411.987 2.411 2.44 0 1.453-.973 2.426-2.411 2.426-1.409 0-2.383-.973-2.383-2.426 0-1.453.974-2.44 2.383-2.44z"/><path stroke="#6f7b81" stroke-width="1.614" d="M172 8.807h79.097v79.097H172z"/><path fill="#6f7b81" d="M210.955 58.985l-5.724-20.281h-5.289l-5.695 20.28h3.836l1.394-5.142h6.015l1.424 5.143h4.039zm-6.102-8.252h-4.707l2.237-8.281h.233l2.237 8.28zm21.809 8.252V56.05h-6.101v-9.123h6.101v-2.935h-6.101v-5.288h-3.458v3.632c0 1.25-.465 1.656-1.656 1.656h-2.964v2.935h4.359v7.99c0 2.383 1.336 4.068 4.184 4.068h5.636zm-46.686-38.25v.377h1.191v-.305c0-1.569.944-2.44 2.484-2.44 1.308 0 2.267.784 2.267 2.135 0 1.467-1.046 2.107-2.775 2.615-1.932.567-3.182 1.337-3.182 3.356v1.177h7.09v-1.09h-5.884v-.232c0-1.395.872-1.758 2.499-2.252 1.99-.61 3.443-1.482 3.443-3.53 0-1.962-1.438-3.27-3.458-3.27-2.15 0-3.675 1.323-3.675 3.459z"/><path stroke="#6f7b81" stroke-width="1.614" d="M251.096 87.903h79.097V167h-79.097z"/><path fill="#6f7b81" d="M296.402 138.081v-3.138h-9.007v-5.579h8.688v-3.138h-8.688v-5.288h9.007V117.8h-12.813v20.281h12.813zm-37.214-41.504v1.104h5.274l-3.167 2.789v1.119h1.453c1.235 0 2.252.726 2.252 2.063 0 1.264-.93 2.208-2.368 2.208-1.555 0-2.543-.857-2.543-2.383v-.581h-1.191v.625c0 2.107 1.54 3.429 3.748 3.429 1.976 0 3.545-1.337 3.545-3.269 0-1.874-1.322-3.037-3.007-3.037h-.364v-.159l3.269-2.848v-1.06h-6.901z"/><path stroke="#6f7b81" stroke-width="1.614" d="M92.903 8.807H172v79.097H92.903z"/><path fill="#6f7b81" d="M123.258 59.333c4.91 0 7.554-2.644 7.554-6.42 0-3.023-1.714-5.028-5.201-5.667l-2.121-.378c-2.237-.377-3.08-1.133-3.08-2.673 0-1.801 1.133-2.73 3.312-2.73 2.034 0 3.545.813 4.62 2.091l2.238-2.383c-1.395-1.743-3.719-2.818-6.887-2.818-4.416 0-7.118 2.15-7.118 6.015 0 2.818 1.453 5.085 5.201 5.724l2.15.348c2.208.349 3.051 1.133 3.051 2.732 0 1.946-1.279 3.05-3.603 3.05-2.005 0-3.777-.813-5.288-2.556l-2.296 2.382c1.54 1.976 4.01 3.283 7.468 3.283zm24.308-.348V56.05h-6.102v-9.123h6.102v-2.935h-6.102v-5.288h-3.457v3.632c0 1.25-.465 1.656-1.657 1.656h-2.963v2.935h4.358v7.99c0 2.383 1.337 4.068 4.184 4.068h5.637zM103.16 17.48l-2.905 4.388h1.351l2.063-3.226h.174v9.008h1.191l.015-10.17h-1.889z"/><path stroke="#6f7b81" stroke-width="1.614" d="M92.807 246V87.807H251V246H92.807z"/><path fill="#6f7b81" d="M132.501 216.607l12.23-7.401c2.359 4.183 4.506 7.723 9.654 7.723 4.934 0 8.046-1.931 8.046-9.439v-51.062h15.017v51.274c0 15.555-9.117 22.635-22.42 22.635-12.013 0-18.987-6.222-22.527-13.731m53.105-1.608l12.228-7.08c3.219 5.257 7.402 9.119 14.804 9.119 6.222 0 10.19-3.111 10.19-7.403 0-5.149-4.076-6.972-10.941-9.975l-3.754-1.61c-10.835-4.612-18.023-10.405-18.023-22.634 0-11.263 8.582-19.846 21.992-19.846 9.54Line truncated
<svg xmlns="http://www.w3.org/2000/svg" fill="rgb(111,123,129)" viewBox="0 0 1143 370" class="SidebarLogo__SVG-sc-134wwb4-1 jirPnA"><g><path d="M78.845 54.401l5.548-20.694h106.935l-53.619 199.085H13.836a63.63 63.63 0 01-8.455-20.694h116.436l42.472-157.697H78.845zM184.81 332.293a39.517 39.517 0 0023.98-8.146 39.48 39.48 0 0014.103-21.028l38.201-141.6a24.27 24.27 0 0123.395-17.922h67.001l5.547-20.694h-76.782a39.514 39.514 0 00-23.981 8.145 39.49 39.49 0 00-14.103 21.028l-38.2 141.601a24.26 24.26 0 01-8.664 12.918 24.277 24.277 0 01-14.732 5.004H83.519l-5.548 20.694H184.81zm29.731-192.002l-38.2 141.6H91.483L85.13 305.59h95.444a18.254 18.254 0 0011.077-3.763 18.236 18.236 0 006.514-9.712l38.2-141.601a45.502 45.502 0 0116.253-24.233 45.534 45.534 0 0127.636-9.387h78.393L365 93.195h-88.981a63.693 63.693 0 00-38.729 13.128 63.639 63.639 0 00-22.75 33.968zM230.132 4H92.357l-6.353 23.698h113.168l-56.855 211.103H18.133a63.272 63.272 0 0022.074 17.507 63.308 63.308 0 0027.49 6.192h92.815L230.132 4zm54.356 145.606a18.255 18.255 0 00-11.077 3.762 18.235 18.235 0 00-6.514 9.713l-38.2 141.6a45.505 45.505 0 01-16.252 24.233 45.537 45.537 0 01-27.636 9.388H76.36L70.007 362h119.036a63.685 63.685 0 0038.729-13.128 63.639 63.639 0 0022.75-33.968l38.2-141.6h54.803l6.353-23.698h-65.39zM117.21 206.089l39.235-145.678h-79.21l-6.353 23.698h54.602l-26.47 98.282H6.198a63.5 63.5 0 00-1.796 23.698H117.21zM513.306 94.832c0 102.212-110.308 119.416-110.308 223.652V362h160.908v-50.6H458.658c-.506-2.53-.506-5.06-.506-7.59 0-58.19 110.814-99.682 110.814-211.002 0-56.672-28.336-89.056-82.984-89.056-54.648 0-82.984 32.384-82.984 89.056v34.408h52.624v-37.95c0-25.3 11.132-34.914 28.842-34.914s28.842 8.602 28.842 40.48zm141.419-5.566c0-25.3 11.132-34.914 28.842-34.914s28.842 9.614 28.842 34.914v191.268c0 25.3-11.132 34.914-28.842 34.914s-28.842-9.614-28.842-34.914V89.266zm-55.66 187.726c0 56.672 29.854 89.056 84.502 89.056 54.648 0 84.502-32.384 84.502-89.056V92.808c0-56.672-29.854-89.056-84.502-89.056-54.648 0-84.502 32.384-84.502 89.056v184.184zm315.483-182.16c0 102.212-110.308 119.416-110.308 223.652V362h160.908v-50.6H859.9c-.506-2.53-.506-5.06-.506-7.59 0-58.19 110.814-99.682 110.814-211.002 0-56.672-28.336-89.056-82.984-89.056-54.648 0-82.984 32.384-82.984 89.056v34.408h52.624v-37.95c0-25.3 11.132-34.914 28.842-34.914s28.842 8.602 28.842 40.48zm124.722-3.036h43.01V362h55.66V7.8h-37.44c-8.61 23.782-18.22 44.528-61.23 44.528v39.468z"></path></g></svg>

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

+6 -1
View File
@@ -415,12 +415,17 @@ em {
}
.ecosystemSubSection p {
padding-top: 4px !important;
padding-top: 0 !important;
font-size: 0.9em;
color: rgb(176, 196, 206) !important;
line-height: 1.2em !important;
}
.ecosystemSubSection ul,
.ecosystemSubSection ul a {
color: rgb(176, 196, 206) !important;
}
.growOnHover {
transition: transform 0.3s cubic-bezier(0.075, 0.82, 0.165, 1);
}
+78 -85
View File
@@ -45,18 +45,18 @@
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.7.tgz#078d8b833fbbcc95286613be8c716cef2b519fa2"
integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ==
"@babel/core@7.17.7", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
version "7.17.7"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.7.tgz#f7c28228c83cdf2dbd1b9baa06eaf9df07f0c2f9"
integrity sha512-djHlEfFHnSnTAcPb7dATbiM5HxGOP98+3JLBZtjRb5I7RXrw7kFRoG2dXM8cm3H+o11A8IFH/uprmJpwFynRNQ==
"@babel/core@7.17.8", "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0":
version "7.17.8"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a"
integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.16.7"
"@babel/generator" "^7.17.7"
"@babel/helper-compilation-targets" "^7.17.7"
"@babel/helper-module-transforms" "^7.17.7"
"@babel/helpers" "^7.17.7"
"@babel/parser" "^7.17.7"
"@babel/helpers" "^7.17.8"
"@babel/parser" "^7.17.8"
"@babel/template" "^7.16.7"
"@babel/traverse" "^7.17.3"
"@babel/types" "^7.17.0"
@@ -280,10 +280,10 @@
"@babel/traverse" "^7.16.8"
"@babel/types" "^7.16.8"
"@babel/helpers@^7.17.7":
version "7.17.7"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.7.tgz#6fc0a24280fd00026e85424bbfed4650e76d7127"
integrity sha512-TKsj9NkjJfTBxM7Phfy7kv6yYc4ZcOo+AaWGqQOKTPDOmcGkIFb5xNA746eKisQkm4yavUYh4InYM9S+VnO01w==
"@babel/helpers@^7.17.8":
version "7.17.8"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.8.tgz#288450be8c6ac7e4e44df37bcc53d345e07bc106"
integrity sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw==
dependencies:
"@babel/template" "^7.16.7"
"@babel/traverse" "^7.17.3"
@@ -298,15 +298,10 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@7.17.3":
version "7.17.3"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.3.tgz#b07702b982990bf6fdc1da5049a23fece4c5c3d0"
integrity sha512-7yJPvPV+ESz2IUTPbOL+YkIGyCqOyNIzdguKQuJGnH7bg1WTIifuM21YqokFt/THWh1AkCRn9IgoykTRCBVpzA==
"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.7":
version "7.17.7"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.7.tgz#fc19b645a5456c8d6fdb6cecd3c66c0173902800"
integrity sha512-bm3AQf45vR4gKggRfvJdYJ0gFLoCbsPxiFLSH6hTVYABptNHY6l9NrhnucVjQ/X+SPtLANT9lc0fFhikj+VBRA==
"@babel/parser@7.17.8", "@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8":
version "7.17.8"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240"
integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ==
"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7":
version "7.16.7"
@@ -1735,14 +1730,14 @@
dependencies:
"@types/yargs-parser" "*"
"@typescript-eslint/eslint-plugin@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.15.0.tgz#c28ef7f2e688066db0b6a9d95fb74185c114fb9a"
integrity sha512-u6Db5JfF0Esn3tiAKELvoU5TpXVSkOpZ78cEGn/wXtT2RVqs2vkt4ge6N8cRCyw7YVKhmmLDbwI2pg92mlv7cA==
"@typescript-eslint/eslint-plugin@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.16.0.tgz#78f246dd8d1b528fc5bfca99a8a64d4023a3d86d"
integrity sha512-SJoba1edXvQRMmNI505Uo4XmGbxCK9ARQpkvOd00anxzri9RNQk0DDCxD+LIl+jYhkzOJiOMMKYEHnHEODjdCw==
dependencies:
"@typescript-eslint/scope-manager" "5.15.0"
"@typescript-eslint/type-utils" "5.15.0"
"@typescript-eslint/utils" "5.15.0"
"@typescript-eslint/scope-manager" "5.16.0"
"@typescript-eslint/type-utils" "5.16.0"
"@typescript-eslint/utils" "5.16.0"
debug "^4.3.2"
functional-red-black-tree "^1.0.1"
ignore "^5.1.8"
@@ -1750,59 +1745,59 @@
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/scope-manager@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.15.0.tgz#d97afab5e0abf4018d1289bd711be21676cdd0ee"
integrity sha512-EFiZcSKrHh4kWk0pZaa+YNJosvKE50EnmN4IfgjkA3bTHElPtYcd2U37QQkNTqwMCS7LXeDeZzEqnsOH8chjSg==
"@typescript-eslint/scope-manager@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.16.0.tgz#7e7909d64bd0c4d8aef629cdc764b9d3e1d3a69a"
integrity sha512-P+Yab2Hovg8NekLIR/mOElCDPyGgFZKhGoZA901Yax6WR6HVeGLbsqJkZ+Cvk5nts/dAlFKm8PfL43UZnWdpIQ==
dependencies:
"@typescript-eslint/types" "5.15.0"
"@typescript-eslint/visitor-keys" "5.15.0"
"@typescript-eslint/types" "5.16.0"
"@typescript-eslint/visitor-keys" "5.16.0"
"@typescript-eslint/type-utils@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.15.0.tgz#d2c02eb2bdf54d0a645ba3a173ceda78346cf248"
integrity sha512-KGeDoEQ7gHieLydujGEFLyLofipe9PIzfvA/41urz4hv+xVxPEbmMQonKSynZ0Ks2xDhJQ4VYjB3DnRiywvKDA==
"@typescript-eslint/type-utils@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.16.0.tgz#b482bdde1d7d7c0c7080f7f2f67ea9580b9e0692"
integrity sha512-SKygICv54CCRl1Vq5ewwQUJV/8padIWvPgCxlWPGO/OgQLCijY9G7lDu6H+mqfQtbzDNlVjzVWQmeqbLMBLEwQ==
dependencies:
"@typescript-eslint/utils" "5.15.0"
"@typescript-eslint/utils" "5.16.0"
debug "^4.3.2"
tsutils "^3.21.0"
"@typescript-eslint/types@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.15.0.tgz#c7bdd103843b1abae97b5518219d3e2a0d79a501"
integrity sha512-yEiTN4MDy23vvsIksrShjNwQl2vl6kJeG9YkVJXjXZnkJElzVK8nfPsWKYxcsGWG8GhurYXP4/KGj3aZAxbeOA==
"@typescript-eslint/types@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.16.0.tgz#5827b011982950ed350f075eaecb7f47d3c643ee"
integrity sha512-oUorOwLj/3/3p/HFwrp6m/J2VfbLC8gjW5X3awpQJ/bSG+YRGFS4dpsvtQ8T2VNveV+LflQHjlLvB6v0R87z4g==
"@typescript-eslint/typescript-estree@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.15.0.tgz#81513a742a9c657587ad1ddbca88e76c6efb0aac"
integrity sha512-Hb0e3dGc35b75xLzixM3cSbG1sSbrTBQDfIScqdyvrfJZVEi4XWAT+UL/HMxEdrJNB8Yk28SKxPLtAhfCbBInA==
"@typescript-eslint/typescript-estree@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.16.0.tgz#32259459ec62f5feddca66adc695342f30101f61"
integrity sha512-SE4VfbLWUZl9MR+ngLSARptUv2E8brY0luCdgmUevU6arZRY/KxYoLI/3V/yxaURR8tLRN7bmZtJdgmzLHI6pQ==
dependencies:
"@typescript-eslint/types" "5.15.0"
"@typescript-eslint/visitor-keys" "5.15.0"
"@typescript-eslint/types" "5.16.0"
"@typescript-eslint/visitor-keys" "5.16.0"
debug "^4.3.2"
globby "^11.0.4"
is-glob "^4.0.3"
semver "^7.3.5"
tsutils "^3.21.0"
"@typescript-eslint/utils@5.15.0", "@typescript-eslint/utils@^5.10.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.15.0.tgz#468510a0974d3ced8342f37e6c662778c277f136"
integrity sha512-081rWu2IPKOgTOhHUk/QfxuFog8m4wxW43sXNOMSCdh578tGJ1PAaWPsj42LOa7pguh173tNlMigsbrHvh/mtA==
"@typescript-eslint/utils@5.16.0", "@typescript-eslint/utils@^5.10.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.16.0.tgz#42218b459d6d66418a4eb199a382bdc261650679"
integrity sha512-iYej2ER6AwmejLWMWzJIHy3nPJeGDuCqf8Jnb+jAQVoPpmWzwQOfa9hWVB8GIQE5gsCv/rfN4T+AYb/V06WseQ==
dependencies:
"@types/json-schema" "^7.0.9"
"@typescript-eslint/scope-manager" "5.15.0"
"@typescript-eslint/types" "5.15.0"
"@typescript-eslint/typescript-estree" "5.15.0"
"@typescript-eslint/scope-manager" "5.16.0"
"@typescript-eslint/types" "5.16.0"
"@typescript-eslint/typescript-estree" "5.16.0"
eslint-scope "^5.1.1"
eslint-utils "^3.0.0"
"@typescript-eslint/visitor-keys@5.15.0":
version "5.15.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.15.0.tgz#5669739fbf516df060f978be6a6dce75855a8027"
integrity sha512-+vX5FKtgvyHbmIJdxMJ2jKm9z2BIlXJiuewI8dsDYMp5LzPUcuTT78Ya5iwvQg3VqSVdmxyM8Anj1Jeq7733ZQ==
"@typescript-eslint/visitor-keys@5.16.0":
version "5.16.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.16.0.tgz#f27dc3b943e6317264c7492e390c6844cd4efbbb"
integrity sha512-jqxO8msp5vZDhikTwq9ubyMHqZ67UIvawohr4qF3KhlpL7gzSjOd+8471H3nh5LyABkaI85laEKKU8SnGUK5/g==
dependencies:
"@typescript-eslint/types" "5.15.0"
"@typescript-eslint/types" "5.16.0"
eslint-visitor-keys "^3.0.0"
abab@^2.0.3, abab@^2.0.5:
@@ -3061,10 +3056,10 @@ eslint-plugin-import@2.25.4:
resolve "^1.20.0"
tsconfig-paths "^3.12.0"
eslint-plugin-jest@26.1.1:
version "26.1.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.1.tgz#7176dd745ef8bca3070263f62cdf112f2dfc9aa1"
integrity sha512-HRKOuPi5ADhza4ZBK5ufyNXy28bXXkib87w+pQqdvBhSTsamndh6sIAKPAUl8y0/n9jSWBdTPslrwtKWqkp8dA==
eslint-plugin-jest@26.1.2:
version "26.1.2"
resolved "https://registry.yarnpkg.com/eslint-plugin-jest/-/eslint-plugin-jest-26.1.2.tgz#0f1a15c62889fffc3f78a773749d672f1bedb15f"
integrity sha512-1bXCoRODPkGN06n9KAMls4Jm0eyS+0Q/LWcIxhqWR2ycV0Z7lnx2c10idk4dtFIJY5xStgiIr5snC6/rxcXpbw==
dependencies:
"@typescript-eslint/utils" "^5.10.0"
@@ -3093,10 +3088,10 @@ eslint-plugin-react@7.29.4:
semver "^6.3.0"
string.prototype.matchall "^4.0.6"
eslint-plugin-regexp@1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.5.1.tgz#982ea8936283035897d6bb1ba32c0ea5d9a4dee0"
integrity sha512-5v0rQIi54m2KycQHqmOAHrZhvI56GHmI2acr6zEffAqfeifTtobAEapv9Uf4o8//lGvwVkHKyjLoSbBNEFcfOA==
eslint-plugin-regexp@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-regexp/-/eslint-plugin-regexp-1.6.0.tgz#d757e40e53b51b67b84194387495e346774eca86"
integrity sha512-xkaQOzyY4PUukRd8b6zTq+QTtg0dePlCP2dZiM+XGSmvlpDeYiPJHfRDpAfS/sP9YtK6q7DGes1smCyPTD3Lkg==
dependencies:
comment-parser "^1.1.2"
eslint-utils "^3.0.0"
@@ -3107,10 +3102,10 @@ eslint-plugin-regexp@1.5.1:
regexpp "^3.2.0"
scslre "^0.1.6"
eslint-plugin-unicorn@41.0.0:
version "41.0.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.0.tgz#bf0974f8551ab4dd4aaae7d9cf53894040defbbd"
integrity sha512-xoJCaRc1uy5REg9DkVga1BkZV57jJxoqOcrU28QHZB89Lk5LdSqdVyTIt9JQVfHNKaiyJ7X+3iLlIn+VEHWEzA==
eslint-plugin-unicorn@41.0.1:
version "41.0.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-41.0.1.tgz#b49205b38e71e227d21fb5776f8d078a1dc637ca"
integrity sha512-gF5vo2dIj0YdNMQ/IMegiBkQdQ22GBFFVpdkJP+0og3w7XD4ypea0xQVRv6iofkLVR2w0phAdikcnU01ybd4Ow==
dependencies:
"@babel/helper-validator-identifier" "^7.15.7"
ci-info "^3.3.0"
@@ -3434,10 +3429,10 @@ flatten@^1.0.2:
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b"
integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg==
flow-parser@0.173.0:
version "0.173.0"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.173.0.tgz#992539fe87b4448a660ac1c54ffa358301e7110b"
integrity sha512-gikomjo+jzdehhOCHP2Ca5y1HGK3jkODhUdTxk4a3SdyLAMBsEwb7KJETHzB4KQs7HhHcqhyT7mGmd9iT8B5Hg==
flow-parser@0.174.1:
version "0.174.1"
resolved "https://registry.yarnpkg.com/flow-parser/-/flow-parser-0.174.1.tgz#bb81e17fe45a1e64d9752090e819a6744a539fa0"
integrity sha512-nDMOvlFR+4doLpB3OJpseHZ7uEr3ENptlF6qMas/kzQmNcLzMwfQeFX0gGJ/+em7UdldB/nGsk55tDTOvjbCuw==
foreground-child@^2.0.0:
version "2.0.0"
@@ -4710,12 +4705,10 @@ json-stable-stringify-without-jsonify@^1.0.1:
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
json5@2.2.0, json5@^2.1.2:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
dependencies:
minimist "^1.2.5"
json5@2.2.1, json5@^2.1.2:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
json5@^1.0.1:
version "1.0.1"
@@ -4974,10 +4967,10 @@ minimatch@^3.0.4, minimatch@^3.1.2:
dependencies:
brace-expansion "^1.1.7"
minimist@1.2.5, minimist@^1.2.0, minimist@^1.2.5:
version "1.2.5"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
minimist@1.2.6, minimist@^1.2.0:
version "1.2.6"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
mkdirp@1.0.4:
version "1.0.4"