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

support resolving aliases that have a .ts extension #178

Closed
kalvenschraut opened this issue May 17, 2023 · 7 comments
Closed

support resolving aliases that have a .ts extension #178

kalvenschraut opened this issue May 17, 2023 · 7 comments

Comments

@kalvenschraut
Copy link
Contributor

As of typescript 5.0, typescript added allowImportingTsExtensions and then leaves the .ts extension in the .d.ts file. Because of this tsc-alias is not finding the .d.ts files when it tries to verify the file exists before replacing the alias.

Will submit PR for this shortly. Handling same way as .js/.json

@mrhyde
Copy link

mrhyde commented Jun 4, 2023

@kalvenschraut Shouldn't the file extensions be changed to .js? With this change, we are still outputting .ts, which does not comply with the ESM resolution spec.

@kalvenschraut
Copy link
Contributor Author

kalvenschraut commented Jun 5, 2023

As of typescript 5.0 you can have .ts as the extension. Typescript leaves the extension as is meaning that the .d.ts files are going have the .ts extension still. This is fine because typescript will still resolve the files correctly.

With allowImportingTsExtensions on it is assumed TSC is not the one building the files and some external bundler is like vite.

Was introduced along with the bunder module resolution microsoft/TypeScript#51669

@mrhyde
Copy link

mrhyde commented Jun 6, 2023

I am using swc to compile TypeScript code with certain settings in my tsconfig. Specifically, I have allowImportingTsExtensions set to true and moduleResolution set to nodenext. Here is a simplified version of my tsconfig:

{
    "module": "esnext",
    "moduleResolution": "nodenext",
    "declaration": true,
    "emitDeclarationOnly": true,
    "allowImportingTsExtensions": true,
    "paths": {
      "~/*": ["./*"]
    }
}

My goal is to provide an output that has correct paths and conforms to the esm resolution spec. However, I'm not sure if I'm missing something or if my assumptions are incorrect. When I use something like import { tomorrow } from '~/utils/date.ts'; in my code, it produces different results depending on the case:

// Using tsc-alias v1.8.6 will not change the path.
import { tomorrow } from '~/utils/date.ts';

// Using tsc-alias from the master branch with #178 applied will resolve the alias but keep the extension.
import { tomorrow } from '../utils/date.ts';

// Using the swc paths config option will resolve the alias correctly but it will drop the extension.
import { tomorrow } from '../utils/date';

// The desired output is a correct path with a file extension matching .js files. Therefore, I'm currently forced to use tsc-alias on files produced by swc in a previous step.
import { tomorrow } from '../utils/date.js';

I'm struggling to see how changes made in #179 are supposed to work since having any extension other than .js, .mjs, .cjs or .json will result in an 'Unsupported File Extension' error. I would greatly appreciate any insight on the matter.

Thanks

@kalvenschraut
Copy link
Contributor Author

Are you using tsc-alias to resolve aliases in built js files too? In my setup I only do it for .d.ts generated files. I will give a little more detailed response tomorrow after I wake up in ~9 hrs, but my setup is primarily tsup for compiling simpler codebases and vite for our frontend codebases. Tsup uses esbuild to do the compilation, I don't have a ton of experience with SWC. Mainly know it is used because of of decorator meta support in esbuild being lacking.

@mrhyde
Copy link

mrhyde commented Jun 6, 2023

Yep. I need to fill another issue for swc because it doesn't have the option to preserve file extensions.
Additionally, fixing .d.ts files is not working for me anymore with both the current version of tsc-alias and your branch. The paths in my code have .ts extensions but they still reference the .ts files even after running tsc-alias. 🤷

I believe that the allowImportingTsExtensions option is causing d.ts files to reference .ts files, which could be the source of the problem. 🤔

@mrhyde
Copy link

mrhyde commented Jun 6, 2023

