From 4ab78b9429a376230da2ce57bd320031c53f06ef Mon Sep 17 00:00:00 2001 From: Rhys Evans Date: Wed, 28 Aug 2024 19:51:25 +0100 Subject: [PATCH] fix: add missing metadata to package.json files --- packages/core/package.json | 95 ++++++++++++++---------- packages/fetch-mock/package.json | 122 +++++++++++++++++-------------- packages/vitest/LICENSE | 21 ++++++ packages/vitest/package.json | 67 ++++++++++++----- 4 files changed, 192 insertions(+), 113 deletions(-) create mode 100644 packages/vitest/LICENSE diff --git a/packages/core/package.json b/packages/core/package.json index f00ad290..153e5523 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,40 +1,61 @@ { - "name": "@fetch-mock/core", - "description": "Utility for creating mock fetch implementation", - "version": "0.6.1", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "exports": { - "browser": "./dist/esm/index.js", - "import": { - "default": "./dist/esm/index.js", - "types": "./dist/esm/index.d.ts" + "author": "Rhys Evans", + "bugs": + { + "url": "https://github.com/wheresrhys/fetch-mock/issues" }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" - } - }, - "type": "module", - "types": "./dist/esm/index.d.ts", - "scripts": { - "build": "rm -rf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node ../../scripts/declare-dist-type.js" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/wheresrhys/fetch-mock.git" - }, - "author": "", - "license": "ISC", - "bugs": { - "url": "https://github.com/wheresrhys/fetch-mock/issues" - }, - "homepage": "https://github.com/wheresrhys/fetch-mock#readme", - "dependencies": { - "dequal": "^2.0.3", - "glob-to-regexp": "^0.4.1", - "is-subset-of": "^3.1.10", - "regexparam": "^3.0.0", - "@types/glob-to-regexp": "^0.4.4" - } + "dependencies": + { + "@types/glob-to-regexp": "^0.4.4", + "dequal": "^2.0.3", + "glob-to-regexp": "^0.4.1", + "is-subset-of": "^3.1.10", + "regexparam": "^3.0.0" + }, + "description": "Mock http requests made using fetch", + "engines": + { + "node": ">=18.0.0" + }, + "exports": + { + "browser": "./dist/esm/index.js", + "import": + { + "default": "./dist/esm/index.js", + "types": "./dist/esm/index.d.ts" + }, + "require": + { + "default": "./dist/cjs/index.js", + "types": "./dist/cjs/index.d.ts" + } + }, + "homepage": "https://github.com/wheresrhys/fetch-mock#readme", + "keywords": + [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub" + ], + "license": "MIT", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "name": "@fetch-mock/core", + "repository": + { + "directory": "packages/core", + "type": "git", + "url": "git+https://github.com/wheresrhys/fetch-mock.git" + }, + "scripts": + { + "build": "rm -rf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node ../../scripts/declare-dist-type.js" + }, + "type": "module", + "types": "./dist/esm/index.d.ts", + "version": "0.6.1" } diff --git a/packages/fetch-mock/package.json b/packages/fetch-mock/package.json index b24b1859..c3c2e3b2 100644 --- a/packages/fetch-mock/package.json +++ b/packages/fetch-mock/package.json @@ -1,59 +1,69 @@ { - "name": "fetch-mock", - "version": "11.1.2", - "description": "Mock http requests made using fetch (or isomorphic-fetch)", - "main": "./dist/cjs/index.js", - "module": "./dist/esm/index.js", - "exports": { - "browser": "./dist/esm/index.js", - "import": { - "default": "./dist/esm/index.js", - "types": "./dist/esm/types/index.d.ts" + "author": "Rhys Evans", + "bugs": + { + "url": "https://github.com/wheresrhys/fetch-mock/issues" }, - "require": { - "types": "./dist/cjs/types/index.d.ts", - "default": "./dist/cjs/index.js" - } - }, - "types": "./dist/esm/types/index.d.ts", - "type": "module", - "scripts": { - "build": "rm -rf dist && rollup -c --environment FORMAT:cjs && rollup -c --environment FORMAT:esm", - "types:check": "tsd -t types/index.d.ts -f types/index.test-d.ts" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/wheresrhys/fetch-mock.git", - "directory": "packages/fetch-mock" - }, - "keywords": [ - "fetch", - "http", - "mock", - "testing", - "spy", - "xhr", - "ajax" - ], - "author": "Rhys Evans", - "license": "MIT", - "bugs": { - "url": "https://github.com/wheresrhys/fetch-mock/issues" - }, - "homepage": "http://www.wheresrhys.co.uk/fetch-mock", - "dependencies": { - "dequal": "^2.0.3", - "glob-to-regexp": "^0.4.1", - "@types/glob-to-regexp": "^0.4.4", - "is-subset": "^0.1.1", - "regexparam": "^3.0.0" - }, - "peerDependenciesMeta": { - "node-fetch": { - "optional": true - } - }, - "engines": { - "node": ">=8.0.0" - } + "dependencies": + { + "@types/glob-to-regexp": "^0.4.4", + "dequal": "^2.0.3", + "glob-to-regexp": "^0.4.1", + "is-subset": "^0.1.1", + "regexparam": "^3.0.0" + }, + "description": "Mock http requests made using fetch", + "engines": + { + "node": ">=8.0.0" + }, + "exports": + { + "browser": "./dist/esm/index.js", + "import": + { + "default": "./dist/esm/index.js", + "types": "./dist/esm/types/index.d.ts" + }, + "require": + { + "default": "./dist/cjs/index.js", + "types": "./dist/cjs/types/index.d.ts" + } + }, + "homepage": "http://www.wheresrhys.co.uk/fetch-mock", + "keywords": + [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub" + ], + "license": "MIT", + "main": "./dist/cjs/index.js", + "module": "./dist/esm/index.js", + "name": "fetch-mock", + "peerDependenciesMeta": + { + "node-fetch": + { + "optional": true + } + }, + "repository": + { + "directory": "packages/fetch-mock", + "type": "git", + "url": "git+https://github.com/wheresrhys/fetch-mock.git" + }, + "scripts": + { + "build": "rm -rf dist && rollup -c --environment FORMAT:cjs && rollup -c --environment FORMAT:esm", + "types:check": "tsd -t types/index.d.ts -f types/index.test-d.ts" + }, + "type": "module", + "types": "./dist/esm/types/index.d.ts", + "version": "11.1.2" } diff --git a/packages/vitest/LICENSE b/packages/vitest/LICENSE new file mode 100644 index 00000000..3d4d688e --- /dev/null +++ b/packages/vitest/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 Rhys Evans + +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/packages/vitest/package.json b/packages/vitest/package.json index 585d606d..05456da3 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -1,23 +1,50 @@ { - "name": "@fetch-mock/vitest", - "version": "0.1.0", - "description": "Vitest wrapper for fetch-mock", - "main": "./dist/commonjs.js", - "module": "./src/index.js", - "exports": { + "author": "", + "bugs": + { + "url": "https://github.com/wheresrhys/fetch-mock/issues" + }, + "dependencies": + { + "@fetch-mock/core": "^0.6.0" + }, + "description": "Vitest wrapper for fetch-mock", + "engines": + { + "node": ">=18.0.0" + }, + "exports": + { + "browser": "./src/index.js", + "import": "./src/index.js", + "require": "./dist/commonjs.js", + "types": "./types/index.d.ts" + }, + "homepage": "http://www.wheresrhys.co.uk/fetch-mock", + "keywords": + [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub" + ], + "license": "ISC", + "main": "./dist/commonjs.js", + "module": "./src/index.js", + "name": "@fetch-mock/vitest", + "repository": + { + "directory": "packages/vitest", + "type": "git", + "url": "git+https://github.com/wheresrhys/fetch-mock.git" + }, + "scripts": + { + "build": "rm -rf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node ../../scripts/declare-dist-type.js" + }, + "type": "module", "types": "./types/index.d.ts", - "browser": "./src/index.js", - "import": "./src/index.js", - "require": "./dist/commonjs.js" - }, - "types": "./types/index.d.ts", - "scripts": { - "build": "rm -rf dist && tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json && node ../../scripts/declare-dist-type.js" - }, - "type": "module", - "author": "", - "license": "ISC", - "dependencies": { - "@fetch-mock/core": "^0.6.0" - } + "version": "0.1.0" }