Skip to content

Commit

Permalink
Merge pull request #2854 from tsedio/alpha
Browse files Browse the repository at this point in the history
Alpha
  • Loading branch information
Romakita authored Oct 6, 2024
2 parents 6d5cae8 + 086f3ba commit b8a7bab
Show file tree
Hide file tree
Showing 1,628 changed files with 16,339 additions and 18,880 deletions.
14 changes: 0 additions & 14 deletions .eslintignore

This file was deleted.

37 changes: 0 additions & 37 deletions .eslintrc.js

This file was deleted.

2 changes: 1 addition & 1 deletion .gflowrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"flow": "gflow",
"remote": "origin",
"develop": "production",
"develop": "alpha",
"production": "production",
"ignores": [],
"syncAfterFinish": false,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
push:
branches: [production, alpha, beta, rc]
pull_request:
branches: [production]
branches: [production, alpha, beta, rc]
types: [opened, synchronize, closed]

concurrency:
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [20.12.2, 22.x]
node-version: [20.12.2]
exclude:
- os: macos-latest
node-version: 20.x
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged $1
yarn lint-staged $1
3 changes: 2 additions & 1 deletion benchmarks/bin/benchmark-bench.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
"use strict";
import {Command} from "commander";
import inquirer from "inquirer";

import bench from "../src/bench.js";
import {choices, list} from "../src/packages.js";
import {Command} from "commander";

const program = new Command();

Expand Down
11 changes: 6 additions & 5 deletions benchmarks/bin/benchmark-compare.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env node
import os from "os";
import chalk from "chalk";
import Table from "cli-table";
import {Command} from "commander";
import {readdirSync, readFileSync, writeFileSync} from "fs";
import inquirer from "inquirer";
import Table from "cli-table";
import chalk from "chalk";
import os from "os";
import {join} from "path";
import {readdirSync, readFileSync, writeFileSync} from "fs";
import {info} from "../src/packages.js";

import {compare} from "../src/autocannon.js";
import {info} from "../src/packages.js";

const commander = new Command();

Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/express-injector-async-hook.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import express from "express";
import {InjectorService} from "@tsed/di";
import {PlatformContext, PlatformRequest, PlatformResponse} from "@tsed/common";
import {InjectorService} from "@tsed/di";
import express from "express";
import {v4} from "uuid";

const app = express();
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/frameworks/express-injector-http-hook.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import express from "express";
import {InjectorService, runInContext, setContext} from "@tsed/di";
import {PlatformContext, PlatformRequest, PlatformResponse} from "@tsed/common";
import {v4} from "uuid";
import {InjectorService, runInContext, setContext} from "@tsed/di";
import express from "express";
import http from "http";
import {v4} from "uuid";

const injector = new InjectorService();
const app = express();
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/frameworks/express-injector-without-events.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import express from "express";
import {InjectorService, runInContext, setContext} from "@tsed/di";
import {PlatformContext, PlatformRequest, PlatformResponse} from "@tsed/common";
import {v4} from "uuid";
import {InjectorService, runInContext, setContext} from "@tsed/di";
import express from "express";
import http from "http";
import {v4} from "uuid";

const injector = new InjectorService();
const app = express();
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/express-injector.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import express from "express";
import {InjectorService} from "@tsed/di";
import {PlatformContext, PlatformRequest, PlatformResponse} from "@tsed/common";
import {InjectorService} from "@tsed/di";
import express from "express";
import {v4} from "uuid";

const app = express();
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/fastify-injector.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Fastify from "fastify";
import {InjectorService, runInContext, getContext} from "@tsed/di";
import {PlatformContext} from "@tsed/common";
import {getContext, InjectorService, runInContext} from "@tsed/di";
import Fastify from "fastify";
import {v4} from "uuid";

const fastify = Fastify();
Expand Down
1 change: 1 addition & 0 deletions benchmarks/frameworks/hapi.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import "make-promises-safe";

import Hapi from "@hapi/hapi";

