diff --git a/.circleci/config.yml b/.circleci/config.yml index 8f1ec1db..92575c22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -111,12 +111,6 @@ workflows: fetch-mock-ci-cd: jobs: - checkout_code: *triggerable-by-tag - - test: - <<: *triggerable-by-tag - requires: - // because in the monorepo any package that requires another can - // only do so after build - - build - lint: <<: *triggerable-by-tag requires: @@ -125,6 +119,10 @@ workflows: <<: *triggerable-by-tag requires: - checkout_code + - test: + <<: *triggerable-by-tag + requires: + - build - typecheck: <<: *triggerable-by-tag <<: *after-build-lint diff --git a/package.json b/package.json index 4e2f7703..ca99dacc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "fetch-mock-monorepo", - "version": "1.0.0", "description": "Mock http requests made using fetch (or isomorphic-fetch)", + "version": "1.0.0", "type": "module", "repository": { "type": "git", diff --git a/packages/core/package.json b/packages/core/package.json index ea8ec7f1..f12f6d54 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,19 +1,7 @@ { - "author": "Rhys Evans", - "bugs": { - "url": "https://github.com/wheresrhys/fetch-mock/issues" - }, - "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" - }, + "name": "@fetch-mock/core", "description": "Mock http requests made using fetch", - "engines": { - "node": ">=18.0.0" - }, + "version": "0.6.2", "exports": { "browser": "./dist/esm/index.js", "import": { @@ -25,19 +13,20 @@ "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", + "types": "./dist/esm/index.d.ts", + "type": "module", + "engines": { + "node": ">=18.0.0" + }, + "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" + }, "repository": { "directory": "packages/core", "type": "git", @@ -46,7 +35,18 @@ "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.2" + "license": "MIT", + "author": "Rhys Evans", + "bugs": { + "url": "https://github.com/wheresrhys/fetch-mock/issues" + }, + "homepage": "http://www.wheresrhys.co.uk/fetch-mock", + "keywords": [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub" + ] } diff --git a/packages/fetch-mock/package.json b/packages/fetch-mock/package.json index 533081a8..4cda00da 100644 --- a/packages/fetch-mock/package.json +++ b/packages/fetch-mock/package.json @@ -1,19 +1,7 @@ { - "author": "Rhys Evans", - "bugs": { - "url": "https://github.com/wheresrhys/fetch-mock/issues" - }, - "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" - }, + "name": "fetch-mock", "description": "Mock http requests made using fetch", - "engines": { - "node": ">=8.0.0" - }, + "version": "11.1.3", "exports": { "browser": "./dist/esm/index.js", "import": { @@ -25,19 +13,20 @@ "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", + "types": "./dist/esm/types/index.d.ts", + "type": "module", + "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" + }, "peerDependenciesMeta": { "node-fetch": { "optional": true @@ -52,7 +41,18 @@ "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.3" + "license": "MIT", + "author": "Rhys Evans", + "bugs": { + "url": "https://github.com/wheresrhys/fetch-mock/issues" + }, + "homepage": "http://www.wheresrhys.co.uk/fetch-mock", + "keywords": [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub" + ] } diff --git a/packages/fetch-mock/types/index.test-d.ts b/packages/fetch-mock/types/index.test-d.ts index aeb82460..d03e7790 100644 --- a/packages/fetch-mock/types/index.test-d.ts +++ b/packages/fetch-mock/types/index.test-d.ts @@ -113,7 +113,7 @@ lastUrl = fetchMock.lastUrl("http://test.com", "GET"); lastUrl = fetchMock.lastUrl("http://test.com", { method: "GET", }); -let lastOptions: (fetchMock.MockOptions|undefined) = fetchMock.lastOptions(); +let lastOptions: (RequestInit|undefined) = fetchMock.lastOptions(); lastOptions = fetchMock.lastOptions(true); lastOptions = fetchMock.lastOptions("http://test.com"); lastOptions = fetchMock.lastOptions(/https?:\/\/test.com/); diff --git a/packages/vitest/package.json b/packages/vitest/package.json index 831ec6d8..c577649b 100644 --- a/packages/vitest/package.json +++ b/packages/vitest/package.json @@ -1,35 +1,23 @@ { - "author": "", - "bugs": { - "url": "https://github.com/wheresrhys/fetch-mock/issues" - }, - "dependencies": { - "@fetch-mock/core": "^0.6.2" - }, + "name": "@fetch-mock/vitest", "description": "Vitest wrapper for fetch-mock", - "engines": { - "node": ">=18.0.0" - }, + "version": "0.1.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", - "vitest" - ], - "license": "ISC", "main": "./dist/commonjs.js", "module": "./src/index.js", - "name": "@fetch-mock/vitest", + "types": "./types/index.d.ts", + "type": "module", + "engines": { + "node": ">=18.0.0" + }, + "dependencies": { + "@fetch-mock/core": "^0.6.2" + }, "repository": { "directory": "packages/vitest", "type": "git", @@ -38,7 +26,19 @@ "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", - "version": "0.1.0" + "license": "MIT", + "author": "Rhys Evans", + "bugs": { + "url": "https://github.com/wheresrhys/fetch-mock/issues" + }, + "homepage": "http://www.wheresrhys.co.uk/fetch-mock", + "keywords": [ + "fetch", + "http", + "mock", + "testing", + "spy", + "stub", + "vitest" + ] }