egoist / esbuild-register

Transpile JSX, TypeScript and esnext features on the fly with esbuild
MIT License
989 stars 52 forks source link

Update tsconfig-paths #91

Closed Karibash closed 1 year ago

Karibash commented 1 year ago

close: #85

codesandbox[bot] commented 1 year ago

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

socket-security[bot] commented 1 year ago

New dependency changes detected. Learn more about Socket for GitHub ↗︎


👍 No new dependency issues detected in pull request

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore foo@1.0.0 bar@* or ignore all packages with @SocketSecurity ignore-all

⚠️ Please accept the latest app permissions to ensure bot commands work properly. Accept the new permissions here.

Pull request alert summary
Issue Status
Install scripts ✅ 0 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

🚮 Removed packages: tsconfig-paths@3.12.0

psychobolt commented 1 year ago

This is needed to support projects using TypeScript 5.0 and using array extends in Storybook. https://github.com/storybookjs/storybook/issues/21792

naporin0624 commented 1 year ago

I ran into this problem in TS 5.0 when I used extends as an array. This fix is very important. I look forward to seeing it merged.

I have created a patch file that can be used with patch-package to address this issue. https://gist.github.com/naporin0624/70c2e00f791d881895910a8f2cdb3026

bastiankistner commented 1 year ago

would be great if this could be merged! was just running into the extends is an array issue, which is a very helpful typescript feature

adonaicandido commented 1 year ago

Waiting on this as well. Storybook with TS 5.0 and Sveltekit depends on this.

CloudBranch commented 1 year ago

TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received an instance of Array

lagunovsky commented 1 year ago

As of March 2023, a good way to eliminate the NodeJS relative paths is to use the imports property in package.json. (In the codes below, #root is the project root.)

// package.json
{
  "imports": {
    "#root/*.js": "./*.js"
  }
}

// main.js:
const Source = require('#root/path/to/Source.js');

// Source.js:
module.exports = class Source {
  // ...
}
prisis commented 1 year ago

Hey @egoist , do you have some time to take a look on this issue?

anneau commented 1 year ago

Please merge this.

ndelangen commented 1 year ago

@egoist would you be able to look at merging this perhaps?

Storybook needs this to support newer TS5 features, see: https://github.com/storybookjs/storybook/issues/21792

🙏🙏🙏

unknownproperty commented 1 year ago

+1 for storybook support

prisis commented 1 year ago

Thank you @egoist ❤️

egoist commented 1 year ago

:tada: This PR is included in version 3.5.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: