paths

star 1.0k

Prefer vscode-uri over node:path. Use when .ts files in /src import from node:path or use path.join, path.basename, path.dirname, path.resolve.

forcedotcom By forcedotcom schedule Updated 3/2/2026

name: paths description: Prefer vscode-uri over node:path. Use when .ts files in /src import from node:path or use path.join, path.basename, path.dirname, path.resolve.

Paths

Scope: .ts files in /src

  • Prefer vscode-uri URIs over paths (file, memfs; cross-platform; FsService/workspace.fs accept URIs)
  • Use Utils from vscode-uri instead of node:path:
    • Utils.joinPath(baseUri, 'a', 'b') — path.join
    • Utils.basename(uri), Utils.dirname(uri), Utils.extname(uri) — path.*
    • Utils.resolvePath(baseUri, 'rel') — path.resolve
  • URI↔path via FsService: toUri(filePath) / uriToPath(uri) (Effect; extensions with salesforcedx-vscode-services)
  • Raw path→URI: URI.file(path) or toUri for memfs in web
  • FsService setup: services-extension-consumption
  • Exit hatch: build scripts, esbuild configs, tests, desktop-only extension, host-FS-only tooling → node:path ok
Install via CLI
npx skills add https://github.com/forcedotcom/salesforcedx-vscode --skill paths
Repository Details
star Stars 1,020
call_split Forks 455
navigation Branch main
article Path SKILL.md
More from Creator