Skip to content

Update deps #1484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/friendly-turtles-count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"openapi-fetch": patch
---

Remove prepare script
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"update-contributors": "node scripts/update-contributors.js"
},
"devDependencies": {
"vitepress": "1.0.0-rc.28"
"vitepress": "1.0.0-rc.31"
}
}
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,34 @@
"email": "[email protected]"
},
"scripts": {
"build": "run-p -s build:*",
"build": "run-s -s build:*",
"build:openapi-typescript": "cd packages/openapi-typescript && pnpm run build",
"build:openapi-fetch": "cd packages/openapi-typescript-helpers && pnpm run build && cd ../openapi-fetch && pnpm run build",
"build:openapi-typescript-helpers": "cd packages/openapi-typescript-helpers && pnpm run build",
"build:openapi-fetch": "cd packages/openapi-fetch && pnpm run build",
"lint": "run-p -s lint:*",
"lint:openapi-typescript": "cd packages/openapi-typescript && pnpm run lint",
"lint:openapi-typescript-helpers": "cd packages/openapi-typescript-helpers && pnpm run lint",
"lint:openapi-fetch": "cd packages/openapi-fetch && pnpm run lint",
"test": "run-p -s test:*",
"test": "pnpm run build && run-p test:*",
"test:openapi-typescript": "cd packages/openapi-typescript && pnpm test",
"test:openapi-typescript-helpers": "cd packages/openapi-typescript-helpers && pnpm test",
"test:openapi-fetch": "cd packages/openapi-fetch && pnpm test",
"version": "pnpm run build && changeset version && pnpm i"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.2",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@changesets/cli": "^2.27.1",
"@typescript-eslint/eslint-plugin": "^6.14.0",
"@typescript-eslint/parser": "^6.14.0",
"del-cli": "^5.1.0",
"eslint": "^8.54.0",
"eslint-config-prettier": "^9.0.0",
"eslint": "^8.55.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.0",
"eslint-plugin-no-only-tests": "^3.1.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vitest": "^0.2.8",
"npm-run-all": "^4.1.5",
"prettier": "^3.1.0",
"typescript": "^5.3.2"
"prettier": "^3.1.1",
"typescript": "^5.3.3"
}
}
5 changes: 2 additions & 3 deletions packages/openapi-fetch/examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"prepare": "openapi-typescript lib/api/v1.json -o lib/api/v1.d.ts"
"dev": "next dev"
},
"dependencies": {
"next": "14.0.1",
Expand All @@ -17,6 +16,6 @@
"@types/react": "18.2.20",
"@types/react-dom": "18.2.7",
"openapi-typescript": "workspace:^",
"typescript": "5.3.2"
"typescript": "5.3.3"
}
}
11 changes: 5 additions & 6 deletions packages/openapi-fetch/examples/react-query/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
"private": true,
"type": "module",
"scripts": {
"dev": "vite dev",
"prepare": "openapi-typescript src/lib/api/v1.json -o src/lib/api/v1.d.ts"
"dev": "vite dev"
},
"dependencies": {
"@tanstack/react-query": "^4.35.0",
"@tanstack/react-query": "^5.13.4",
"openapi-fetch": "workspace:^",
"openapi-typescript": "workspace:^",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@vitejs/plugin-react-swc": "^3.3.2",
"typescript": "^5.3.2",
"vite": "^4.4.9"
"@vitejs/plugin-react-swc": "^3.5.0",
"typescript": "^5.3.3",
"vite": "^5.0.8"
}
}
15 changes: 7 additions & 8 deletions packages/openapi-fetch/examples/sveltekit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@
"scripts": {
"dev": "vite dev",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"prepare": "openapi-typescript src/lib/api/v1.json -o src/lib/api/v1.d.ts"
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
},
"dependencies": {
"openapi-fetch": "workspace:^",
"openapi-typescript": "workspace:^"
},
"devDependencies": {
"@sveltejs/adapter-auto": "^2.1.0",
"@sveltejs/kit": "^1.24.1",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"@sveltejs/adapter-auto": "^2.1.1",
"@sveltejs/kit": "^1.30.2",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"tslib": "^2.6.2",
"typescript": "^5.3.2",
"vite": "^4.4.9"
"typescript": "^5.3.3",
"vite": "^5.0.8"
}
}
17 changes: 9 additions & 8 deletions packages/openapi-fetch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,26 +55,27 @@
"lint": "pnpm run lint:js",
"lint:js": "eslint \"{src,test}/**/*.{js,ts}\"",
"lint:prettier": "prettier --check \"{src,test}/**/*\"",
"test": "pnpm run test:ts && npm run test:js",
"generate-types": "cd ../openapi-typescript && pnpm run build && cd ../openapi-fetch ../openapi-typescript/bin/cli.js ./test/fixtures/api.yaml -o ./test/fixtures/v7-beta.test.ts && npx openapi-typescript ./test/fixtures/api.yaml -o ./test/fixtures/api.d.ts",
"pretest": "pnpm run generate-types",
"test": "run-p -s test:*",
"test:js": "vitest run",
"test:ts": "tsc --noEmit",
"prepare": "openapi-typescript test/fixtures/api.yaml -o test/fixtures/api.d.ts",
"prepublish": "pnpm run prepare && pnpm run build",
"version": "pnpm run prepare && pnpm run build"
},
"dependencies": {
"openapi-typescript-helpers": "^0.0.6"
},
"devDependencies": {
"axios": "^1.6.0",
"axios": "^1.6.2",
"del-cli": "^5.1.0",
"esbuild": "^0.19.5",
"nanostores": "^0.9.4",
"openapi-typescript": "^6.7.0",
"esbuild": "^0.19.9",
"nanostores": "^0.9.5",
"npm-run-all": "^4.1.5",
"openapi-typescript": "^6.7.2",
"openapi-typescript-codegen": "^0.25.0",
"openapi-typescript-fetch": "^1.1.3",
"superagent": "^8.1.2",
"typescript": "^5.3.2",
"typescript": "^5.3.3",
"vitest": "^0.34.6",
"vitest-fetch-mock": "^0.2.2"
}
Expand Down
5 changes: 2 additions & 3 deletions packages/openapi-typescript-helpers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@
"url": "https://github.com/drwpow/openapi-typescript/issues"
},
"scripts": {
"build": "pnpm run build:clean && pnpm run build:js && pnpm run build:cjs",
"build": "pnpm run build:clean && pnpm run build:js",
"build:clean": "del dist",
"build:js": "mkdir -p dist && cp index.js index.d.ts dist",
"build:cjs": "mkdir -p dist/cjs && cp index.js dist/cjs/index.js && cp index.d.ts dist/cjs/index.d.cts",
"build:js": "node ./scripts/build.js",
"lint": "pnpm run lint:js",
"lint:js": "eslint \"*.{js,ts}\"",
"lint:prettier": "prettier --check \"{src,test}/**/*\"",
Expand Down
32 changes: 32 additions & 0 deletions packages/openapi-typescript-helpers/scripts/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/**
* Build
* Only copies files & makes folders, but works on Windows too
*/
import fs from "node:fs";

const cwd = new URL("../", import.meta.url);

fs.mkdirSync(new URL("./dist/cjs/", cwd), { recursive: true });

const files = [
{
in: new URL("./index.js", cwd),
out: new URL("./dist/index.js", cwd),
},
{
in: new URL("./index.d.ts", cwd),
out: new URL("./dist/index.d.ts", cwd),
},
{
in: new URL("./index.js", cwd),
out: new URL("./dist/cjs/index.cjs", cwd),
},
{
in: new URL("./index.d.ts", cwd),
out: new URL("./dist/cjs/index.d.cts", cwd),
},
];

for (const f of files) {
fs.copyFileSync(f.in, f.out);
}
11 changes: 5 additions & 6 deletions packages/openapi-typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
"lint": "run-p -s lint:*",
"lint:js": "eslint \"{src,test}/**/*.{js,ts}\"",
"lint:prettier": "prettier --check \"src/**/*\"",
"prepare": "pnpm run build",
"test": "run-p -s test:*",
"test:examples": "tsc -p tsconfig.examples.json --noEmit",
"test:js": "vitest run",
Expand All @@ -60,21 +59,21 @@
"version": "pnpm run build"
},
"dependencies": {
"@redocly/openapi-core": "^1.4.1",
"@redocly/openapi-core": "^1.5.0",
"ansi-colors": "^4.1.3",
"supports-color": "^9.4.0",
"typescript": "^5.3.2",
"typescript": "^5.3.3",
"yargs-parser": "^21.1.1"
},
"devDependencies": {
"@types/degit": "^2.8.6",
"@types/js-yaml": "^4.0.9",
"@types/node": "^20.9.4",
"@types/node": "^20.10.4",
"degit": "^2.8.4",
"del-cli": "^5.1.0",
"esbuild": "^0.19.7",
"esbuild": "^0.19.9",
"execa": "^7.2.0",
"vite-node": "^0.34.6",
"vite-node": "^1.0.4",
"vitest": "^0.34.6"
}
}
Loading