From 509f26549cb9533389dd2754dc18b29cae337412 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Sat, 17 Jul 2021 23:17:23 -0400 Subject: [PATCH] tools: update ESLint to 7.31.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update ESLint to 7.31.0 PR-URL: https://github.com/nodejs/node/pull/39424 Reviewed-By: Luigi Pinca Reviewed-By: Tobias Nießen Reviewed-By: James M Snell --- .../node_modules/@types/mdast/LICENSE | 42 +++---- .../node_modules/@types/mdast/README.md | 10 +- .../node_modules/@types/mdast/package.json | 24 +++- .../node_modules/@types/unist/README.md | 106 +--------------- .../node_modules/@types/unist/package.json | 14 ++- .../node_modules/debug/package.json | 2 +- .../node_modules/debug/src/common.js | 15 ++- tools/node_modules/eslint/README.md | 2 +- .../eslint/lib/rules/consistent-return.js | 6 +- .../eslint/lib/rules/no-mixed-operators.js | 2 +- .../eslint/lib/rules/operator-assignment.js | 9 +- .../eslintrc/lib/config-array-factory.js | 2 +- .../@eslint/eslintrc/package.json | 4 +- .../node_modules/acorn-jsx/package.json | 2 +- .../eslint/node_modules/debug/package.json | 2 +- .../eslint/node_modules/debug/src/common.js | 15 ++- .../eslint/node_modules/flatted/README.md | 2 +- .../eslint/node_modules/flatted/package.json | 11 +- .../eslint/node_modules/flatted/php/test.php | 118 ------------------ .../eslint/node_modules/globals/globals.json | 9 ++ .../eslint/node_modules/globals/package.json | 2 +- .../table/node_modules/ajv/README.md | 9 +- .../node_modules/ajv/dist/compile/errors.js | 2 +- .../ajv/dist/compile/jtd/serialize.js | 2 +- .../ajv/dist/compile/validate/index.js | 7 +- .../ajv/dist/vocabularies/applicator/not.js | 2 +- .../table/node_modules/ajv/package.json | 6 +- tools/node_modules/eslint/package.json | 6 +- 28 files changed, 143 insertions(+), 290 deletions(-) mode change 100644 => 100755 tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/LICENSE mode change 100644 => 100755 tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/README.md mode change 100644 => 100755 tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/package.json delete mode 100644 tools/node_modules/eslint/node_modules/flatted/php/test.php diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/LICENSE b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/LICENSE old mode 100644 new mode 100755 index 4b1ad51b2f0efc..9e841e7a26e4eb --- a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/LICENSE +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/LICENSE @@ -1,21 +1,21 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE + MIT License + + Copyright (c) Microsoft Corporation. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/README.md b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/README.md old mode 100644 new mode 100755 index 5c0a337afcdefa..120083c91f5602 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/README.md +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/README.md @@ -5,12 +5,12 @@ This package contains type definitions for Mdast (https://github.com/syntax-tree/mdast). # Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast +Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast. -Additional Details - * Last updated: Sat, 07 Sep 2019 00:45:19 GMT - * Dependencies: @types/unist +### Additional Details + * Last updated: Fri, 16 Jul 2021 17:31:26 GMT + * Dependencies: [@types/unist](https://npmjs.com/package/@types/unist) * Global values: none # Credits -These definitions were written by Jun Lu . +These definitions were written by [Christian Murphy](https://github.com/ChristianMurphy), [Jun Lu](https://github.com/lujun2), [Remco Haszing](https://github.com/remcohaszing), and [Titus Wormer](https://github.com/wooorm). diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/package.json b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/package.json old mode 100644 new mode 100755 index 23e52f45be668e..cfd3ff28b002c8 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/package.json +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/mdast/package.json @@ -1,17 +1,33 @@ { "name": "@types/mdast", - "version": "3.0.3", + "version": "3.0.7", "description": "TypeScript definitions for Mdast", + "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast", "license": "MIT", "contributors": [ + { + "name": "Christian Murphy", + "url": "https://github.com/ChristianMurphy", + "githubUsername": "ChristianMurphy" + }, { "name": "Jun Lu", "url": "https://github.com/lujun2", "githubUsername": "lujun2" + }, + { + "name": "Remco Haszing", + "url": "https://github.com/remcohaszing", + "githubUsername": "remcohaszing" + }, + { + "name": "Titus Wormer", + "url": "https://github.com/wooorm", + "githubUsername": "wooorm" } ], "main": "", - "types": "index", + "types": "index.d.ts", "repository": { "type": "git", "url": "https://github.com/DefinitelyTyped/DefinitelyTyped.git", @@ -21,6 +37,6 @@ "dependencies": { "@types/unist": "*" }, - "typesPublisherContentHash": "14d7fdbd7f31ef3975bd5e967ada84235c102b1be369cba397ced8b95ebe4e57", - "typeScriptVersion": "3.0" + "typesPublisherContentHash": "666079441041567c5bdfa2b8ff46e900b18d544357be5b8cdcecfb412129e903", + "typeScriptVersion": "3.6" } \ No newline at end of file diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/README.md b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/README.md index 78a310d17c9fab..283ae4d3bfed1c 100755 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/README.md +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/README.md @@ -6,113 +6,11 @@ This package contains type definitions for Unist (https://github.com/syntax-tree # Details Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist. -## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist/index.d.ts) -````ts -// Type definitions for non-npm package Unist 2.0 -// Project: https://github.com/syntax-tree/unist -// Definitions by: bizen241 -// Jun Lu -// Hernan Rajchert -// Titus Wormer -// Junyoung Choi -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 3.0 - -/** - * Syntactic units in unist syntax trees are called nodes. - */ -export interface Node { - /** - * The variant of a node. - */ - type: string; - - /** - * Information from the ecosystem. - */ - data?: Data | undefined; - - /** - * Location of a node in a source document. - * Must not be present if a node is generated. - */ - position?: Position | undefined; - - [key: string]: unknown; -} - -/** - * Information associated by the ecosystem with the node. - * Space is guaranteed to never be specified by unist or specifications - * implementing unist. - */ -export interface Data { - [key: string]: unknown; -} - -/** - * Location of a node in a source file. - */ -export interface Position { - /** - * Place of the first character of the parsed source region. - */ - start: Point; - - /** - * Place of the first character after the parsed source region. - */ - end: Point; - - /** - * Start column at each index (plus start line) in the source region, - * for elements that span multiple lines. - */ - indent?: number[] | undefined; -} - -/** - * One place in a source file. - */ -export interface Point { - /** - * Line in a source file (1-indexed integer). - */ - line: number; - - /** - * Column in a source file (1-indexed integer). - */ - column: number; - /** - * Character in a source file (0-indexed integer). - */ - offset?: number | undefined; -} - -/** - * Nodes containing other nodes. - */ -export interface Parent extends Node { - /** - * List representing the children of a node. - */ - children: Node[]; -} - -/** - * Nodes containing a value. - */ -export interface Literal extends Node { - value: unknown; -} - -```` ### Additional Details - * Last updated: Fri, 02 Jul 2021 18:04:49 GMT + * Last updated: Thu, 15 Jul 2021 00:31:23 GMT * Dependencies: none * Global values: none # Credits -These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), and [Junyoung Choi](https://github.com/rokt33r). +These definitions were written by [bizen241](https://github.com/bizen241), [Jun Lu](https://github.com/lujun2), [Hernan Rajchert](https://github.com/hrajchert), [Titus Wormer](https://github.com/wooorm), [Junyoung Choi](https://github.com/rokt33r), [Ben Moon](https://github.com/GuiltyDolphin), and [JounQin](https://github.com/JounQin). diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/package.json b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/package.json index d4d18b7cbe9b59..ab4403f506948c 100755 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/package.json +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/@types/unist/package.json @@ -1,6 +1,6 @@ { "name": "@types/unist", - "version": "2.0.4", + "version": "2.0.6", "description": "TypeScript definitions for Unist", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist", "license": "MIT", @@ -29,6 +29,16 @@ "name": "Junyoung Choi", "url": "https://github.com/rokt33r", "githubUsername": "rokt33r" + }, + { + "name": "Ben Moon", + "url": "https://github.com/GuiltyDolphin", + "githubUsername": "GuiltyDolphin" + }, + { + "name": "JounQin", + "url": "https://github.com/JounQin", + "githubUsername": "JounQin" } ], "main": "", @@ -40,6 +50,6 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "373f3a8c09fdf9fa50470b9d6b720dbe014e0fe93cb797a34481c4231e8fab59", + "typesPublisherContentHash": "da5f2c3f967fa07869161991244bb7f9a237ac20494b902ffcb9108deb9b4e12", "typeScriptVersion": "3.6" } \ No newline at end of file diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/debug/package.json b/tools/node_modules/eslint-plugin-markdown/node_modules/debug/package.json index da809d2b8d28b2..b7d70acb9bee82 100644 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/debug/package.json +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/debug/package.json @@ -1,6 +1,6 @@ { "name": "debug", - "version": "4.3.1", + "version": "4.3.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" diff --git a/tools/node_modules/eslint-plugin-markdown/node_modules/debug/src/common.js b/tools/node_modules/eslint-plugin-markdown/node_modules/debug/src/common.js index 392a8e005a063a..50ce2925101d73 100644 --- a/tools/node_modules/eslint-plugin-markdown/node_modules/debug/src/common.js +++ b/tools/node_modules/eslint-plugin-markdown/node_modules/debug/src/common.js @@ -60,6 +60,8 @@ function setup(env) { function createDebug(namespace) { let prevTime; let enableOverride = null; + let namespacesCache; + let enabledCache; function debug(...args) { // Disabled? @@ -120,7 +122,17 @@ function setup(env) { Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, - get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, set: v => { enableOverride = v; } @@ -149,6 +161,7 @@ function setup(env) { */ function enable(namespaces) { createDebug.save(namespaces); + createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; diff --git a/tools/node_modules/eslint/README.md b/tools/node_modules/eslint/README.md index c87d07e0dcd1ac..68982812e3b026 100644 --- a/tools/node_modules/eslint/README.md +++ b/tools/node_modules/eslint/README.md @@ -288,7 +288,7 @@ The following companies, organizations, and individuals support ESLint's ongoing

