Skip to content
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

feat: release 1.12.0 finalization #98

Merged
merged 23 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
df39b51
chore(changesets): exit pre
radist2s Jun 30, 2024
1e787da
RELEASING: Releasing 5 package(s)
radist2s Jun 30, 2024
c626a11
chore(changesets): remove pre
radist2s Jun 30, 2024
869c4b7
chore(changesets): Added CommonJS distribution support
radist2s Jun 30, 2024
fa8e8e7
chore(changesets): enter pre
radist2s Jun 30, 2024
cdb7094
revert(react-client): add `callbacks/index.ts` as an entrypoint to bu…
radist2s Jun 30, 2024
bc4c731
Revert "feature: add `Unstable_QraftSecureRequestFn` to index.ts"
radist2s Jun 30, 2024
58e42d2
chore(react-client): use types distribution with a fallback
radist2s Jun 30, 2024
c7db6e9
chore(react-client): remove `tsup.config.ts`
radist2s Jun 30, 2024
25ebc31
chore(react-client): update shared `rollup.config.ts`
radist2s Jun 30, 2024
7c9a21a
fixup! revert(react-client): add `@openapi-qraft/react/callbacks/inde…
radist2s Jun 30, 2024
82dc5a4
refactor(e2e): scripts formatting
radist2s Jun 30, 2024
5c8bf99
chore(e2e): rename `typescript-esm-node-next` to `typescript-nodenext…
radist2s Jun 30, 2024
6fcf9b9
chore(e2e): add extra tests to `typescript-commonjs-node`
radist2s Jun 30, 2024
1e63991
chore(e2e): add `typescript-es2015-bundler` test
radist2s Jun 30, 2024
9cd9909
docs(changeset): Added CommonJS distribution support.
radist2s Jun 30, 2024
c638ec6
chore: update expects.txt
radist2s Jun 30, 2024
dba74f6
refactor(react-client): simplify type exports with grouped export
radist2s Jun 30, 2024
7cd1a1c
chore: update package.json excluded "files"
radist2s Jul 1, 2024
c3d7cef
docs(plugin): add `--operation-predefined-parameters` documentation
radist2s Jul 4, 2024
d4bc3af
docs(changeset): Added new CLI option `--operation-predefined-paramet…
radist2s Jul 4, 2024
247b971
RELEASING: Releasing 5 package(s)
radist2s Jul 4, 2024
89e097d
chore: replace `workspace:~`(eg: ~3.2.1) with `workspace:*` (eg: =3.2…
radist2s Jul 4, 2024
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/cool-cheetahs-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@openapi-qraft/plugin": minor
---

Added new CLI option `--operation-predefined-parameters` to allow setting default parameters across multiple endpoints.
5 changes: 0 additions & 5 deletions .changeset/early-peas-allow.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/friendly-schools-learn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lovely-berries-invite.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/mean-pianos-laugh.md

This file was deleted.

23 changes: 9 additions & 14 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,25 +3,20 @@
"tag": "beta",
"initialVersions": {
"@openapi-qraft/e2e": "1.0.0",
"@openapi-qraft/cli": "1.10.1",
"@openapi-qraft/cli": "1.11.0",
"@openapi-qraft/eslint-config": "1.0.0",
"@openapi-qraft/openapi-typescript-plugin": "1.0.3",
"@openapi-qraft/plugin": "1.10.1",
"@openapi-qraft/react": "1.10.1",
"@openapi-qraft/tanstack-query-react-plugin": "1.10.1",
"@openapi-qraft/openapi-typescript-plugin": "1.0.4",
"@openapi-qraft/plugin": "1.11.0",
"@openapi-qraft/react": "1.11.0",
"@openapi-qraft/rollup-config": "1.0.0",
"@openapi-qraft/tanstack-query-react-plugin": "1.11.0",
"@openapi-qraft/test-fixtures": "1.0.0",
"playground": "0.0.14",
"openapi-qraft-website": "0.0.0",
"@openapi-qraft/rollup-config": "1.0.0"
"openapi-qraft-website": "0.0.0"
},
"changesets": [
"early-peas-allow",
"friendly-schools-learn",
"cool-cheetahs-lie",
"khaki-carrots-impress",
"lovely-berries-invite",
"mean-pianos-laugh",
"seven-buttons-chew",
"tricky-beans-search",
"twenty-starfishes-rhyme"
"warm-singers-divide"
]
}
5 changes: 0 additions & 5 deletions .changeset/seven-buttons-chew.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tricky-beans-search.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/twenty-starfishes-rhyme.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/warm-singers-divide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@openapi-qraft/react': minor
'@openapi-qraft/tanstack-query-react-plugin': minor
---

Added CommonJS distribution support and various module resolution types.
24 changes: 10 additions & 14 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ bnpx
bytesin
camelcase
classname
CLIs
clsx
codegen
csr
dracula
emoji
fddbf
firefox
Firefox
gitlab
groupnames
htpasswd
Expand All @@ -23,6 +22,7 @@ INADDR
linkcheck
linting
maxdepth
memfs
middlewares
mindepth
mktemp
Expand All @@ -33,12 +33,14 @@ nodenext
npmjs
ntvs
openapi
OpenAPITSOptions
ordercer
petstore
pgrep
pids
QMethod
qraft
qraftio
redoc
redocly
refetched
Expand All @@ -50,22 +52,27 @@ srv
ssr
suo
swc
swcrc
tagline
tanstack
tarball
TCombined
TContext
TData
TInfinite
TMeta
TMutation
TOptions
TPage
TParams
TQuery
treeshake
TResult
TSchema
tseslint
TSignal
TVariables
TOptions
typecheck
typesafe
Unpublishing
usernames
Expand All @@ -75,14 +82,3 @@ website
workaround
workflows
workspaces
TInfinite
qraftio
typecheck
tseslint
memfs
OpenAPITSOptions
tsup
dts
eql
swcrc
treeshake
6 changes: 3 additions & 3 deletions e2e/projects/typescript-commonjs-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"build": "tsc",
"codegen": "openapi-qraft --plugin tanstack-query-react --plugin openapi-typescript https://raw.githubusercontent.com/swagger-api/swagger-petstore/7767363b841961221a38c0be9c6b1066a5120051/src/main/resources/openapi.yaml --clean -o src/api --openapi-types-import-path '../schema.d.ts' --openapi-types-file-name schema.d.ts",
"e2e:pre-build": "npm run codegen",
"e2e:post-build": " node ./dist/index.js"
"e2e:post-build": "node ./dist/index.js"
},
"dependencies": {
"typescript": "latest",
"@openapi-qraft/cli": "latest",
"@openapi-qraft/react": "latest",
"@types/node": "latest"
"@types/node": "latest",
"typescript": "latest"
},
"repository": {
"type": "git",
Expand Down
47 changes: 47 additions & 0 deletions e2e/projects/typescript-commonjs-node/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import * as callbacks from '@openapi-qraft/react/callbacks/index';
import { useMutation } from '@openapi-qraft/react/callbacks/useMutation';
import { useQuery } from '@openapi-qraft/react/callbacks/useQuery';
import {
QraftSecureRequestFn,
createSecureRequestFn,
} from '@openapi-qraft/react/Unstable_QraftSecureRequestFn';

import { createAPIClient as createAPIClientMjs } from './api';

if (typeof createAPIClientMjs !== 'undefined') {
Expand All @@ -6,3 +14,42 @@ if (typeof createAPIClientMjs !== 'undefined') {
console.error('Client is not imported from esm project.');
process.exit(1);
}

if (typeof callbacks !== 'undefined') {
console.log('Callbacks are imported successfully from esm project.');
} else {
console.error('Callbacks are not imported from esm project.');
process.exit(1);
}

if (typeof useMutation !== 'undefined') {
console.log('useMutation is imported successfully from esm project.');
} else {
console.error('useMutation is not imported from esm project.');
process.exit(1);
}

if (typeof useQuery !== 'undefined') {
console.log('useQuery is imported successfully from esm project.');
} else {
console.error('useQuery is not imported from esm project.');
process.exit(1);
}

if (typeof createSecureRequestFn !== 'undefined') {
console.log(
'createSecureRequestFn is imported successfully from esm project.'
);
} else {
console.error('createSecureRequestFn is not imported from esm project.');
process.exit(1);
}

if (typeof QraftSecureRequestFn !== 'undefined') {
console.log(
'QraftSecureRequestFn is imported successfully from esm project.'
);
} else {
console.error('QraftSecureRequestFn is not imported from esm project.');
process.exit(1);
}
23 changes: 23 additions & 0 deletions e2e/projects/typescript-es2015-bundler/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "typescript-es2015-bundler",
"private": true,
"version": "1.0.0",
"description": "",
"type": "module",
"scripts": {
"build": "tsc",
"codegen": "openapi-qraft --plugin tanstack-query-react --plugin openapi-typescript https://raw.githubusercontent.com/swagger-api/swagger-petstore/7767363b841961221a38c0be9c6b1066a5120051/src/main/resources/openapi.yaml --clean -o src/api --openapi-types-import-path '../schema.d.ts' --openapi-types-file-name schema.d.ts",
"e2e:pre-build": "npm run codegen",
"e2e:post-build": "echo 'No post-build action'"
},
"dependencies": {
"@openapi-qraft/cli": "latest",
"@openapi-qraft/react": "latest",
"@types/node": "latest",
"typescript": "latest"
},
"repository": {
"type": "git",
"url": "https://github.com/OpenAPI-Qraft/openapi-qraft.git"
}
}
28 changes: 28 additions & 0 deletions e2e/projects/typescript-es2015-bundler/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { requestFn } from '@openapi-qraft/react';
import { operationInvokeFn } from '@openapi-qraft/react/callbacks/operationInvokeFn';
import {
QraftSecureRequestFn,
createSecureRequestFn,
} from '@openapi-qraft/react/Unstable_QraftSecureRequestFn';
import { QueryClient } from '@tanstack/query-core';
import { qraftAPIClient, QraftClientOptions } from "@openapi-qraft/react";
import { services, Services } from "./api/services/index";

import { createAPIClient } from './api/index';

QraftSecureRequestFn({
requestFn: createSecureRequestFn({}, requestFn, new QueryClient()),
queryClient: new QueryClient(),
securitySchemes: {},
children: (securedRequestFn) => null,
});

createAPIClient({})

const nodeCallbacks = {
operationInvokeFn: operationInvokeFn
}

export function createNodeAPIClient(options?: QraftClientOptions): Services {
return qraftAPIClient<Services, typeof nodeCallbacks>(services, nodeCallbacks, options);
}
13 changes: 13 additions & 0 deletions e2e/projects/typescript-es2015-bundler/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"compilerOptions": {
"outDir": "./dist",
"rootDir": "./src",
"target": "es2016",
"module": "es2015",
"moduleResolution": "Bundler",
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
}
8 changes: 0 additions & 8 deletions e2e/projects/typescript-esm-node-next/src/index.ts

This file was deleted.

3 changes: 3 additions & 0 deletions e2e/projects/typescript-nodenext-nodenext/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/package-lock.json
node_modules
/src/api
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "typescript-esm-node-next",
"name": "typescript-nodenext-nodenext",
"private": true,
"version": "1.0.0",
"description": "",
Expand All @@ -9,13 +9,13 @@
"build": "tsc",
"codegen": "openapi-qraft --plugin tanstack-query-react --plugin openapi-typescript https://raw.githubusercontent.com/swagger-api/swagger-petstore/7767363b841961221a38c0be9c6b1066a5120051/src/main/resources/openapi.yaml --clean -o src/api --openapi-types-import-path '../schema.d.ts' --explicit-import-extensions --openapi-types-file-name schema.d.ts",
"e2e:pre-build": "npm run codegen",
"e2e:post-build": " node ./dist/index.js"
"e2e:post-build": "node ./dist/index.js"
},
"dependencies": {
"typescript": "latest",
"@openapi-qraft/cli": "latest",
"@openapi-qraft/react": "latest",
"@types/node": "latest"
"@types/node": "latest",
"typescript": "latest"
},
"repository": {
"type": "git",
Expand Down
Loading
Loading