Skip to content

Commit

Permalink
Bump prettier from 2.8.8 to 3.4.1 (#18)
Browse files Browse the repository at this point in the history
* Bump prettier from 2.8.8 to 3.4.1

Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.4.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](prettier/prettier@2.8.8...3.4.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* format

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mario Campa <mcampa@gmail.com>
  • Loading branch information
dependabot[bot] and mcampa authored Nov 27, 2024
1 parent 8f34584 commit 887c3ae
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 34 deletions.
4 changes: 2 additions & 2 deletions examples/with-nextjs-appdir/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}
};

module.exports = nextConfig
module.exports = nextConfig;
17 changes: 3 additions & 14 deletions examples/with-nextjs-appdir/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -24,13 +20,6 @@
}
]
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
".next/types/**/*.ts"
],
"exclude": [
"node_modules"
]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
4 changes: 2 additions & 2 deletions examples/with-nextjs/next.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
}
};

module.exports = nextConfig
module.exports = nextConfig;
10 changes: 6 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"test": "tsc --noEmit && jest --verbose",
"lint": "eslint . --ext .ts",
"lint-fix": "eslint . --ext .ts --fix",
"format": "prettier --write ./src ./test ./examples",
"build": "npm test && rimraf dist && npm run build:cjs && npm run build:esm",
"build:cjs": "tsc -p tsconfig.build.cjs.json",
"build:esm": "tsc -p tsconfig.build.esm.json",
Expand Down Expand Up @@ -77,7 +78,7 @@
"next": "^13.4.3",
"node-fetch": "^2.6.11",
"openapi-schema-validator": "^12.1.1",
"prettier": "^2.8.8",
"prettier": "^3.4.1",
"rimraf": "^5.0.1",
"superjson": "^1.12.3",
"ts-jest": "^29.1.0",
Expand Down
3 changes: 0 additions & 3 deletions prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,4 @@ module.exports = {
singleQuote: true,
trailingComma: 'all',
endOfLine: 'lf',
importOrder: ['__', '<THIRD_PARTY_MODULES>', '^[./]'],
importOrderSeparation: true,
importOrderSortSpecifiers: true,
};
2 changes: 0 additions & 2 deletions src/adapters/express.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import {
} from './node-http/core';

export type CreateOpenApiExpressMiddlewareOptions<TRouter extends OpenApiRouter> =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
CreateOpenApiNodeHttpHandlerOptions<TRouter, Request, Response>;

export const createOpenApiExpressMiddleware = <TRouter extends OpenApiRouter>(
Expand Down
2 changes: 1 addition & 1 deletion src/adapters/node-http/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export const createOpenApiNodeHttpHandler = <
...errorShape, // Pass the error through
message: isInputValidationError
? 'Input validation failed'
: errorShape?.message ?? error.message ?? 'An error occurred',
: (errorShape?.message ?? error.message ?? 'An error occurred'),
code: error.code,
issues: isInputValidationError ? (error.cause as ZodError).errors : undefined,
};
Expand Down
6 changes: 3 additions & 3 deletions src/generator/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ export const getResponsesObject = (
schema: instanceofZodTypeKind(schema, z.ZodFirstPartyTypeKind.ZodVoid)
? {}
: instanceofZodTypeKind(schema, z.ZodFirstPartyTypeKind.ZodNever) ||
instanceofZodTypeKind(schema, z.ZodFirstPartyTypeKind.ZodUndefined)
? { not: {} }
: schema,
instanceofZodTypeKind(schema, z.ZodFirstPartyTypeKind.ZodUndefined)
? { not: {} }
: schema,
},
},
},
Expand Down
4 changes: 3 additions & 1 deletion test/adapters/fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,9 @@ describe('fetch adapter', () => {
});

test('with createContext', async () => {
type Context = { id: 1234567890 };
interface Context {
id: 1234567890;
}

const t2 = initTRPC.meta<OpenApiMeta>().context<Context>().create();

Expand Down
4 changes: 3 additions & 1 deletion test/adapters/standalone.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,9 @@ describe('standalone adapter', () => {
});

test('with createContext', async () => {
type Context = { id: 1234567890 };
interface Context {
id: 1234567890;
}

const t2 = initTRPC.meta<OpenApiMeta>().context<Context>().create();

Expand Down

0 comments on commit 887c3ae

Please sign in to comment.