The URI implementation that is used in VS Code and its extensions.
Installations
npm install vscode-uri
Developer Guide
Typescript
No
Module System
CommonJS, ESM
Node Version
18.5.0
Score
91.8
Supply Chain
90.2
Quality
87.4
Maintenance
100
Vulnerability
100
License
Contributors
Languages
TypeScript (95.25%)
JavaScript (4.75%)
Love this project? Help keep it running — sponsor us today! 🚀
Developer
microsoft
Download Statistics
Total Downloads
614,468,183
Last Day
1,107,891
Last Week
5,888,140
Last Month
23,875,833
Last Year
215,819,686
GitHub Statistics
MIT License
212 Stars
117 Commits
30 Forks
25 Watchers
11 Branches
68 Contributors
Updated on Feb 05, 2025
Bundle Size
11.48 kB
Minified
4.35 kB
Minified + Gzipped
Package Meta Information
Latest Version
3.1.0
Package Id
vscode-uri@3.1.0
Unpacked Size
199.68 kB
Size
58.37 kB
File Count
17
Node Version
18.5.0
Published on
Feb 04, 2025
Total Downloads
Cumulative downloads
Total Downloads
614,468,183
Last Day
7.9%
1,107,891
Compared to previous day
Last Week
6.8%
5,888,140
Compared to previous week
Last Month
41.4%
23,875,833
Compared to previous month
Last Year
74.8%
215,819,686
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
vscode-uri
This module contains the URI implementation that is used by VS Code and its extensions.
It has support for parsing a string into scheme
, authority
, path
, query
, and
fragment
URI components as defined in: http://tools.ietf.org/html/rfc3986
foo://example.com:8042/over/there?name=ferret#nose
\_/ \______________/\_________/ \_________/ \__/
| | | | |
scheme authority path query fragment
| _____________________|__
/ \ / \
urn:example:animal:ferret:nose
Usage
1import { URI } from 'vscode-uri' 2 3// parse an URI from string 4 5let uri = URI.parse('https://code.visualstudio.com/docs/extensions/overview#frag') 6 7assert.ok(uri.scheme === 'https'); 8assert.ok(uri.authority === 'code.visualstudio.com'); 9assert.ok(uri.path === '/docs/extensions/overview'); 10assert.ok(uri.query === ''); 11assert.ok(uri.fragment === 'frag'); 12assert.ok(uri.toString() === 'https://code.visualstudio.com/docs/extensions/overview#frag') 13 14 15// create an URI from a fs path 16 17let uri = URI.file('/users/me/c#-projects/'); 18 19assert.ok(uri.scheme === 'file'); 20assert.ok(uri.authority === ''); 21assert.ok(uri.path === '/users/me/c#-projects/'); 22assert.ok(uri.query === ''); 23assert.ok(uri.fragment === ''); 24assert.ok(uri.toString() === 'file:///users/me/c%23-projects/')
Usage: Util
This module also exports a Utils
package which is an extension, not part of vscode.Uri
, and useful for path-math. There is:
Utils.joinPath(URI, paths): URI
Utils.resolvePath(URI, paths): URI
Utils.dirname(URI): string
Utils.basename(URI): string
Utils.extname(URI): string
All util use posix path-math as defined by the node.js path module.
Contributing
The source of this module is taken straight from the vscode-sources and because of that issues and pull request should be created in that repository. Thanks and Happy Coding!
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

No vulnerabilities found.
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: : LICENSE.md:1
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy detected in org repo: github.com/microsoft/.github/SECURITY.md:1
Reason
dependency not pinned by hash detected -- score normalized to 7
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rich-navigation.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/kalessine/sdmx-sax-parser/rich-navigation.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/rich-navigation.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kalessine/sdmx-sax-parser/rich-navigation.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/rich-navigation.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/kalessine/sdmx-sax-parser/rich-navigation.yml/master?enable=pin
- Info: Dockerfile dependencies are pinned
- Info: no insecure (not pinned by hash) dependency downloads found in Dockerfiles
- Info: no insecure (not pinned by hash) dependency downloads found in shell scripts
Reason
GitHub code reviews found for 20 commits out of the last 30 -- score normalized to 6
Details
- Warn: no reviews found for commit: 96acdc0be5f9d5f2640e1c1f6733bbf51ec95177
- Warn: no reviews found for commit: 6fc6458aba65ea67458897d3331a37784c08e590
- Warn: no reviews found for commit: 82e77ead112f1bffb99d70b2110942fc2ae3fc89
- Warn: no reviews found for commit: dd39d06d80c9f8d4b5ca6ab195219699b417a0b2
- Warn: no reviews found for commit: 70eb76b93ff10a719783f3806a43fc53feff8f0b
- Warn: no reviews found for commit: c343b054276466f96ae981d3c686019fccaeefd1
- Warn: no reviews found for commit: 35b376cb31a8d859e980badf5d3de10ba5f0e002
- Warn: no reviews found for commit: 2fa017b3d015e3991708a5a869bf248347bd2fd9
- Warn: no reviews found for commit: 0a9cabd56568be3badea3ed994e4ff53f53efe37
- Warn: no reviews found for commit: ddd89dfc5ef3e8385588a5ee6244b1302c969670
Reason
branch protection is not maximal on development and all release branches
Details
- Info: 'force pushes' disabled on branch 'main'
- Info: 'allow deletion' disabled on branch 'main'
- Warn: no status checks found to merge onto branch 'main'
- Warn: number of required reviewers is only 1 on branch 'main'
Reason
0 commit(s) out of 30 and 0 issue activity out of 0 found in the last 90 days -- score normalized to 0
Reason
no badge detected
Reason
non read-only tokens detected in GitHub workflows
Details
- Warn: no topLevel permission defined: .github/workflows/rich-navigation.yml:1: update your workflow using https://app.stepsecurity.io/secureworkflow/kalessine/sdmx-sax-parser/rich-navigation.yml/master?enable=permissions
Score
6.4
/10
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to vscode-uri
@types-zh-cn/vscode-uri
The URI implementation that is used by VS Code and its extensions
sussudio
An unofficial VS Code Internal API
@sussudio/base
Internal APIs for VS Code's utilities and user interface building blocks.
vscode-url
A library to create urls for the `vscode-remote://` URI scheme.