Automattic

Gold Sponsors

Nx (by Nrwl) Chrome's Web Framework & Tools Performance Fund Salesforce Airbnb Coinbase Substack

Silver Sponsors

Retool Liftoff

Bronze Sponsors

-

Anagram Solver Bugsnag Stability Monitoring Mixpanel VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Fire Stick Tricks Practice Ignition

+

Anagram Solver Bugsnag Stability Monitoring Mixpanel VPS Server Icons8: free icons, photos, illustrations, and music Discord ThemeIsle Fire Stick Tricks Practice Ignition

## Technology Sponsors diff --git a/tools/node_modules/eslint/lib/rules/consistent-return.js b/tools/node_modules/eslint/lib/rules/consistent-return.js index a250430cb766b5..0e20209af56b7f 100644 --- a/tools/node_modules/eslint/lib/rules/consistent-return.js +++ b/tools/node_modules/eslint/lib/rules/consistent-return.js @@ -104,18 +104,18 @@ module.exports = { } else if (node.type === "ArrowFunctionExpression") { // `=>` token - loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc.start; + loc = context.getSourceCode().getTokenBefore(node.body, astUtils.isArrowToken).loc; } else if ( node.parent.type === "MethodDefinition" || (node.parent.type === "Property" && node.parent.method) ) { // Method name. - loc = node.parent.key.loc.start; + loc = node.parent.key.loc; } else { // Function name or `function` keyword. - loc = (node.id || node).loc.start; + loc = (node.id || context.getSourceCode().getFirstToken(node)).loc; } if (!name) { diff --git a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js index 15eb20bed2a49e..5a2e139a620519 100644 --- a/tools/node_modules/eslint/lib/rules/no-mixed-operators.js +++ b/tools/node_modules/eslint/lib/rules/no-mixed-operators.js @@ -117,7 +117,7 @@ module.exports = { ], messages: { - unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'." + unexpectedMixedOperator: "Unexpected mix of '{{leftOperator}}' and '{{rightOperator}}'. Use parentheses to clarify the intended order of operations." } }, diff --git a/tools/node_modules/eslint/lib/rules/operator-assignment.js b/tools/node_modules/eslint/lib/rules/operator-assignment.js index fdb0884922b654..a48d2725197055 100644 --- a/tools/node_modules/eslint/lib/rules/operator-assignment.js +++ b/tools/node_modules/eslint/lib/rules/operator-assignment.js @@ -76,8 +76,8 @@ module.exports = { fixable: "code", messages: { - replaced: "Assignment can be replaced with operator assignment.", - unexpected: "Unexpected operator assignment shorthand." + replaced: "Assignment (=) can be replaced with operator assignment ({{operator}}=).", + unexpected: "Unexpected operator assignment ({{operator}}=) shorthand." } }, @@ -113,6 +113,7 @@ module.exports = { context.report({ node, messageId: "replaced", + data: { operator }, fix(fixer) { if (canBeFixed(left) && canBeFixed(expr.left)) { const equalsToken = getOperatorToken(node); @@ -139,7 +140,8 @@ module.exports = { */ context.report({ node, - messageId: "replaced" + messageId: "replaced", + data: { operator } }); } } @@ -155,6 +157,7 @@ module.exports = { context.report({ node, messageId: "unexpected", + data: { operator: node.operator }, fix(fixer) { if (canBeFixed(node.left)) { const firstToken = sourceCode.getFirstToken(node); diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js index c7ff6a09a93881..406601c24714ac 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js @@ -495,7 +495,7 @@ class ConfigArrayFactory { basePath ); - if (fs.existsSync(ctx.filePath)) { + if (fs.existsSync(ctx.filePath) && fs.statSync(ctx.filePath).isFile()) { let configData; try { diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json index e79857f5553e99..35f5129707338c 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json @@ -1,6 +1,6 @@ { "name": "@eslint/eslintrc", - "version": "0.4.2", + "version": "0.4.3", "description": "The legacy ESLintRC config file format for ESLint", "main": "lib/index.js", "files": [ @@ -40,7 +40,7 @@ "eslint-plugin-jsdoc": "^32.2.0", "eslint-plugin-node": "^11.1.0", "eslint-release": "^3.1.2", - "fs-teardown": "^0.1.0", + "fs-teardown": "0.1.1", "mocha": "^8.1.1", "shelljs": "^0.8.4", "sinon": "^9.2.0", diff --git a/tools/node_modules/eslint/node_modules/acorn-jsx/package.json b/tools/node_modules/eslint/node_modules/acorn-jsx/package.json index f42a7ea1437c8c..6debde9caa30ba 100644 --- a/tools/node_modules/eslint/node_modules/acorn-jsx/package.json +++ b/tools/node_modules/eslint/node_modules/acorn-jsx/package.json @@ -2,7 +2,7 @@ "name": "acorn-jsx", "description": "Modern, fast React.js JSX parser", "homepage": "https://github.com/acornjs/acorn-jsx", - "version": "5.3.1", + "version": "5.3.2", "maintainers": [ { "name": "Ingvar Stepanyan", diff --git a/tools/node_modules/eslint/node_modules/debug/package.json b/tools/node_modules/eslint/node_modules/debug/package.json index da809d2b8d28b2..b7d70acb9bee82 100644 --- a/tools/node_modules/eslint/node_modules/debug/package.json +++ b/tools/node_modules/eslint/node_modules/debug/package.json @@ -1,6 +1,6 @@ { "name": "debug", - "version": "4.3.1", + "version": "4.3.2", "repository": { "type": "git", "url": "git://github.com/visionmedia/debug.git" diff --git a/tools/node_modules/eslint/node_modules/debug/src/common.js b/tools/node_modules/eslint/node_modules/debug/src/common.js index 392a8e005a063a..50ce2925101d73 100644 --- a/tools/node_modules/eslint/node_modules/debug/src/common.js +++ b/tools/node_modules/eslint/node_modules/debug/src/common.js @@ -60,6 +60,8 @@ function setup(env) { function createDebug(namespace) { let prevTime; let enableOverride = null; + let namespacesCache; + let enabledCache; function debug(...args) { // Disabled? @@ -120,7 +122,17 @@ function setup(env) { Object.defineProperty(debug, 'enabled', { enumerable: true, configurable: false, - get: () => enableOverride === null ? createDebug.enabled(namespace) : enableOverride, + get: () => { + if (enableOverride !== null) { + return enableOverride; + } + if (namespacesCache !== createDebug.namespaces) { + namespacesCache = createDebug.namespaces; + enabledCache = createDebug.enabled(namespace); + } + + return enabledCache; + }, set: v => { enableOverride = v; } @@ -149,6 +161,7 @@ function setup(env) { */ function enable(namespaces) { createDebug.save(namespaces); + createDebug.namespaces = namespaces; createDebug.names = []; createDebug.skips = []; diff --git a/tools/node_modules/eslint/node_modules/flatted/README.md b/tools/node_modules/eslint/node_modules/flatted/README.md index 8fd5b4d82f4459..1f52cc5b3877ff 100644 --- a/tools/node_modules/eslint/node_modules/flatted/README.md +++ b/tools/node_modules/eslint/node_modules/flatted/README.md @@ -1,6 +1,6 @@ # flatted -[![Downloads](https://img.shields.io/npm/dm/flatted.svg)](https://www.npmjs.com/package/flatted) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/flatted/badge.svg?branch=master)](https://coveralls.io/github/WebReflection/flatted?branch=master) [![Build Status](https://travis-ci.org/WebReflection/flatted.svg?branch=master)](https://travis-ci.org/WebReflection/flatted) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) ![WebReflection status](https://offline.report/status/webreflection.svg) +[![Downloads](https://img.shields.io/npm/dm/flatted.svg)](https://www.npmjs.com/package/flatted) [![Coverage Status](https://coveralls.io/repos/github/WebReflection/flatted/badge.svg?branch=main)](https://coveralls.io/github/WebReflection/flatted?branch=main) [![Build Status](https://travis-ci.com/WebReflection/flatted.svg?branch=main)](https://travis-ci.com/WebReflection/flatted) [![License: ISC](https://img.shields.io/badge/License-ISC-yellow.svg)](https://opensource.org/licenses/ISC) ![WebReflection status](https://offline.report/status/webreflection.svg) ![snow flake](./flatted.jpg) diff --git a/tools/node_modules/eslint/node_modules/flatted/package.json b/tools/node_modules/eslint/node_modules/flatted/package.json index 013728929103d3..405ccfd799b098 100644 --- a/tools/node_modules/eslint/node_modules/flatted/package.json +++ b/tools/node_modules/eslint/node_modules/flatted/package.json @@ -1,6 +1,6 @@ { "name": "flatted", - "version": "3.2.0", + "version": "3.2.1", "description": "A super light and fast circular JSON parser.", "unpkg": "min.js", "types": "types.d.ts", @@ -12,8 +12,9 @@ "rollup:babel": "rollup --config rollup/babel.config.js && sed -i.bck 's/^var /self./' index.js && rm -rf index.js.bck && drop-babel-typeof index.js", "min": "terser index.js -c -m -o min.js", "size": "cat index.js | wc -c;cat min.js | wc -c;gzip -c9 min.js | wc -c;cat min.js | brotli | wc -c; cat es.js | brotli | wc -c", - "coveralls": "nyc report --reporter=text-lcov | coveralls", - "test": "nyc node test/index.js" + "coveralls": "c8 report --reporter=text-lcov | coveralls", + "test": "c8 node test/index.js", + "test:php": "php php/test.php" }, "repository": { "type": "git", @@ -36,13 +37,13 @@ "@babel/core": "^7.14.6", "@babel/preset-env": "^7.14.7", "ascjs": "^5.0.1", + "c8": "^7.7.3", "circular-json": "^0.5.9", "circular-json-es6": "^2.0.2", "coveralls": "^3.1.1", "drop-babel-typeof": "^1.0.3", "jsan": "^3.1.13", - "nyc": "^15.1.0", - "rollup": "^2.52.6", + "rollup": "^2.52.8", "rollup-plugin-babel": "^4.4.0", "rollup-plugin-node-resolve": "^5.2.0", "rollup-plugin-terser": "^7.0.2", diff --git a/tools/node_modules/eslint/node_modules/flatted/php/test.php b/tools/node_modules/eslint/node_modules/flatted/php/test.php deleted file mode 100644 index 8b49e924842035..00000000000000 --- a/tools/node_modules/eslint/node_modules/flatted/php/test.php +++ /dev/null @@ -1,118 +0,0 @@ -o = &$o; - -console::assert(Flatted::stringify($a) === '[["0"]]', 'recursive Array'); -console::assert(Flatted::stringify($o) === '[{"o":"0"}]', 'recursive Object'); - -$b = Flatted::parse(Flatted::stringify($a)); -console::assert(is_array($b) && $b[0] === $b, 'restoring recursive Array'); - -$a[] = 1; -$a[] = 'two'; -$a[] = true; -$o->one = 1; -$o->two = 'two'; -$o->three = true; - -console::assert(Flatted::stringify($a) === '[["0",1,"1",true],"two"]', 'values in Array'); -console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true},"two"]', 'values in Object'); - -$a[] = &$o; -$o->a = &$a; - -console::assert(Flatted::stringify($a) === '[["0",1,"1",true,"2"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0"}]', 'object in Array'); -console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true,"a":"2"},"two",["2",1,"1",true,"0"]]', 'array in Object'); - -$a[] = array('test' => 'OK'); -$a[] = [1, 2, 3]; - -$o->test = array('test' => 'OK'); -$o->array = [1, 2, 3]; - -console::assert(Flatted::stringify($a) === '[["0",1,"1",true,"2","3","4"],"two",{"o":"2","one":1,"two":"1","three":true,"a":"0","test":"3","array":"4"},{"test":"5"},[1,2,3],"OK"]', 'objects in Array'); -console::assert(Flatted::stringify($o) === '[{"o":"0","one":1,"two":"1","three":true,"a":"2","test":"3","array":"4"},"two",["2",1,"1",true,"0","3","4"],{"test":"5"},[1,2,3],"OK"]', 'objects in Object'); - -$a2 = Flatted::parse(Flatted::stringify($a)); -$o2 = Flatted::parse(Flatted::stringify($o)); - -console::assert($a2[0] === $a2, 'parsed Array'); -console::assert($o2->o === $o2, 'parsed Object'); - -console::assert( - $a2[1] === 1 && - $a2[2] === 'two' && - $a2[3] === true && - $a2[4] instanceof stdClass && - json_encode($a2[5]) === json_encode(array('test' => 'OK')) && - json_encode($a2[6]) === json_encode([1, 2, 3]), - 'array values are all OK' -); - -console::assert($a2[4] === $a2[4]->o && $a2 === $a2[4]->o->a, 'array recursive values are OK'); - -console::assert( - $o2->one === 1 && - $o2->two === 'two' && - $o2->three === true && - is_array($o2->a) && - json_encode($o2->test) === json_encode(array('test' => 'OK')) && - json_encode($o2->array) === json_encode([1, 2, 3]), - 'object values are all OK' -); - -console::assert($o2->a === $o2->a[0] && $o2 === $o2->a[4], 'object recursive values are OK'); - -console::assert(Flatted::parse(Flatted::stringify(1)) === 1, 'numbers can be parsed too'); -console::assert(Flatted::parse(Flatted::stringify(false)) === false, 'booleans can be parsed too'); -console::assert(Flatted::parse(Flatted::stringify(null)) === null, 'null can be parsed too'); -console::assert(Flatted::parse(Flatted::stringify('test')) === 'test', 'strings can be parsed too'); - -$str = Flatted::parse('[{"prop":"1","a":"2","b":"3"},{"value":123},["4","5"],{"e":"6","t":"7","p":4},{},{"b":"8"},"f",{"a":"9"},["10"],"sup",{"a":1,"d":2,"c":"7","z":"11","h":1},{"g":2,"a":"7","b":"12","f":6},{"r":4,"u":"7","c":5}]'); - -console::assert( - $str->b->t->a === 'sup' && - $str->a[1]->b[0]->c === $str->b->t, - 'str is fine' -); - -$oo = Flatted::parse('[{"a":"1","b":"0","c":"2"},{"aa":"3"},{"ca":"4","cb":"5","cc":"6","cd":"7","ce":"8","cf":"9"},{"aaa":"10"},{"caa":"4"},{"cba":"5"},{"cca":"2"},{"cda":"4"},"value2","value3","value1"]'); - -console::assert( - $oo->a->aa->aaa = 'value1' - && $oo === $oo->b - && $oo === $oo->b - && $oo->c->ca->caa === $oo->c->ca - && $oo->c->cb->cba === $oo->c->cb - && $oo->c->cc->cca === $oo->c - && $oo->c->cd->cda === $oo->c->ca->caa - && $oo->c->ce === 'value2' - && $oo->c->cf === 'value3', - 'parse is correct' -); - -echo "OK\n"; - -?> \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/globals/globals.json b/tools/node_modules/eslint/node_modules/globals/globals.json index 1119914e203e2c..334ff3e01e9cc0 100644 --- a/tools/node_modules/eslint/node_modules/globals/globals.json +++ b/tools/node_modules/eslint/node_modules/globals/globals.json @@ -442,15 +442,24 @@ "CSSImportRule": false, "CSSKeyframeRule": false, "CSSKeyframesRule": false, + "CSSMatrixComponent": false, "CSSMediaRule": false, "CSSNamespaceRule": false, "CSSPageRule": false, + "CSSPerspective": false, + "CSSRotate": false, "CSSRule": false, "CSSRuleList": false, + "CSSScale": false, + "CSSSkew": false, + "CSSSkewX": false, + "CSSSkewY": false, "CSSStyleDeclaration": false, "CSSStyleRule": false, "CSSStyleSheet": false, "CSSSupportsRule": false, + "CSSTransformValue": false, + "CSSTranslate": false, "CustomElementRegistry": false, "customElements": false, "CustomEvent": false, diff --git a/tools/node_modules/eslint/node_modules/globals/package.json b/tools/node_modules/eslint/node_modules/globals/package.json index 66d027e5f30e8c..a646c1ded41493 100644 --- a/tools/node_modules/eslint/node_modules/globals/package.json +++ b/tools/node_modules/eslint/node_modules/globals/package.json @@ -1,6 +1,6 @@ { "name": "globals", - "version": "13.9.0", + "version": "13.10.0", "description": "Global identifiers from different JavaScript environments", "license": "MIT", "repository": "sindresorhus/globals", diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/README.md b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/README.md index f1ff6731d37e2d..25cc428c27f613 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/README.md +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/README.md @@ -105,8 +105,8 @@ Performance of different validators by [json-schema-benchmark](https://github.co - Ajv implements JSON Schema [draft-06/07/2019-09/2020-12](http://json-schema.org/) standards (draft-04 is supported in v6): - all validation keywords (see [JSON Schema validation keywords](https://ajv.js.org/json-schema.html)) - [OpenAPI](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.3.md) extensions: - - NEW: keyword [discriminator](https://ajv.js.org/json-schema.md#discriminator). - - keyword [nullable](https://ajv.js.org/json-schema.md#nullable). + - NEW: keyword [discriminator](https://ajv.js.org/json-schema.html#discriminator). + - keyword [nullable](https://ajv.js.org/json-schema.html#nullable). - full support of remote references (remote schemas have to be added with `addSchema` or compiled to be available) - support of recursive references between schemas - correct string lengths for strings with unicode pairs @@ -161,6 +161,11 @@ const schema = { additionalProperties: false, } +const data = { + foo: 1, + bar: "abc" +} + const validate = ajv.compile(schema) const valid = validate(data) if (!valid) console.log(validate.errors) diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/errors.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/errors.js index 0dcf28bc5cd491..27b2091762c20f 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/errors.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/errors.js @@ -5,7 +5,7 @@ const codegen_1 = require("./codegen"); const util_1 = require("./util"); const names_1 = require("./names"); exports.keywordError = { - message: ({ keyword }) => codegen_1.str `should pass "${keyword}" keyword validation`, + message: ({ keyword }) => codegen_1.str `must pass "${keyword}" keyword validation`, }; exports.keyword$DataError = { message: ({ keyword, schemaType }) => schemaType diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js index 69f0f563c7f128..7ca512d4399f7a 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/jtd/serialize.js @@ -180,7 +180,7 @@ function serializeType(cxt) { serializeString(cxt); break; case "timestamp": - gen.if(codegen_1._ `${data} instanceof Date`, () => gen.add(names_1.default.json, codegen_1._ `${data}.toISOString()`), () => serializeString(cxt)); + gen.if(codegen_1._ `${data} instanceof Date`, () => gen.add(names_1.default.json, codegen_1._ `'"' + ${data}.toISOString() + '"'`), () => serializeString(cxt)); break; default: serializeNumber(cxt); diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/index.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/index.js index 43371e7c7b51b8..a43053e228b6ca 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/index.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/compile/validate/index.js @@ -303,7 +303,10 @@ class KeywordCxt { } } result(condition, successAction, failAction) { - this.gen.if(codegen_1.not(condition)); + this.failResult(codegen_1.not(condition), successAction, failAction); + } + failResult(condition, successAction, failAction) { + this.gen.if(condition); if (failAction) failAction(); else @@ -322,7 +325,7 @@ class KeywordCxt { } } pass(condition, failAction) { - this.result(condition, undefined, failAction); + this.failResult(codegen_1.not(condition), undefined, failAction); } fail(condition) { if (condition === undefined) { diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js index 60ad2b9a7c4dab..72f9f85a0ac8c2 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/dist/vocabularies/applicator/not.js @@ -18,7 +18,7 @@ const def = { createErrors: false, allErrors: false, }, valid); - cxt.result(valid, () => cxt.error(), () => cxt.reset()); + cxt.failResult(valid, () => cxt.reset(), () => cxt.error()); }, error: { message: "must NOT be valid" }, }; diff --git a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json index 357ede01961155..6bf862d66f44ec 100644 --- a/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json +++ b/tools/node_modules/eslint/node_modules/table/node_modules/ajv/package.json @@ -1,6 +1,6 @@ { "name": "ajv", - "version": "8.6.0", + "version": "8.6.2", "description": "Another JSON Schema Validator", "main": "dist/ajv.js", "types": "dist/ajv.d.ts", @@ -70,7 +70,7 @@ "@rollup/plugin-typescript": "^8.2.1", "@types/chai": "^4.2.12", "@types/mocha": "^8.0.3", - "@types/node": "^15.0.2", + "@types/node": "^16.3.2", "@types/require-from-string": "^1.2.0", "@typescript-eslint/eslint-plugin": "^3.8.0", "@typescript-eslint/parser": "^3.8.0", @@ -83,7 +83,7 @@ "eslint": "^7.8.1", "eslint-config-prettier": "^7.0.0", "glob": "^7.0.0", - "husky": "^6.0.0", + "husky": "^7.0.1", "if-node-version": "^1.0.0", "jimp": "^0.16.1", "js-beautify": "^1.7.3", diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index ac3a78cc3b0f30..0e64b624b966e6 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "7.30.0", + "version": "7.31.0", "author": "Nicholas C. Zakas ", "description": "An AST-based pattern checker for JavaScript.", "bin": { @@ -44,7 +44,7 @@ "bugs": "https://github.com/eslint/eslint/issues/", "dependencies": { "@babel/code-frame": "7.12.11", - "@eslint/eslintrc": "^0.4.2", + "@eslint/eslintrc": "^0.4.3", "@humanwhocodes/config-array": "^0.5.0", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -103,7 +103,7 @@ "eslint-release": "^2.0.0", "eslump": "^3.0.0", "esprima": "^4.0.1", - "fs-teardown": "^0.1.0", + "fs-teardown": "0.1.1", "glob": "^7.1.6", "jsdoc": "^3.5.5", "karma": "^6.1.1",