-
-
Notifications
You must be signed in to change notification settings - Fork 28
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
chore: update fastify to ^5.0.0 #169
Conversation
@Fdawgs can you take a look at why this is failing? |
Not sure why there is node 10, 16 here? 🚭 Syntax detected in the module is incompatible with the module kind according to the package.json or file extension. This is an error in Node and may cause problems in some bundlers. https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/UnexpectedModuleSyntax.md
┌───────────────────┬──────────────────────────────────┐
│ │ "@fastify/type-provider-typebox" │
├───────────────────┼──────────────────────────────────┤
│ node10 │ 🟢 │
├───────────────────┼──────────────────────────────────┤
│ node16 (from CJS) │ 🚭 Unexpected module syntax │
├───────────────────┼──────────────────────────────────┤
│ node16 (from ESM) │ 🟢 (ESM) │
├───────────────────┼──────────────────────────────────┤
│ bundler │ 🟢 │
└───────────────────┴──────────────────────────────────┘ |
Issue is that the "use strict";
import { TypeCompiler } from '@sinclair/typebox/compiler';
import { Value } from '@sinclair/typebox/value';
export * from '@sinclair/typebox';
export const TypeBoxValidatorCompiler = ({ schema, httpPart }) => {
const typeCheck = TypeCompiler.Compile(schema);
return (value) => {
const converted = httpPart === 'body' ? value : Value.Convert(schema, value);
if (typeCheck.Check(converted)) {
return { value: converted };
}
const errors = [...typeCheck.Errors(converted)];
return {
error: errors.map((error) => ({
message: `${error.message}`,
instancePath: error.path
}))
};
};
}; Since the last successful release on September 4th, TypeScript 5.6 released, so that may have broken it? |
I recommend always use |
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Also after upgrading, we get this warning when running `yarn build` but it can be ignored for now: ``` WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree. You may find that it works just fine, or you may not. SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <5.2.0 YOUR TYPESCRIPT VERSION: 5.6.3 Please only submit bug reports when using the officially supported version. ```
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
) Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com>
) Lock the TypeScript minor version by using `~` instead of `^` in the version specifier, see fastify/fastify-type-provider-typebox#169 (comment). After upgrading, the TypeScript compiler complained that the `long` package has no default export. Related fixes: - Add the latest `long` version as a direct dependency since our code uses it directly; no compilation errors with the latest version - The `long` package exports a `Long` class, so use a capital first letter in the import name to match that Signed-off-by: Harri Lehtola <peruukki@hotmail.com> Signed-off-by: Theodor Mihalache <tmihalac@redhat.com>
See fastify/fastify#5694
Checklist
npm run test
andnpm run benchmark
and the Code of conduct