From 9f058287d4f52c2fa636e3e4cd4de3cfc79233fe Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 7 Nov 2022 21:26:07 -0800 Subject: [PATCH] [meta] fix package.json indentation --- lib/helpers.js | 2 +- lib/support.js | 10 ++- package.json | 190 ++++++++++++++++++++++++------------------------- test/tests.js | 12 ++-- 4 files changed, 106 insertions(+), 108 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index e0eab36..17996c9 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -26,7 +26,7 @@ exports.emptyObject = function () { // eslint-disable-next-line max-params exports.emulateES6construct = function (o, defaultNewTarget, defaultProto, slots) { /* - * This is an es5 approximation to es6 construct semantics. in es6, + * This is an es5 approximation to es6 construct semantics. in es6, * 'new Foo' invokes Foo.[[Construct]] which (for almost all objects) * just sets the internal variable NewTarget (in es6 syntax `new.target`) * to Foo and then returns Foo(). diff --git a/lib/support.js b/lib/support.js index 75c400d..ab14b03 100644 --- a/lib/support.js +++ b/lib/support.js @@ -84,10 +84,8 @@ exports.mapHasOldFirefoxInterface = function () { * In Firefox < 24, Set#entries/keys/values do not exist: https://bugzilla.mozilla.org/show_bug.cgi?id=869996 * In Firefox 24, Map and Set do not implement forEach */ - return ( - typeof Map.prototype.clear !== 'function' || - new Map().size !== 0 || - typeof Map.prototype.keys !== 'function' || - typeof Map.prototype.forEach !== 'function' - ); + return typeof Map.prototype.clear !== 'function' + || new Map().size !== 0 + || typeof Map.prototype.keys !== 'function' + || typeof Map.prototype.forEach !== 'function'; }; diff --git a/package.json b/package.json index 82692a9..83a0906 100644 --- a/package.json +++ b/package.json @@ -1,97 +1,97 @@ { - "name": "es-map", - "version": "0.0.0", - "description": "An ES-spec-compliant Map shim/polyfill/replacement that works as far down as ES3", - "main": "index.js", - "exports": { - ".": [ - { - "import": "./index.mjs", - "require": "./index.js", - "default": "./index.js" - }, - "./index.js" - ], - "./auto": "./auto.js", - "./polyfill": "./polyfill.js", - "./implementation": "./implementation.js", - "./shim": "./shim.js", - "./package.json": "./package.json" - }, - "scripts": { - "prepack": "npmignore --auto --commentLines=autogenerated", - "prepublishOnly": "safe-publish-latest", - "prepublish": "not-in-publish || npm run prepublishOnly", - "pretest": "npm run lint", - "lint": "eslint --ext=js,mjs .", - "postlint": "es-shim-api --bound", - "tests-only": "nyc tape 'test/**/*.js'", - "tests-esm": "nyc node test/index.mjs", - "test": "npm run tests-only && npm run tests-esm", - "posttest": "aud --production", - "version": "auto-changelog && git add CHANGELOG.md", - "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/es-shims/es-map.git" - }, - "keywords": [ - "Set", - "Map", - "collections", - "shim", - "polyfill", - "es-shim", - "API" - ], - "author": "Nicolò Ribaudo ", - "funding": { - "url": "https://github.com/es-shims/es-map?sponsor=1" - }, - "license": "MIT", - "bugs": { - "url": "https://github.com/es-shims/es-map/issues" - }, - "homepage": "https://github.com/es-shims/es-map#readme", - "devDependencies": { - "@es-shims/api": "^2.2.3", - "@ljharb/eslint-config": "^21.0.0", - "array.from": "^1.1.3", - "aud": "^2.0.1", - "auto-changelog": "^2.4.0", - "eslint": "=8.8.0", - "functions-have-names": "^1.2.3", - "has-strict-mode": "^1.0.1", - "in-publish": "^2.0.1", - "npmignore": "^0.3.0", - "nyc": "^10.3.2", - "safe-publish-latest": "^2.0.0", - "tape": "^5.6.1" - }, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1", - "es-get-iterator": "^1.1.2", - "for-each": "^0.3.3", - "get-intrinsic": "^1.1.1", - "globalthis": "^1.0.2", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "object.entries": "^1.1.5" - }, - "auto-changelog": { - "output": "CHANGELOG.md", - "template": "keepachangelog", - "unreleased": false, - "commitLimit": false, - "backfillLimit": false, - "hideCredit": true - }, - "publishConfig": { - "ignore": [ - ".github/workflows" - ] - } + "name": "es-map", + "version": "0.0.0", + "description": "An ES-spec-compliant Map shim/polyfill/replacement that works as far down as ES3", + "main": "index.js", + "exports": { + ".": [ + { + "import": "./index.mjs", + "require": "./index.js", + "default": "./index.js" + }, + "./index.js" + ], + "./auto": "./auto.js", + "./polyfill": "./polyfill.js", + "./implementation": "./implementation.js", + "./shim": "./shim.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated", + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "pretest": "npm run lint", + "lint": "eslint --ext=js,mjs .", + "postlint": "es-shim-api --bound", + "tests-only": "nyc tape 'test/**/*.js'", + "tests-esm": "nyc node test/index.mjs", + "test": "npm run tests-only && npm run tests-esm", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/es-shims/es-map.git" + }, + "keywords": [ + "Set", + "Map", + "collections", + "shim", + "polyfill", + "es-shim", + "API" + ], + "author": "Nicolò Ribaudo ", + "funding": { + "url": "https://github.com/es-shims/es-map?sponsor=1" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/es-shims/es-map/issues" + }, + "homepage": "https://github.com/es-shims/es-map#readme", + "devDependencies": { + "@es-shims/api": "^2.2.3", + "@ljharb/eslint-config": "^21.0.0", + "array.from": "^1.1.3", + "aud": "^2.0.1", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "functions-have-names": "^1.2.3", + "has-strict-mode": "^1.0.1", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.6.1" + }, + "dependencies": { + "call-bind": "^1.0.2", + "define-properties": "^1.1.3", + "es-abstract": "^1.19.1", + "es-get-iterator": "^1.1.2", + "for-each": "^0.3.3", + "get-intrinsic": "^1.1.1", + "globalthis": "^1.0.2", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "object.entries": "^1.1.5" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] + } } diff --git a/test/tests.js b/test/tests.js index 4982ecb..a37388a 100644 --- a/test/tests.js +++ b/test/tests.js @@ -636,12 +636,12 @@ module.exports = function runTests(Map, t) { }); /* - * Disabled since we don't have Set here - * t.test('MapIterator identification test prototype inequality', { skip: !Object.getPrototypeOf }, function (st) { - * var mapEntriesProto = Object.getPrototypeOf(new Map().entries()); - * var setEntriesProto = Object.getPrototypeOf(new Set().entries()); - * st.notEqual(mapEntriesProto, setEntriesProto); - * }); + * Disabled since we don't have Set here + * t.test('MapIterator identification test prototype inequality', { skip: !Object.getPrototypeOf }, function (st) { + * var mapEntriesProto = Object.getPrototypeOf(new Map().entries()); + * var setEntriesProto = Object.getPrototypeOf(new Set().entries()); + * st.notEqual(mapEntriesProto, setEntriesProto); + * }); */ t.test('MapIterator identification', function (st) {