Skip to content

Commit

Permalink
fix: use tc-alias instead of module-alias
Browse files Browse the repository at this point in the history
  • Loading branch information
toledompm committed Feb 8, 2024
1 parent 6b46549 commit c251747
Show file tree
Hide file tree
Showing 10 changed files with 904 additions and 854 deletions.
4 changes: 1 addition & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
"root": true,
"rules": {
"max-classes-per-file": "off",
"no-duplicate-imports": "off",
"arrow-parens": ["error", "always"],
"import/no-duplicates": ["error", { "considerQueryString": true }]
"arrow-parens": ["error", "always"]
},
"env": {
"node": true,
Expand Down
2 changes: 1 addition & 1 deletion infra/kubernetes/staging/helmRelease.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: post-api
name: post-api-staging
spec:
interval: 5m
chart:
Expand Down
1,731 changes: 898 additions & 833 deletions package-lock.json

Large diffs are not rendered by default.

15 changes: 4 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "",
"main": "app.js",
"scripts": {
"build": "rm -rf dist && tsc -p ${NODE_ENV}.tsconfig.json",
"build": "rm -rf dist && tsc -p ${NODE_ENV}.tsconfig.json && tsc-alias -p ${NODE_ENV}.tsconfig.json",
"lint": "eslint src --ext .ts",
"test": "NODE_ENV=test npm run build && nyc ava -s",
"dev": "nodemon",
Expand All @@ -16,9 +16,9 @@
"@ava/typescript": "^4.1.0",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@quero/eslint-config-base": "^2.1.0",
"@quero/eslint-config-typescript": "^1.4.0",
"@quero/eslint-config-typescript": "^1.4.1",
"@tsconfig/node20": "^20.1.2",
"@types/node": "^20.11.16",
"@types/node": "^20.11.17",
"@types/sinon": "^17.0.3",
"@types/split2": "^4.2.3",
"@types/xml": "^1.0.11",
Expand All @@ -30,6 +30,7 @@
"nyc": "^15.1.0",
"prettier": "^3.2.5",
"sinon": "^17.0.1",
"tsc-alias": "^1.8.8",
"typescript": "^5.3.3"
},
"dependencies": {
Expand All @@ -38,7 +39,6 @@
"@notionhq/client": "^2.2.14",
"ajv": "^8.12.0",
"fastify": "^4.26.0",
"module-alias": "^2.2.3",
"oci-sdk": "^2.79.0",
"split2": "^4.2.0",
"xml": "^1.0.1"
Expand All @@ -52,12 +52,5 @@
},
"compile": false
}
},
"_moduleAliases": {
"@common": "dist/common",
"@posts": "dist/posts",
"@rss": "dist/rss",
"@index": "dist/index",
"@bucket": "dist/bucket"
}
}
1 change: 0 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import { appConfig } from '@common/config';
import cors from '@fastify/cors';
import Etag from '@fastify/etag';
Expand Down
1 change: 0 additions & 1 deletion src/bucket/bucketService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import { ImageBucketService } from '@bucket/imageBucketService';
import test from 'ava';
import Sinon from 'sinon';
Expand Down
1 change: 0 additions & 1 deletion src/index/fileIndex.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import { FileIndex } from '@index/fileIndex';
import test from 'ava';
import { existsSync } from 'fs';
Expand Down
1 change: 0 additions & 1 deletion src/posts/notionRepository.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import type { Client } from '@notionhq/client';
import type {
ListBlockChildrenResponse,
Expand Down
1 change: 0 additions & 1 deletion src/posts/postService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import type { IImageBucketService } from '@bucket/types';
import { PostService } from '@posts/postService';
import type { IPostContent, IPostInfo, IPostRepository } from '@posts/types';
Expand Down
1 change: 0 additions & 1 deletion src/rss/rssService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require('module-alias/register');
import type { IPostInfo, IPostService } from '@posts/types';
import { RssService } from '@rss/rssService';
import test from 'ava';
Expand Down

0 comments on commit c251747

Please sign in to comment.