async function start() {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/frameworks/koa-isomorphic-router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Koa from "koa";
import Router from "benchmarks/frameworks/koa-isomorphic-router.js";
import Koa from "koa";

const app = new Koa();
const router = new Router();
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/frameworks/koa-router.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Koa from "koa";
import KoaRouter from "benchmarks/frameworks/koa-router.js";
import Koa from "koa";

const router = KoaRouter();

Expand Down
1 change: 1 addition & 0 deletions benchmarks/frameworks/nest-fastify.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import core from "@nestjs/core";
import fastifyPlatform from "@nestjs/platform-fastify";

import {AppModule} from "./nest/app/app.module.js";

core.NestFactory.create(AppModule, new fastifyPlatform.FastifyAdapter(), {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/frameworks/nest/app/app.controller.js

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

3 changes: 2 additions & 1 deletion benchmarks/frameworks/nest/app/app.module.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {__decorate} from "tslib";
import common_1 from "@nestjs/common";
import {__decorate} from "tslib";

import {AppController} from "./app.controller.js";

class AppModule {}
Expand Down
1 change: 1 addition & 0 deletions benchmarks/frameworks/nest/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use strict";
import core from "@nestjs/core";

import {AppModule} from "./app/app.module.js";

core.NestFactory.create(AppModule, {
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/tsed-express.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";
import {PlatformApplication} from "@tsed/common";
import {Inject} from "@tsed/di";
import {PlatformExpress} from "@tsed/platform-express";
import {__decorate} from "tslib";
import {Inject} from "@tsed/di";
import {PlatformApplication} from "@tsed/common";

class Server {
$onInit() {
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/tsed-koa.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";
import {PlatformApplication} from "@tsed/common";
import {Inject} from "@tsed/di";
import {PlatformKoa} from "@tsed/platform-koa";
import {__decorate} from "tslib";
import {Inject} from "@tsed/di";
import {PlatformApplication} from "@tsed/common";

class Server {
$beforeRoutesInit() {
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/tsed-no-context.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";
import {PlatformApplication} from "@tsed/common";
import {Inject} from "@tsed/di";
import {PlatformExpress} from "@tsed/platform-express";
import {__decorate} from "tslib";
import {Inject} from "@tsed/di";
import {PlatformApplication} from "@tsed/common";

class Server {
$onInit() {
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/frameworks/tsed-no-events.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";
import {PlatformApplication} from "@tsed/common";
import {Inject} from "@tsed/di";
import {PlatformExpress} from "@tsed/platform-express";
import {__decorate} from "tslib";
import {Inject} from "@tsed/di";
import {PlatformApplication} from "@tsed/common";

class Server {
$onInit() {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/autocannon.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import autocannon from "autocannon";
import fs from "fs";
import autoCompare from "autocannon-compare";
import fs from "fs";
import path from "path";
import {promisify} from "util";

Expand Down
3 changes: 2 additions & 1 deletion benchmarks/src/bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
import {execa} from "execa";
import ora from "ora";
import path from "path";
import {fire} from "./autocannon.js";
import {fileURLToPath} from "url";

import {fire} from "./autocannon.js";

const __dirname = path.dirname(fileURLToPath(import.meta.url));

const doBench = async (opts, handler) => {
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/src/packages.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import fs from "fs";
import {dirname, join} from "path";
import {createRequire} from "module";
import {dirname, join} from "path";

const require = createRequire(import.meta.url);

Expand Down
4 changes: 2 additions & 2 deletions commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import globby from "globby";
import {globbySync} from "globby";
import {basename} from "node:path";
import pkg from "./package.json" assert {type: "json"};
import {RuleConfigSeverity} from "@commitlint/types";
Expand All @@ -8,7 +8,7 @@ function findPackages() {
return `${pkgPattern}/package.json`;
});

let pkgs = globby.sync(patterns, {
let pkgs = globbySync(patterns, {
cwd: process.cwd(),
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {$log} from "@tsed/common";
import {PlatformExpress} from "@tsed/platform-express";
import {Server} from "./server";

const rootDir = __dirname; // automatically replaced by import.meta.dirname on build
const rootDir = import.meta.dirname;

// /!\ configuration file must be outside of your src directory
process.env["NODE_CONFIG_DIR"] = `${rootDir}/../config`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Get} from "@tsed/schema";
import {createReadStream, ReadStream} from "fs";
import {Observable, of} from "rxjs";

const rootDir = __dirname; // automatically replaced by import.meta.dirname on build
const rootDir = import.meta.dirname;

@Controller("/")
export class KindOfResponseCtrl {
Expand Down
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 {}
6 changes: 3 additions & 3 deletions docs/docs/snippets/middlewares/accept-mime-usage.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {Get} from "@tsed/schema";
import {Controller} from "@tsed/di";
import {AcceptMime} from "@tsed/common";
import {AcceptMime, Get} from "@tsed/schema";

@Controller("/mypath")
export class MyCtrl {
@Get("/")
@AcceptMime("application/json")
public getResource() {}
public getResource() {
}
}
2 changes: 1 addition & 1 deletion docs/getting-started/snippets/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,6 @@
"supertest": "6.0.0",
"ts-node": "9.0.0",
"tslint": "6.1.3",
"typescript": "4.9.5"
"typescript": "5.4.5"
}
}
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": "7.83.3",
"version": "8.0.0-alpha.11",
"description": "Documentation Ts.ED",
"private": true,
"scripts": {
Expand Down
Loading

0 comments on commit b8a7bab

Please sign in to comment.