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

Drop cjs support #2834

Merged
merged 4 commits into from
Sep 18, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Configuration} from "@tsed/di";
import "./mappers/MomentMapper"; // just import mapper to be available
import "./mappers/MomentMapper.js"; // just import mapper to be available

@Configuration({})
export class Server {}
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsed/docs",
"version": "8.0.0-alpha.4",
"version": "8.0.0-alpha.5",
"description": "Documentation Ts.ED",
"private": true,
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/snippets/graphql/server-configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Configuration} from "@tsed/di";
import "@tsed/platform-express";
import "@tsed/typegraphql";
import "./resolvers/index"; // barrel file with all resolvers
import "./resolvers/index.js"; // barrel file with all resolvers

@Configuration({
typegraphql: {
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/snippets/passport/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import session from "express-session";
import methodOverride from "method-override";

// import your protocol. Ts.ED will discover it automatically
import "./protocols/LoginLocalProtocol";
import "./protocols/LoginLocalProtocol.js";

@Configuration({
passport: {
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"packages/utils/*",
"docs"
],
"version": "8.0.0-alpha.4",
"version": "8.0.0-alpha.5",
"command": {
"bootstrap": {
"npmClientArgs": [
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tsed/root",
"version": "8.0.0-alpha.4",
"version": "8.0.0-alpha.5",
"description": "A TypeScript Framework on top of Express",
"private": true,
"author": "Romain Lenzotti",
Expand Down Expand Up @@ -100,7 +100,7 @@
],
"dependencies": {
"@tsed/logger": ">=6.7.5",
"ajv": "8.12.0",
"ajv": "8.17.1",
"axios": "1.7.4",
"change-case": "4.1.2",
"globby": "11.1.0",
Expand Down
7 changes: 3 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@tsed/core",
"description": "Core module for Ts.ED Framework",
"type": "commonjs",
"version": "8.0.0-alpha.4",
"type": "module",
"version": "8.0.0-alpha.5",
"source": "./src/index.ts",
"main": "./lib/cjs/index.js",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/core.umd.min.js",
Expand All @@ -13,7 +13,6 @@
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/core.umd.min.js",
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/cjs/index.js"
}
},
Expand Down
28 changes: 0 additions & 28 deletions packages/core/tsconfig.cjs.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/core/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"rootDir": "src",
"outDir": "./lib/esm",
"declarationDir": "./lib/types-esm",
"declarationDir": "./lib/types",
"declaration": true,
"composite": true,
"noEmit": false
Expand Down
3 changes: 0 additions & 3 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
},
"include": [],
"references": [
{
"path": "./tsconfig.cjs.json"
},
{
"path": "./tsconfig.esm.json"
},
Expand Down
File renamed without changes.
13 changes: 6 additions & 7 deletions packages/di/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
{
"name": "@tsed/di",
"description": "DI module for Ts.ED Framework",
"type": "commonjs",
"version": "8.0.0-alpha.4",
"type": "module",
"version": "8.0.0-alpha.5",
"source": "./src/index.ts",
"main": "lib/esm/index.js",
"module": "lib/esm/index.js",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"browser": "./lib/browser/di.umd.min.js",
"exports": {
".": {
"types": "./lib/types/index.d.ts",
"browser": "./lib/browser/di.umd.min.js",
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/cjs/index.js"
}
},
Expand Down Expand Up @@ -42,9 +41,9 @@
"webpack": "^5.75.0"
},
"peerDependencies": {
"@tsed/core": "8.0.0-alpha.4",
"@tsed/core": "8.0.0-alpha.5",
"@tsed/logger": ">=6.7.5",
"@tsed/schema": "8.0.0-alpha.4"
"@tsed/schema": "8.0.0-alpha.5"
},
"peerDependenciesMeta": {
"@tsed/core": {
Expand Down
28 changes: 0 additions & 28 deletions packages/di/tsconfig.cjs.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/di/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"rootDir": "src",
"outDir": "./lib/esm",
"declarationDir": "./lib/types-esm",
"declarationDir": "./lib/types",
"declaration": true,
"composite": true,
"noEmit": false
Expand Down
3 changes: 0 additions & 3 deletions packages/di/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
{
"path": "../specs/schema/tsconfig.json"
},
{
"path": "./tsconfig.cjs.json"
},
{
"path": "./tsconfig.esm.json"
},
Expand Down
File renamed without changes.
7 changes: 3 additions & 4 deletions packages/engines/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"name": "@tsed/engines",
"description": "Template engines library. Provide an API to adding custom engines from decorators.",
"type": "commonjs",
"version": "8.0.0-alpha.4",
"type": "module",
"version": "8.0.0-alpha.5",
"source": "./src/index.ts",
"main": "./lib/cjs/index.js",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"exports": {
".": {
"types": "./lib/types/index.d.ts",
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/cjs/index.js"
}
},
Expand Down
28 changes: 0 additions & 28 deletions packages/engines/tsconfig.cjs.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/engines/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"rootDir": "src",
"outDir": "./lib/esm",
"declarationDir": "./lib/types-esm",
"declarationDir": "./lib/types",
"declaration": true,
"composite": true,
"noEmit": false
Expand Down
3 changes: 0 additions & 3 deletions packages/engines/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
},
"include": [],
"references": [
{
"path": "./tsconfig.cjs.json"
},
{
"path": "./tsconfig.esm.json"
},
Expand Down
13 changes: 6 additions & 7 deletions packages/graphql/apollo/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"name": "@tsed/apollo",
"description": "Apollo package for Ts.ED framework",
"type": "commonjs",
"version": "8.0.0-alpha.4",
"type": "module",
"version": "8.0.0-alpha.5",
"source": "./src/index.ts",
"main": "./lib/cjs/index.js",
"main": "./lib/esm/index.js",
"module": "./lib/esm/index.js",
"typings": "./lib/types/index.d.ts",
"exports": {
".": {
"types": "./lib/types/index.d.ts",
"import": "./lib/esm/index.js",
"require": "./lib/cjs/index.js",
"default": "./lib/cjs/index.js"
}
},
Expand Down Expand Up @@ -44,9 +43,9 @@
},
"peerDependencies": {
"@apollo/server": ">=4.10.4",
"@tsed/common": "8.0.0-alpha.4",
"@tsed/core": "8.0.0-alpha.4",
"@tsed/di": "8.0.0-alpha.4",
"@tsed/common": "8.0.0-alpha.5",
"@tsed/core": "8.0.0-alpha.5",
"@tsed/di": "8.0.0-alpha.5",
"@tsed/logger": ">=6.7.5",
"graphql": ">16.0.0"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {DecoratorParameters, decoratorTypeOf, DecoratorTypes} from "@tsed/core";
import {Inject, InjectContext} from "@tsed/di";
import {APOLLO_CONTEXT} from "../constants/constants";
import {APOLLO_CONTEXT} from "../constants/constants.js";

/**
* Inject the Apollo context in the decorated property.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {PlatformContext} from "@tsed/common";
import type {ApolloContext} from "./ApolloContext";
import type {ApolloContext} from "./ApolloContext.js";

export interface AlterApolloContext<Context extends ApolloContext = ApolloContext> {
$alterApolloContext(context: Context, $ctx: PlatformContext): Context | Promise<Context>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type {ApolloServerPlugin} from "@apollo/server";
import type {ApolloSettings} from "./ApolloSettings";
import type {ApolloSettings} from "./ApolloSettings.js";

export interface AlterApolloServerPlugins {
$alterApolloServerPlugins(
Expand Down
4 changes: 2 additions & 2 deletions packages/graphql/apollo/src/interfaces/ApolloSettings.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {ApolloServer, ApolloServerOptions, ApolloServerOptionsWithSchema} from "@apollo/server";
import type {GatewayInterface} from "@apollo/server-gateway-interface";
import type {IExecutableSchemaDefinition} from "@graphql-tools/schema";
import type {GraphQLSchema} from "graphql/index";
import {ApolloContext} from "./ApolloContext";
import type {GraphQLSchema} from "graphql/index.js";
import type {ApolloContext} from "./ApolloContext.js";

export type ApolloMiddlewareOptions = Record<string, any>;
export type ApolloCustomServerCB<TContext extends ApolloContext> = (config: ApolloServerOptions<TContext>) => ApolloServer<TContext>;
Expand Down
28 changes: 0 additions & 28 deletions packages/graphql/apollo/tsconfig.cjs.json

This file was deleted.

2 changes: 1 addition & 1 deletion packages/graphql/apollo/tsconfig.esm.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"moduleResolution": "nodenext",
"rootDir": "src",
"outDir": "./lib/esm",
"declarationDir": "./lib/types-esm",
"declarationDir": "./lib/types",
"declaration": true,
"composite": true,
"noEmit": false
Expand Down
3 changes: 0 additions & 3 deletions packages/graphql/apollo/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
{
"path": "../../di/tsconfig.json"
},
{
"path": "./tsconfig.cjs.json"
},
{
"path": "./tsconfig.esm.json"
},
Expand Down
Loading
Loading