From ab4266661cde403044c3beaa88f83ead7b1fb50c Mon Sep 17 00:00:00 2001 From: headlessNode Date: Wed, 4 Dec 2024 22:54:47 +0500 Subject: [PATCH 1/6] feat: add fixer function --- .../eslint/rules/require-order/lib/main.js | 75 ++++++++++++++++++- .../require-order/test/fixtures/invalid.js | 63 ++++++++++++++-- 2 files changed, 130 insertions(+), 8 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js index 9b20f8acc8f8..3dbb36be87c6 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js @@ -125,6 +125,21 @@ function main( context ) { } } + /** + * Sorts `require` statements based on their ranks. + * + * @private + * @param {Object} a - first require statement + * @param {Object} b - second require statement + * @returns {number} number indicating sort order + */ + function sortRequires( a, b ) { + if ( a.rank < b.rank ) { + return -1; + } + return 1; + } + /** * Reports the error message. * @@ -141,9 +156,65 @@ function main( context ) { context.report({ 'node': null, 'message': msg, - 'loc': curr.node.loc + 'loc': curr.node.loc, + 'fix': fix }); } + + /** + * Fixes the lint error by reordering the require statements. + * + * @private + * @param {Function} fixer - ESLint fixer + * @returns {(Object|Null)} fix or null + */ + function fix(fixer) { + var requireDeclarations; + var replacingText; + var startRange; + var endRange; + var source; + var elem; + var txt; + var i; + + replacingText = ''; + requireDeclarations = []; + source = context.getSourceCode(); + + // Get the text and rank for the require statements: + for ( i = 0; i < requires.length; i++ ) { + elem = requires[i].node.parent.parent; + txt = source.getText(elem); + if ( i === 0 ) { + startRange = elem.range[ 0 ] - elem.loc.start.column; + } + endRange = elem.range[ 1 ]; + requireDeclarations.push( { + 'text': txt, + 'rank': requires[i].rank + }); + } + + // Sort the require statements: + requireDeclarations.sort( sortRequires ); + + // Build the replacement text: + for ( i = 0; i < requireDeclarations.length; i++ ) { + txt = requireDeclarations[ i ].text; + if ( !txt.startsWith( 'var' ) ) { + txt = 'var '+txt; + } + if ( !txt.endsWith( ';' ) ) { + txt += ';'; + } + replacingText += txt; + if ( i < requireDeclarations.length-1 ) { + replacingText += '\n'; + } + } + return fixer.replaceTextRange( [ startRange, endRange ], replacingText );// eslint-disable-line max-len + } } /** @@ -196,9 +267,11 @@ function main( context ) { rule = { 'meta': { + 'type': 'layout', 'docs': { 'description': 'enforce that `require()` calls follow a specified order' }, + 'fixable': 'code', 'schema': [ { 'type': 'object', diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/test/fixtures/invalid.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/test/fixtures/invalid.js index 9b827306a5a2..f60da166cd8e 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/test/fixtures/invalid.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/test/fixtures/invalid.js @@ -32,7 +32,13 @@ test = { { 'message': '`require( \'fs\' )` should come before `require( \'@stdlib/math/base/special/betainc\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var fs = require( \'fs\' );', + 'var betainc = require( \'@stdlib/math/base/special/betainc\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -47,7 +53,13 @@ test = { { 'message': '`require( \'fs\' )` should come before `require( \'debug\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var fs = require( \'fs\' );', + 'var debug = require( \'debug\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -62,7 +74,13 @@ test = { { 'message': '`require( \'debug\' )` should come before `require( \'./validate.js\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var debug = require( \'debug\' );', + 'var validate = require( \'./validate.js\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -80,7 +98,13 @@ test = { { 'message': '`require( \'debug\' )` should come before `require( \'./validate.js\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var debug = require( \'debug\' );', + 'var validate = require( \'./validate.js\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -100,7 +124,18 @@ test = { { 'message': '`require( \'path\' )` should come before `require( \'debug\' )`' } - ] + ], + 'output': [ + 'var resolve = require( \'path\' ).resolve;', + 'var debug = require( \'debug\' )( \'links:create:sync\' );', + 'var instanceOf = require( \'@stdlib/assert/instance-of\' );', + 'var readJSON = require( \'@stdlib/fs/read-json\' ).sync;', + 'var writeFile = require( \'@stdlib/fs/write-file\' ).sync;', + 'var cwd = require( \'@stdlib/process/cwd\' );', + 'var config = require( \'./defaults.js\' );', + 'var validate = require( \'./validate.js\' );', + 'var insert = require( \'./insert.js\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -122,7 +157,14 @@ test = { { 'message': '`require( \'fs\' )` should come before `require( \'@stdlib/math\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var fs = require( \'fs\' );', + 'var debug = require( \'debug\' );', + 'var math = require( \'@stdlib/math\' );' + ].join( '\n' ) }; invalid.push( test ); @@ -141,7 +183,14 @@ test = { { 'message': '`require( \'tape\' )` should come before `require( \'@stdlib/math/base/special/abs\' )`' } - ] + ], + 'output': [ + '// MODULES //', + '', + 'var tape = require( \'tape\' );', + 'var abs = require( \'@stdlib/math/base/special/abs\' );', + 'var main = require( \'./../lib/index.js\' );' + ].join( '\n' ) }; invalid.push( test ); From a3b73c6ed71fac9ddd4ed0c0ef043fb15e223e0d Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:46:08 +0500 Subject: [PATCH 2/6] refactor: apply review suggestion Co-authored-by: Athan Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> --- .../@stdlib/_tools/eslint/rules/require-order/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js index 3dbb36be87c6..f69b34163fb3 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js @@ -168,7 +168,7 @@ function main( context ) { * @param {Function} fixer - ESLint fixer * @returns {(Object|Null)} fix or null */ - function fix(fixer) { + function fix( fixer ) { var requireDeclarations; var replacingText; var startRange; From 08c8449fc667816fe2c087a52f732d2de9a37f68 Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:46:24 +0500 Subject: [PATCH 3/6] refactor: apply review suggestion Co-authored-by: Athan Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> --- .../@stdlib/_tools/eslint/rules/require-order/lib/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js index f69b34163fb3..4be5f8551974 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js @@ -184,8 +184,8 @@ function main( context ) { // Get the text and rank for the require statements: for ( i = 0; i < requires.length; i++ ) { - elem = requires[i].node.parent.parent; - txt = source.getText(elem); + elem = requires[ i ].node.parent.parent; + txt = source.getText( elem ); if ( i === 0 ) { startRange = elem.range[ 0 ] - elem.loc.start.column; } From a45d93cd5c54c2e7831797c4544c5f10ef297fdb Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 15 Dec 2024 19:46:34 +0500 Subject: [PATCH 4/6] refactor: apply review suggestion Co-authored-by: Athan Signed-off-by: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> --- .../@stdlib/_tools/eslint/rules/require-order/lib/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js index 4be5f8551974..5faf86e751b9 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js @@ -190,7 +190,7 @@ function main( context ) { startRange = elem.range[ 0 ] - elem.loc.start.column; } endRange = elem.range[ 1 ]; - requireDeclarations.push( { + requireDeclarations.push({ 'text': txt, 'rank': requires[i].rank }); From de2e42c774c71499ce30f359b702d26a6f924af4 Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:01:06 +0000 Subject: [PATCH 5/6] refactor: apply review suggestion --- .../eslint/rules/require-order/lib/main.js | 110 +++---- package.json | 293 +----------------- 2 files changed, 56 insertions(+), 347 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js index 5faf86e751b9..955b6ea95ba1 100644 --- a/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js +++ b/lib/node_modules/@stdlib/_tools/eslint/rules/require-order/lib/main.js @@ -140,6 +140,61 @@ function main( context ) { return 1; } + /** + * Fixes the lint error by reordering the require statements. + * + * @private + * @param {Function} fixer - ESLint fixer + * @returns {(Object|Null)} fix or null + */ + function fix( fixer ) { + var requireDeclarations; + var replacingText; + var startRange; + var endRange; + var source; + var elem; + var txt; + var i; + + replacingText = ''; + requireDeclarations = []; + source = context.getSourceCode(); + + // Get the text and rank for the require statements: + for ( i = 0; i < requires.length; i++ ) { + elem = requires[ i ].node.parent.parent; + txt = source.getText( elem ); + if ( i === 0 ) { + startRange = elem.range[ 0 ] - elem.loc.start.column; + } + endRange = elem.range[ 1 ]; + requireDeclarations.push({ + 'text': txt, + 'rank': requires[i].rank + }); + } + + // Sort the require statements: + requireDeclarations.sort( sortRequires ); + + // Build the replacement text: + for ( i = 0; i < requireDeclarations.length; i++ ) { + txt = requireDeclarations[ i ].text; + if ( !txt.startsWith( 'var' ) ) { + txt = 'var '+txt; + } + if ( !txt.endsWith( ';' ) ) { + txt += ';'; + } + replacingText += txt; + if ( i < requireDeclarations.length-1 ) { + replacingText += '\n'; + } + } + return fixer.replaceTextRange( [ startRange, endRange ], replacingText );// eslint-disable-line max-len + } + /** * Reports the error message. * @@ -160,61 +215,6 @@ function main( context ) { 'fix': fix }); } - - /** - * Fixes the lint error by reordering the require statements. - * - * @private - * @param {Function} fixer - ESLint fixer - * @returns {(Object|Null)} fix or null - */ - function fix( fixer ) { - var requireDeclarations; - var replacingText; - var startRange; - var endRange; - var source; - var elem; - var txt; - var i; - - replacingText = ''; - requireDeclarations = []; - source = context.getSourceCode(); - - // Get the text and rank for the require statements: - for ( i = 0; i < requires.length; i++ ) { - elem = requires[ i ].node.parent.parent; - txt = source.getText( elem ); - if ( i === 0 ) { - startRange = elem.range[ 0 ] - elem.loc.start.column; - } - endRange = elem.range[ 1 ]; - requireDeclarations.push({ - 'text': txt, - 'rank': requires[i].rank - }); - } - - // Sort the require statements: - requireDeclarations.sort( sortRequires ); - - // Build the replacement text: - for ( i = 0; i < requireDeclarations.length; i++ ) { - txt = requireDeclarations[ i ].text; - if ( !txt.startsWith( 'var' ) ) { - txt = 'var '+txt; - } - if ( !txt.endsWith( ';' ) ) { - txt += ';'; - } - replacingText += txt; - if ( i < requireDeclarations.length-1 ) { - replacingText += '\n'; - } - } - return fixer.replaceTextRange( [ startRange, endRange ], replacingText );// eslint-disable-line max-len - } } /** diff --git a/package.json b/package.json index 0eac59a2fe3e..f28dee7b431c 100644 --- a/package.json +++ b/package.json @@ -1,292 +1 @@ -{ - "name": "@stdlib/stdlib", - "version": "0.3.0", - "description": "Standard library.", - "license": "Apache-2.0 AND BSL-1.0", - "author": { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - }, - "contributors": [ - { - "name": "The Stdlib Authors", - "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" - } - ], - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/stdlib" - }, - "bin": { - "stdlib": "./bin/cli" - }, - "main": "./lib", - "browser": { - "process": "process/" - }, - "directories": { - "doc": "./docs", - "example": "./examples", - "lib": "./lib", - "test": "./test" - }, - "types": "./docs/types", - "scripts": { - "notes": "make notes", - "lint": "make lint", - "repl": "make repl", - "test": "make test", - "test-cov": "make test-cov", - "view-cov": "make view-cov", - "examples": "make examples", - "benchmark": "make benchmark", - "clean": "make clean", - "check-deps": "make check-deps", - "check-licenses": "make check-licenses" - }, - "homepage": "https://github.com/stdlib-js/stdlib", - "repository": { - "type": "git", - "url": "git://github.com/stdlib-js/stdlib.git" - }, - "bugs": { - "url": "https://github.com/stdlib-js/stdlib/issues" - }, - "dependencies": { - "@stdlib/array": "^0.3.1", - "@stdlib/assert": "^0.3.1", - "@stdlib/bench": "^0.4.1", - "@stdlib/bigint": "^0.3.1", - "@stdlib/blas": "^0.3.1", - "@stdlib/boolean": "^0.3.1", - "@stdlib/buffer": "^0.3.1", - "@stdlib/cli": "^0.3.1", - "@stdlib/complex": "^0.3.1", - "@stdlib/console": "^0.3.1", - "@stdlib/constants": "^0.3.1", - "@stdlib/datasets": "^0.3.0", - "@stdlib/error": "^0.3.1", - "@stdlib/fs": "^0.3.1", - "@stdlib/function": "^0.3.1", - "@stdlib/iter": "^0.3.1", - "@stdlib/math": "^0.3.1", - "@stdlib/ml": "^0.3.1", - "@stdlib/namespace": "^0.3.1", - "@stdlib/napi": "^0.3.1", - "@stdlib/ndarray": "^0.3.1", - "@stdlib/net": "^0.3.1", - "@stdlib/nlp": "^0.3.1", - "@stdlib/number": "^0.3.1", - "@stdlib/object": "^0.3.1", - "@stdlib/os": "^0.3.1", - "@stdlib/plot": "^0.3.1", - "@stdlib/process": "^0.3.1", - "@stdlib/proxy": "^0.3.1", - "@stdlib/random": "^0.3.1", - "@stdlib/regexp": "^0.3.1", - "@stdlib/repl": "^0.3.1", - "@stdlib/simulate": "^0.3.1", - "@stdlib/slice": "^0.3.1", - "@stdlib/stats": "^0.3.1", - "@stdlib/streams": "^0.3.1", - "@stdlib/strided": "^0.3.1", - "@stdlib/string": "^0.3.1", - "@stdlib/symbol": "^0.3.1", - "@stdlib/time": "^0.3.1", - "@stdlib/types": "^0.4.1", - "@stdlib/utils": "^0.3.1", - "acorn": "^8.1.0", - "acorn-loose": "^8.0.2", - "acorn-walk": "^8.0.2", - "d3-format": "^1.0.0", - "d3-scale": "^1.0.0", - "d3-shape": "^1.0.0", - "d3-time-format": "^2.0.0", - "debug": "^2.6.9", - "glob": "^7.0.5", - "minimist": "^1.2.0", - "readable-stream": "^2.1.4", - "resolve": "^1.1.7", - "vdom-to-html": "^2.3.0", - "virtual-dom": "^2.1.1" - }, - "optionalDependencies": { - "node-gyp": "^9.3.1" - }, - "devDependencies": { - "0x": "^4.10.2", - "@cspell/eslint-plugin": "^8.8.0", - "@commitlint/cli": "^17.4.4", - "@commitlint/cz-commitlint": "^17.4.4", - "@conventional-commits/parser": "^0.4.1", - "@kaciras/deasync": "^1.0.1", - "@types/node": "^13.9.0", - "@typescript-eslint/parser": "^6.9.1", - "@typescript-eslint/eslint-plugin": "^6.9.1", - "ajv": "^5.2.2", - "browser-pack-flat": "^3.0.0", - "browserify": "^17.0.0", - "bundle-collapser": "^1.3.0", - "c8": "^7.12.0", - "chai": "^3.5.0", - "cheerio": "^1.0.0-rc.12", - "commitizen": "^4.3.0", - "common-shakeify": "^0.6.0", - "conventional-changelog-conventionalcommits": "^5.0.0", - "doctrine": "^3.0.0", - "envify": "^4.0.0", - "eslint": "^8.57.0", - "eslint-plugin-node": "^11.1.0", - "eslint-plugin-expect-type": "^0.2.3", - "eslint-plugin-import": "^2.29.0", - "eslint-plugin-jsdoc": "^46.8.2", - "exorcist": "^2.0.0", - "factor-bundle": "^2.5.0", - "gh-pages": "git+https://github.com/Planeshifter/gh-pages.git#main", - "inquirer": "^8.0.0", - "jscodeshift": "^0.15.0", - "jsdoc": "^3.4.0", - "lunr": "^2.3.9", - "mathjax-node": "^2.0.1", - "mathjax-node-sre": "^3.0.0", - "mkdirp": "^0.5.1", - "mustache": "^4.0.0", - "parse-link-header": "^1.0.1", - "plato": "^1.5.0", - "process": "^0.11.10", - "proxyquire": "^2.0.0", - "proxyquire-universal": "^2.0.0", - "proxyquireify": "^3.1.1", - "read-installed": "^4.0.3", - "rehype": "^9.0.0", - "rehype-highlight": "^3.0.0", - "remark": "^11.0.1", - "remark-cli": "^7.0.0", - "remark-frontmatter": "^1.2.0", - "remark-html": "^10.0.0", - "remark-lint": "^6.0.0", - "remark-lint-blockquote-indentation": "^1.0.0", - "remark-lint-checkbox-character-style": "^1.0.0", - "remark-lint-checkbox-content-indent": "^1.0.0", - "remark-lint-code-block-style": "^1.0.0", - "remark-lint-definition-case": "^1.0.0", - "remark-lint-definition-spacing": "^1.0.0", - "remark-lint-emphasis-marker": "^1.0.0", - "remark-lint-fenced-code-flag": "^1.0.0", - "remark-lint-fenced-code-marker": "^1.0.0", - "remark-lint-file-extension": "^1.0.0", - "remark-lint-final-definition": "^1.0.0", - "remark-lint-final-newline": "^1.0.0", - "remark-lint-first-heading-level": "^1.1.0", - "remark-lint-hard-break-spaces": "^1.0.1", - "remark-lint-heading-increment": "^1.0.0", - "remark-lint-heading-style": "^1.0.0", - "remark-lint-linebreak-style": "^1.0.0", - "remark-lint-link-title-style": "^1.0.0", - "remark-lint-list-item-bullet-indent": "^1.0.0", - "remark-lint-list-item-content-indent": "^1.0.0", - "remark-lint-list-item-indent": "^1.0.0", - "remark-lint-list-item-spacing": "^1.1.0", - "remark-lint-maximum-heading-length": "^1.0.0", - "remark-lint-maximum-line-length": "^1.0.0", - "remark-lint-no-auto-link-without-protocol": "^1.0.0", - "remark-lint-no-blockquote-without-marker": "^2.0.0", - "remark-lint-no-consecutive-blank-lines": "^1.0.0", - "remark-lint-no-duplicate-definitions": "^1.0.0", - "remark-lint-no-duplicate-headings": "^1.0.0", - "remark-lint-no-duplicate-headings-in-section": "^1.0.0", - "remark-lint-no-emphasis-as-heading": "^1.0.0", - "remark-lint-no-empty-url": "^1.0.1", - "remark-lint-no-file-name-articles": "^1.0.0", - "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", - "remark-lint-no-file-name-irregular-characters": "^1.0.0", - "remark-lint-no-file-name-mixed-case": "^1.0.0", - "remark-lint-no-file-name-outer-dashes": "^1.0.1", - "remark-lint-no-heading-content-indent": "^1.0.0", - "remark-lint-no-heading-indent": "^1.0.0", - "remark-lint-no-heading-like-paragraph": "^1.0.0", - "remark-lint-no-heading-punctuation": "^1.0.0", - "remark-lint-no-html": "^1.0.0", - "remark-lint-no-inline-padding": "^1.0.0", - "remark-lint-no-literal-urls": "^1.0.0", - "remark-lint-no-missing-blank-lines": "^1.0.0", - "remark-lint-no-multiple-toplevel-headings": "^1.0.0", - "remark-lint-no-paragraph-content-indent": "^1.0.1", - "remark-lint-no-reference-like-url": "^1.0.0", - "remark-lint-no-shell-dollars": "^1.0.0", - "remark-lint-no-shortcut-reference-image": "^1.0.0", - "remark-lint-no-shortcut-reference-link": "^1.0.1", - "remark-lint-no-table-indentation": "^1.0.0", - "remark-lint-no-tabs": "^1.0.0", - "remark-lint-no-undefined-references": "^1.0.0", - "remark-lint-no-unused-definitions": "^1.0.0", - "remark-lint-ordered-list-marker-style": "^1.0.0", - "remark-lint-ordered-list-marker-value": "^1.0.0", - "remark-lint-rule-style": "^1.0.0", - "remark-lint-strong-marker": "^1.0.0", - "remark-lint-table-cell-padding": "^1.0.0", - "remark-lint-table-pipe-alignment": "^1.0.0", - "remark-lint-table-pipes": "^1.0.0", - "remark-lint-unordered-list-marker-style": "^1.0.0", - "remark-slug": "^5.0.0", - "remark-unlink": "^2.0.0", - "remark-validate-links": "^9.0.1", - "remark-vdom": "^8.0.0", - "semver": "^6.0.0", - "source-map-explorer": "^2.5.3", - "spdx-license-ids": "^3.0.0", - "tap-min": "git+https://github.com/Planeshifter/tap-min.git", - "tap-spec": "5.x.x", - "tap-summary": "^4.0.0", - "tap-xunit": "^2.2.0", - "tape": "git+https://github.com/kgryte/tape.git#fix/globby", - "to-vfile": "^6.0.0", - "typedoc": "git+https://github.com/kgryte/typedoc.git#0.16.11-patch", - "typescript": "4.3.5", - "uglify-js": "^3.17.4", - "uglifyify": "^5.0.0", - "unified-lint-rule": "^1.0.1", - "unist-util-visit": "^2.0.0", - "unist-util-visit-parents": "^3.1.1", - "yaml": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0", - "npm": ">2.7.0" - }, - "os": [ - "aix", - "darwin", - "freebsd", - "linux", - "macos", - "openbsd", - "sunos", - "win32", - "windows" - ], - "keywords": [ - "stdlib", - "stdlib-js", - "stdlib.js", - "js-stdlib", - "stdlibjs", - "standard", - "std", - "library", - "lib", - "libstd", - "numerical", - "numeric", - "mathematical", - "mathematics", - "math", - "scientific", - "machine learning", - "machine-learning", - "ml", - "ndarray", - "numpy", - "scipy" - ] -} +{"name":"@stdlib/stdlib","version":"0.0.0"} From 2b74e904c87ceed0f21f68340fcd82ea78be557f Mon Sep 17 00:00:00 2001 From: Muhammad Haris <101793258+headlessNode@users.noreply.github.com> Date: Sun, 15 Dec 2024 15:16:04 +0000 Subject: [PATCH 6/6] fixup! fix: fix unintended changes to package.json --- package.json | 293 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 292 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index f28dee7b431c..0eac59a2fe3e 100644 --- a/package.json +++ b/package.json @@ -1 +1,292 @@ -{"name":"@stdlib/stdlib","version":"0.0.0"} +{ + "name": "@stdlib/stdlib", + "version": "0.3.0", + "description": "Standard library.", + "license": "Apache-2.0 AND BSL-1.0", + "author": { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + }, + "contributors": [ + { + "name": "The Stdlib Authors", + "url": "https://github.com/stdlib-js/stdlib/graphs/contributors" + } + ], + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/stdlib" + }, + "bin": { + "stdlib": "./bin/cli" + }, + "main": "./lib", + "browser": { + "process": "process/" + }, + "directories": { + "doc": "./docs", + "example": "./examples", + "lib": "./lib", + "test": "./test" + }, + "types": "./docs/types", + "scripts": { + "notes": "make notes", + "lint": "make lint", + "repl": "make repl", + "test": "make test", + "test-cov": "make test-cov", + "view-cov": "make view-cov", + "examples": "make examples", + "benchmark": "make benchmark", + "clean": "make clean", + "check-deps": "make check-deps", + "check-licenses": "make check-licenses" + }, + "homepage": "https://github.com/stdlib-js/stdlib", + "repository": { + "type": "git", + "url": "git://github.com/stdlib-js/stdlib.git" + }, + "bugs": { + "url": "https://github.com/stdlib-js/stdlib/issues" + }, + "dependencies": { + "@stdlib/array": "^0.3.1", + "@stdlib/assert": "^0.3.1", + "@stdlib/bench": "^0.4.1", + "@stdlib/bigint": "^0.3.1", + "@stdlib/blas": "^0.3.1", + "@stdlib/boolean": "^0.3.1", + "@stdlib/buffer": "^0.3.1", + "@stdlib/cli": "^0.3.1", + "@stdlib/complex": "^0.3.1", + "@stdlib/console": "^0.3.1", + "@stdlib/constants": "^0.3.1", + "@stdlib/datasets": "^0.3.0", + "@stdlib/error": "^0.3.1", + "@stdlib/fs": "^0.3.1", + "@stdlib/function": "^0.3.1", + "@stdlib/iter": "^0.3.1", + "@stdlib/math": "^0.3.1", + "@stdlib/ml": "^0.3.1", + "@stdlib/namespace": "^0.3.1", + "@stdlib/napi": "^0.3.1", + "@stdlib/ndarray": "^0.3.1", + "@stdlib/net": "^0.3.1", + "@stdlib/nlp": "^0.3.1", + "@stdlib/number": "^0.3.1", + "@stdlib/object": "^0.3.1", + "@stdlib/os": "^0.3.1", + "@stdlib/plot": "^0.3.1", + "@stdlib/process": "^0.3.1", + "@stdlib/proxy": "^0.3.1", + "@stdlib/random": "^0.3.1", + "@stdlib/regexp": "^0.3.1", + "@stdlib/repl": "^0.3.1", + "@stdlib/simulate": "^0.3.1", + "@stdlib/slice": "^0.3.1", + "@stdlib/stats": "^0.3.1", + "@stdlib/streams": "^0.3.1", + "@stdlib/strided": "^0.3.1", + "@stdlib/string": "^0.3.1", + "@stdlib/symbol": "^0.3.1", + "@stdlib/time": "^0.3.1", + "@stdlib/types": "^0.4.1", + "@stdlib/utils": "^0.3.1", + "acorn": "^8.1.0", + "acorn-loose": "^8.0.2", + "acorn-walk": "^8.0.2", + "d3-format": "^1.0.0", + "d3-scale": "^1.0.0", + "d3-shape": "^1.0.0", + "d3-time-format": "^2.0.0", + "debug": "^2.6.9", + "glob": "^7.0.5", + "minimist": "^1.2.0", + "readable-stream": "^2.1.4", + "resolve": "^1.1.7", + "vdom-to-html": "^2.3.0", + "virtual-dom": "^2.1.1" + }, + "optionalDependencies": { + "node-gyp": "^9.3.1" + }, + "devDependencies": { + "0x": "^4.10.2", + "@cspell/eslint-plugin": "^8.8.0", + "@commitlint/cli": "^17.4.4", + "@commitlint/cz-commitlint": "^17.4.4", + "@conventional-commits/parser": "^0.4.1", + "@kaciras/deasync": "^1.0.1", + "@types/node": "^13.9.0", + "@typescript-eslint/parser": "^6.9.1", + "@typescript-eslint/eslint-plugin": "^6.9.1", + "ajv": "^5.2.2", + "browser-pack-flat": "^3.0.0", + "browserify": "^17.0.0", + "bundle-collapser": "^1.3.0", + "c8": "^7.12.0", + "chai": "^3.5.0", + "cheerio": "^1.0.0-rc.12", + "commitizen": "^4.3.0", + "common-shakeify": "^0.6.0", + "conventional-changelog-conventionalcommits": "^5.0.0", + "doctrine": "^3.0.0", + "envify": "^4.0.0", + "eslint": "^8.57.0", + "eslint-plugin-node": "^11.1.0", + "eslint-plugin-expect-type": "^0.2.3", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsdoc": "^46.8.2", + "exorcist": "^2.0.0", + "factor-bundle": "^2.5.0", + "gh-pages": "git+https://github.com/Planeshifter/gh-pages.git#main", + "inquirer": "^8.0.0", + "jscodeshift": "^0.15.0", + "jsdoc": "^3.4.0", + "lunr": "^2.3.9", + "mathjax-node": "^2.0.1", + "mathjax-node-sre": "^3.0.0", + "mkdirp": "^0.5.1", + "mustache": "^4.0.0", + "parse-link-header": "^1.0.1", + "plato": "^1.5.0", + "process": "^0.11.10", + "proxyquire": "^2.0.0", + "proxyquire-universal": "^2.0.0", + "proxyquireify": "^3.1.1", + "read-installed": "^4.0.3", + "rehype": "^9.0.0", + "rehype-highlight": "^3.0.0", + "remark": "^11.0.1", + "remark-cli": "^7.0.0", + "remark-frontmatter": "^1.2.0", + "remark-html": "^10.0.0", + "remark-lint": "^6.0.0", + "remark-lint-blockquote-indentation": "^1.0.0", + "remark-lint-checkbox-character-style": "^1.0.0", + "remark-lint-checkbox-content-indent": "^1.0.0", + "remark-lint-code-block-style": "^1.0.0", + "remark-lint-definition-case": "^1.0.0", + "remark-lint-definition-spacing": "^1.0.0", + "remark-lint-emphasis-marker": "^1.0.0", + "remark-lint-fenced-code-flag": "^1.0.0", + "remark-lint-fenced-code-marker": "^1.0.0", + "remark-lint-file-extension": "^1.0.0", + "remark-lint-final-definition": "^1.0.0", + "remark-lint-final-newline": "^1.0.0", + "remark-lint-first-heading-level": "^1.1.0", + "remark-lint-hard-break-spaces": "^1.0.1", + "remark-lint-heading-increment": "^1.0.0", + "remark-lint-heading-style": "^1.0.0", + "remark-lint-linebreak-style": "^1.0.0", + "remark-lint-link-title-style": "^1.0.0", + "remark-lint-list-item-bullet-indent": "^1.0.0", + "remark-lint-list-item-content-indent": "^1.0.0", + "remark-lint-list-item-indent": "^1.0.0", + "remark-lint-list-item-spacing": "^1.1.0", + "remark-lint-maximum-heading-length": "^1.0.0", + "remark-lint-maximum-line-length": "^1.0.0", + "remark-lint-no-auto-link-without-protocol": "^1.0.0", + "remark-lint-no-blockquote-without-marker": "^2.0.0", + "remark-lint-no-consecutive-blank-lines": "^1.0.0", + "remark-lint-no-duplicate-definitions": "^1.0.0", + "remark-lint-no-duplicate-headings": "^1.0.0", + "remark-lint-no-duplicate-headings-in-section": "^1.0.0", + "remark-lint-no-emphasis-as-heading": "^1.0.0", + "remark-lint-no-empty-url": "^1.0.1", + "remark-lint-no-file-name-articles": "^1.0.0", + "remark-lint-no-file-name-consecutive-dashes": "^1.0.0", + "remark-lint-no-file-name-irregular-characters": "^1.0.0", + "remark-lint-no-file-name-mixed-case": "^1.0.0", + "remark-lint-no-file-name-outer-dashes": "^1.0.1", + "remark-lint-no-heading-content-indent": "^1.0.0", + "remark-lint-no-heading-indent": "^1.0.0", + "remark-lint-no-heading-like-paragraph": "^1.0.0", + "remark-lint-no-heading-punctuation": "^1.0.0", + "remark-lint-no-html": "^1.0.0", + "remark-lint-no-inline-padding": "^1.0.0", + "remark-lint-no-literal-urls": "^1.0.0", + "remark-lint-no-missing-blank-lines": "^1.0.0", + "remark-lint-no-multiple-toplevel-headings": "^1.0.0", + "remark-lint-no-paragraph-content-indent": "^1.0.1", + "remark-lint-no-reference-like-url": "^1.0.0", + "remark-lint-no-shell-dollars": "^1.0.0", + "remark-lint-no-shortcut-reference-image": "^1.0.0", + "remark-lint-no-shortcut-reference-link": "^1.0.1", + "remark-lint-no-table-indentation": "^1.0.0", + "remark-lint-no-tabs": "^1.0.0", + "remark-lint-no-undefined-references": "^1.0.0", + "remark-lint-no-unused-definitions": "^1.0.0", + "remark-lint-ordered-list-marker-style": "^1.0.0", + "remark-lint-ordered-list-marker-value": "^1.0.0", + "remark-lint-rule-style": "^1.0.0", + "remark-lint-strong-marker": "^1.0.0", + "remark-lint-table-cell-padding": "^1.0.0", + "remark-lint-table-pipe-alignment": "^1.0.0", + "remark-lint-table-pipes": "^1.0.0", + "remark-lint-unordered-list-marker-style": "^1.0.0", + "remark-slug": "^5.0.0", + "remark-unlink": "^2.0.0", + "remark-validate-links": "^9.0.1", + "remark-vdom": "^8.0.0", + "semver": "^6.0.0", + "source-map-explorer": "^2.5.3", + "spdx-license-ids": "^3.0.0", + "tap-min": "git+https://github.com/Planeshifter/tap-min.git", + "tap-spec": "5.x.x", + "tap-summary": "^4.0.0", + "tap-xunit": "^2.2.0", + "tape": "git+https://github.com/kgryte/tape.git#fix/globby", + "to-vfile": "^6.0.0", + "typedoc": "git+https://github.com/kgryte/typedoc.git#0.16.11-patch", + "typescript": "4.3.5", + "uglify-js": "^3.17.4", + "uglifyify": "^5.0.0", + "unified-lint-rule": "^1.0.1", + "unist-util-visit": "^2.0.0", + "unist-util-visit-parents": "^3.1.1", + "yaml": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0", + "npm": ">2.7.0" + }, + "os": [ + "aix", + "darwin", + "freebsd", + "linux", + "macos", + "openbsd", + "sunos", + "win32", + "windows" + ], + "keywords": [ + "stdlib", + "stdlib-js", + "stdlib.js", + "js-stdlib", + "stdlibjs", + "standard", + "std", + "library", + "lib", + "libstd", + "numerical", + "numeric", + "mathematical", + "mathematics", + "math", + "scientific", + "machine learning", + "machine-learning", + "ml", + "ndarray", + "numpy", + "scipy" + ] +}