log
tsc-alias debug: Loading config file: '/home/projects/2BAD/ryanair/tsconfig.build.json'
tsc-alias debug: configDir '/home/projects/2BAD/ryanair'
tsc-alias debug: loaded config (from file): { resolveFullPaths: true, verbose: true }
tsc-alias debug: Loading config file: '/home/projects/2BAD/ryanair/tsconfig.json'
tsc-alias debug: configDir '/home/projects/2BAD/ryanair'
tsc-alias debug: loaded config (from file): {
  baseUrl: 'source',
  outDir: '/home/projects/2BAD/ryanair/build',
  paths: { '~/*': [ './*', [length]: 1 ] }
}
tsc-alias debug: Loading config file: '/home/projects/2BAD/ryanair/node_modules/@2bad/tsconfig/tsconfig.json'
tsc-alias debug: configDir '/home/projects/2BAD/ryanair/node_modules/@2bad/tsconfig'
tsc-alias debug: loaded config (from file): {}
tsc-alias debug: resolveFullPaths is active 
tsc-alias debug: loaded project config: {
  configFile: '/home/projects/2BAD/ryanair/tsconfig.build.json',
  baseUrl: 'source',
  outDir: '/home/projects/2BAD/ryanair/build',
  configDir: '/home/projects/2BAD/ryanair',
  outPath: '/home/projects/2BAD/ryanair/build',
  confDirParentFolderName: 'ryanair',
  hasExtraModule: false,
  configDirInOutPath: null,
  relConfDirPathInOutPath: null,
  pathCache: PathCache {
    fileExtensions: [
      'js',    'json',
      'jsx',   'cjs',
      'mjs',   'd.ts',
      'd.tsx', 'd.cts',
      'd.mts', [length]: 9
    ],
    useCache: true,
    existsCache: Map(0) {},
    absoluteCache: Map(0) {}
  },
  inputGlob: '{mjs,cjs,js,jsx,d.{mts,cts,ts,tsx}}'
}
tsc-alias debug: loaded full config: {
  configFile: '/home/projects/2BAD/ryanair/tsconfig.build.json',
  baseUrl: 'source',
  outDir: '/home/projects/2BAD/ryanair/build',
  configDir: '/home/projects/2BAD/ryanair',
  outPath: '/home/projects/2BAD/ryanair/build',
  confDirParentFolderName: 'ryanair',
  hasExtraModule: false,
  configDirInOutPath: null,
  relConfDirPathInOutPath: null,
  pathCache: PathCache {
    fileExtensions: [
      'js',    'json',
      'jsx',   'cjs',
      'mjs',   'd.ts',
      'd.tsx', 'd.cts',
      'd.mts', [length]: 9
    ],
    useCache: true,
    existsCache: Map(0) {},
    absoluteCache: Map(0) {}
  },
  inputGlob: '{mjs,cjs,js,jsx,d.{mts,cts,ts,tsx}}',
  output: Output {
    verb: true,
    debug: [Function (anonymous)] { [length]: 2, [name]: '' },
    [verbose]: [Setter]
  },
  aliasTrie: TrieNode {
    children: Map(1) {
      '~' => TrieNode {
        children: Map(1) {
          '/' => TrieNode {
            children: Map(0) {},
            data: {
              shouldPrefixMatchWildly: true,
              prefix: '~/',
              paths: [
                {
                  path: './',
                  basePath: '/home/projects/2BAD/ryanair/build',
                  isExtra: false
                },
                [length]: 1
              ]
            }
          }
        },
        data: null
      }
    },
    data: null
  },
  replacers: [ [length]: 0 ]
}
tsc-alias debug: Started loading replacers 
tsc-alias debug: Found node_modules: [ 'node_modules', [length]: 1 ]
tsc-alias debug: Added replacers to list from command-line filepaths: 
tsc-alias debug: Reading replacers config 
tsc-alias debug: Loading default replacer: [ 'default', { enabled: true }, [length]: 2 ]
tsc-alias debug: Replacer has no file: [ 'default', { enabled: true }, [length]: 2 ]
tsc-alias debug: Loading default replacer: [ 'base-url', { enabled: true }, [length]: 2 ]
tsc-alias debug: Replacer has no file: [ 'base-url', { enabled: true }, [length]: 2 ]
tsc-alias debug: Loaded replacers: [
  <ref *1> [Function: replaceImportStatement] {
    [length]: 1,
    [name]: 'replaceImportStatement',
    [prototype]: { [constructor]: [Circular *1] }
  },
  <ref *2> [Function: replaceBaseUrlImport] {
    [length]: 1,
    [name]: 'replaceBaseUrlImport',
    [prototype]: { [constructor]: [Circular *2] }
  },
  [length]: 2
]
tsc-alias debug: Search pattern: [
  '/home/projects/2BAD/ryanair/build/**/*.{mjs,cjs,js,jsx,d.{mts,cts,ts,tsx}}',
  '!/home/projects/2BAD/ryanair/build/**/node_modules',
  [length]: 2
]
tsc-alias debug: Found files: [
  '/home/projects/2BAD/ryanair/build/client.d.ts',
  '/home/projects/2BAD/ryanair/build/client.js',
  '/home/projects/2BAD/ryanair/build/date.types.d.ts',
  '/home/projects/2BAD/ryanair/build/date.types.js',
  '/home/projects/2BAD/ryanair/build/index.d.ts',
  '/home/projects/2BAD/ryanair/build/index.js',
  '/home/projects/2BAD/ryanair/build/airports/getActive.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/getActive.js',
  '/home/projects/2BAD/ryanair/build/airports/getClosest.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/getClosest.js',
  '/home/projects/2BAD/ryanair/build/airports/getDestinations.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/getDestinations.js',
  '/home/projects/2BAD/ryanair/build/airports/getInfo.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/getInfo.js',
  '/home/projects/2BAD/ryanair/build/airports/index.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/index.js',
  '/home/projects/2BAD/ryanair/build/airports/integration.test.js',
  '/home/projects/2BAD/ryanair/build/airports/types.d.ts',
  '/home/projects/2BAD/ryanair/build/airports/types.js',
  '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.d.ts',
  '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.js',
  '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.d.ts',
  '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.js',
  '/home/projects/2BAD/ryanair/build/fares/index.d.ts',
  '/home/projects/2BAD/ryanair/build/fares/index.js',
  '/home/projects/2BAD/ryanair/build/fares/integration.test.js',
  '/home/projects/2BAD/ryanair/build/fares/types.d.ts',
  '/home/projects/2BAD/ryanair/build/fares/types.js',
  '/home/projects/2BAD/ryanair/build/flights/getAvailable.d.ts',
  '/home/projects/2BAD/ryanair/build/flights/getAvailable.js',
  '/home/projects/2BAD/ryanair/build/flights/getDates.d.ts',
  '/home/projects/2BAD/ryanair/build/flights/getDates.js',
  '/home/projects/2BAD/ryanair/build/flights/index.d.ts',
  '/home/projects/2BAD/ryanair/build/flights/index.js',
  '/home/projects/2BAD/ryanair/build/flights/integration.test.js',
  '/home/projects/2BAD/ryanair/build/flights/types.d.ts',
  '/home/projects/2BAD/ryanair/build/flights/types.js',
  '/home/projects/2BAD/ryanair/build/utils/date.d.ts',
  '/home/projects/2BAD/ryanair/build/utils/date.js',
  '/home/projects/2BAD/ryanair/build/utils/unit.test.js',
  [length]: 40
]
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/client.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/client.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/date.types.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/date.types.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/index.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/index.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getActive.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getActive.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getClosest.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getClosest.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getDestinations.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getDestinations.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getInfo.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/getInfo.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/index.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/index.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/integration.test.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/types.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/airports/types.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/index.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/index.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/integration.test.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/types.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/fares/types.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/getAvailable.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/getAvailable.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/getDates.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/getDates.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/index.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/index.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/integration.test.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/types.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/flights/types.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/utils/date.d.ts'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/utils/date.js'
tsc-alias debug: Starting to replace file: '/home/projects/2BAD/ryanair/build/utils/unit.test.js'
tsc-alias debug: default replacer - requiredModule:  'got'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'got'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/client.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/date.types.d.ts'
tsc-alias debug: default replacer - requiredModule:  'got'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  'tough-cookie'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'got'
tsc-alias debug: base-url replacer - requiredModule:  'tough-cookie'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/client.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/index.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  './'
tsc-alias debug: default replacer - newImportScript:  "from './/airports/index.ts'"
tsc-alias debug: default replacer - modulePath:  './/airports/index.ts'
tsc-alias debug: default replacer - requiredModule:  '~/fares/index.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  './'
tsc-alias debug: default replacer - newImportScript:  "from './/fares/index.ts'"
tsc-alias debug: default replacer - modulePath:  './/fares/index.ts'
tsc-alias debug: default replacer - requiredModule:  '~/flights/index.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  './'
tsc-alias debug: default replacer - newImportScript:  "from './/flights/index.ts'"
tsc-alias debug: default replacer - modulePath:  './/flights/index.ts'
tsc-alias debug: base-url replacer - requiredModule:  './airports/index.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './fares/index.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './flights/index.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/index.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/date.types.js'
tsc-alias debug: default replacer - requiredModule:  './airports/index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './fares/index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './flights/index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  './airports/index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './fares/index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './flights/index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/index.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getActive.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getActive.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getClosest.d.ts'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getClosest.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getDestinations.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getDestinations.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getInfo.d.ts'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/getInfo.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/getActive.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/getActive.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/getActive.ts'
tsc-alias debug: default replacer - requiredModule:  '~/airports/getClosest.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/getClosest.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/getClosest.ts'
tsc-alias debug: default replacer - requiredModule:  '~/airports/getDestinations.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/getDestinations.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/getDestinations.ts'
tsc-alias debug: default replacer - requiredModule:  '~/airports/getInfo.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/getInfo.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/getInfo.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/getActive.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../airports/getClosest.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../airports/getDestinations.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../airports/getInfo.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/index.d.ts'
tsc-alias debug: default replacer - requiredModule:  './getActive'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './getClosest'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './getDestinations'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './getInfo'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  './getActive'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './getClosest'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './getDestinations'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './getInfo'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/index.js'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/airports/integration.test.js'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/airports/types.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/airports/types.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: default replacer - requiredModule:  '~/date.types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../date.types.ts'"
tsc-alias debug: default replacer - modulePath:  '../date.types.ts'
tsc-alias debug: default replacer - requiredModule:  '~/fares/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../fares/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../fares/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../date.types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../fares/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.d.ts'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/getCheapestPerDay.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: default replacer - requiredModule:  '~/date.types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../date.types.ts'"
tsc-alias debug: default replacer - modulePath:  '../date.types.ts'
tsc-alias debug: default replacer - requiredModule:  '~/fares/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../fares/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../fares/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../date.types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../fares/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.d.ts'
tsc-alias debug: default replacer - requiredModule:  './index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../utils/date'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  './index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../utils/date'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/getDailyFaresInRange.js'
tsc-alias debug: default replacer - requiredModule:  '~/fares/getCheapestPerDay.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../fares/getCheapestPerDay.ts'"
tsc-alias debug: default replacer - modulePath:  '../fares/getCheapestPerDay.ts'
tsc-alias debug: default replacer - requiredModule:  '~/fares/getDailyFaresInRange.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../fares/getDailyFaresInRange.ts'"
tsc-alias debug: default replacer - modulePath:  '../fares/getDailyFaresInRange.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../fares/getCheapestPerDay.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../fares/getDailyFaresInRange.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/index.d.ts'
tsc-alias debug: default replacer - requiredModule:  './getCheapestPerDay'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './getDailyFaresInRange'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  './getCheapestPerDay'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './getDailyFaresInRange'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/index.js'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../utils/date'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../utils/date'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/integration.test.js'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/fares/types.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../date.types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: base-url replacer - requiredModule:  '../date.types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/fares/types.js'
tsc-alias debug: default replacer - requiredModule:  '~/flights/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../flights/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../flights/types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../flights/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/getAvailable.d.ts'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../utils/date'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../utils/date'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/getAvailable.js'
tsc-alias debug: default replacer - requiredModule:  '~/airports/types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../airports/types.ts'"
tsc-alias debug: default replacer - modulePath:  '../airports/types.ts'
tsc-alias debug: default replacer - requiredModule:  '~/date.types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../date.types.ts'"
tsc-alias debug: default replacer - modulePath:  '../date.types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../date.types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/getDates.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../date.types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../date.types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/getDates.js'
tsc-alias debug: default replacer - requiredModule:  '~/flights/getAvailable.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../flights/getAvailable.ts'"
tsc-alias debug: default replacer - modulePath:  '../flights/getAvailable.ts'
tsc-alias debug: default replacer - requiredModule:  '~/flights/getDates.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../flights/getDates.ts'"
tsc-alias debug: default replacer - modulePath:  '../flights/getDates.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../flights/getAvailable.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../flights/getDates.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/index.d.ts'
tsc-alias debug: default replacer - requiredModule:  './getAvailable'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './getDates'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  './getAvailable'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './getDates'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/index.js'
tsc-alias debug: default replacer - requiredModule:  '../client'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../utils/date'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './index'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../client'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../utils/date'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './index'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/integration.test.js'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/flights/types.d.ts'
tsc-alias debug: default replacer - requiredModule:  'zod'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../airports/types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  '../date.types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'zod'
tsc-alias debug: base-url replacer - requiredModule:  '../airports/types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  '../date.types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/flights/types.js'
tsc-alias debug: default replacer - requiredModule:  '~/date.types.ts'
tsc-alias debug: default replacer - alias:  {
  shouldPrefixMatchWildly: true,
  prefix: '~/',
  paths: [
    {
      path: './',
      basePath: '/home/projects/2BAD/ryanair/build',
      isExtra: false
    },
    [length]: 1
  ]
}
tsc-alias debug: default replacer - absoluteAliasPath:  '/home/projects/2BAD/ryanair/build'
tsc-alias debug: default replacer - relativeAliasPath:  '..'
tsc-alias debug: default replacer - newImportScript:  "from '../date.types.ts'"
tsc-alias debug: default replacer - modulePath:  '../date.types.ts'
tsc-alias debug: base-url replacer - requiredModule:  '../date.types.ts'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/utils/date.d.ts'
tsc-alias debug: default replacer - requiredModule:  'date-fns'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  'date-fns'
tsc-alias debug: replaced file without changes: '/home/projects/2BAD/ryanair/build/utils/date.js'
tsc-alias debug: default replacer - requiredModule:  '../date.types'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: default replacer - requiredModule:  './date'
tsc-alias debug: default replacer - alias:  
tsc-alias debug: base-url replacer - requiredModule:  '../date.types'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: base-url replacer - requiredModule:  './date'
tsc-alias debug: base-url replacer - already resolved 
tsc-alias debug: replaced file with changes: '/home/projects/2BAD/ryanair/build/utils/unit.test.js'
tsc-alias info: 31 files were affected!

@kalvenschraut
Copy link
Contributor Author

kalvenschraut commented Jun 7, 2023

Yesterday was a busy day for me, sorry for promising something I didn't get to.

From what I understand of tsc-alias, it will try find the corresponding file it is resolving. So if you import something with an alias, it should find the file using the resolve path of the alias defined in tsconfig. I know it checks multiple extensions that it could be such as .d.ts, .js.

I believe that the allowImportingTsExtensions option is causing d.ts files to reference .ts files, which could be the source of the problem. 🤔

That is my understand also. TSC is expecting your bundler to replace the .ts with the appropriate file extension in the built file so this is something I assume SWC would need to handle. Vite/esbuild do for me.

As for the .d.ts files having the .ts extension, seems to be fine for me. As long as the resolved import path has a .d.ts file where it is looking for the .ts file. If you had both a .d.ts and a .ts file of the same name then the .ts file would be picked, but I personally see this as an odd setup. Typically .d.ts and js files are together since they are the built artifacts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants