Conversation
This reverts commit de6f371.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR transitions the codicon.ttf font file from being stored directly in the repository to being sourced from the @vscode/codicons npm package. The file is now automatically copied during the postinstall phase and when node_modules are restored from cache in CI/CD pipelines.
Changes:
- Added
@vscode/codiconspackage dependency to both root and remote/web package.json - Created a new copy-codicons.ts script that copies the font file from node_modules to the source tree
- Updated all CI/CD workflows to run the copy script when node_modules are restored from cache
- Added the generated codicon.ttf file to .gitignore and included a README explaining its origin
Reviewed changes
Copilot reviewed 17 out of 21 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| package.json | Added @vscode/codicons dependency and copy-codicons npm script |
| package-lock.json | Lock file entry for new dependency |
| remote/web/package.json | Added @vscode/codicons dependency for web remote |
| remote/web/package-lock.json | Lock file entry for remote web package |
| build/npm/copy-codicons.ts | New script to copy codicon.ttf from npm package with error handling |
| build/npm/postinstall.ts | Calls copy-codicons script after npm install |
| build/gulpfile.editor.ts | Ensures codicon.ttf is copied during editor extraction task |
| .gitignore | Excludes generated codicon.ttf from version control |
| src/vs/base/browser/ui/codicons/codicon/README.md | Documents where codicon.ttf comes from |
| build/azure-pipelines/win32/steps/product-build-win32-compile.yml | Runs copy-codicons when using cached node_modules |
| build/azure-pipelines/web/product-build-web.yml | Runs copy-codicons when using cached node_modules |
| build/azure-pipelines/product-compile.yml | Runs copy-codicons when using cached node_modules |
| build/azure-pipelines/linux/steps/product-build-linux-compile.yml | Runs copy-codicons when using cached node_modules |
| build/azure-pipelines/darwin/steps/product-build-darwin-compile.yml | Runs copy-codicons when using cached node_modules |
| build/azure-pipelines/alpine/product-build-alpine.yml | Runs copy-codicons when using cached node_modules |
| .github/workflows/pr-win32-test.yml | Runs copy-codicons when using cached node_modules |
| .github/workflows/pr-node-modules.yml | Runs copy-codicons when using cached node_modules |
| .github/workflows/pr-linux-test.yml | Runs copy-codicons when using cached node_modules |
| .github/workflows/pr-darwin-test.yml | Runs copy-codicons when using cached node_modules |
| .github/workflows/monaco-editor.yml | Runs copy-codicons when using cached node_modules |
Files not reviewed (1)
- remote/web/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
build/gulpfile.editor.ts:45
- The codicon.ttf copying logic is duplicated between this file and build/npm/copy-codicons.ts. Consider extracting this logic into a shared utility function that both files can use. This would ensure consistent behavior, reduce maintenance burden, and ensure both code paths have the same error handling.
// Ensure codicon.ttf is copied from node_modules (needed when node_modules is cached and postinstall doesn't run)
const codiconSource = path.join(root, 'node_modules', '@vscode', 'codicons', 'dist', 'codicon.ttf');
const codiconDest = path.join(root, 'src', 'vs', 'base', 'browser', 'ui', 'codicons', 'codicon', 'codicon.ttf');
if (fs.existsSync(codiconSource)) {
fs.mkdirSync(path.dirname(codiconDest), { recursive: true });
fs.copyFileSync(codiconSource, codiconDest);
}
joaomoreno
previously approved these changes
Jan 23, 2026
joaomoreno
approved these changes
Jan 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #283823