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

Node built-in modules aren't detected when prefixed with node: #1466

Closed
shroudedcode opened this issue Jan 24, 2022 · 1 comment · Fixed by #1467
Closed

Node built-in modules aren't detected when prefixed with node: #1466

shroudedcode opened this issue Jan 24, 2022 · 1 comment · Fixed by #1467
Labels

Comments

@shroudedcode
Copy link

Expected Behavior

Since v16 (and in previous versions through backporting) Node.js supports an alternative way to import built-in modules (like fs) which involves prefixing the module's name with node:. Using this syntax, importing fs looks like this:

import fs from 'node:fs'

This is functionally equivalent to the following:

import fs from 'fs'

Hence, it should also link to the same thing: the Node.js documentation page for that module.

What actually happened?

Currently, Octolinker generates a link with the href attribute set to node:process, which results in Chrome trying to open the "URL" process with an application assigned to the node scheme/protocol. That doesn't seem right.

URL

https://github.com/sindresorhus/globby/blob/43eccf41a800a5dedb3b3fcdf313f7daf5c199ff/index.js#L1

Anything else we should know?

No response

@shroudedcode
Copy link
Author

Thanks @xt0rted and @stefanbuck, love the extension! 🙌

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

Successfully merging a pull request may close this issue.

1 participant