@vscode/codicons 0.0.45 → 0.0.46-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.fantasticonrc.js +9 -5
- package/.github/workflows/gh-pages.yml +1 -1
- package/.github/workflows/release.yml +19 -1
- package/dist/codicon.css +4 -3
- package/dist/codicon.csv +535 -534
- package/dist/codicon.html +1648 -1627
- package/dist/codicon.svg +1 -1
- package/dist/codicon.ttf +0 -0
- package/dist/codiconsLibrary.ts +1 -0
- package/dist/metadata.json +5 -0
- package/package.json +4 -4
- package/scripts/patch-fantasticon.js +95 -0
- package/scripts/reset.js +5 -8
- package/src/icons/new-session.svg +1 -1
- package/src/icons/terminal-secure.svg +1 -0
- package/src/template/mapping.json +3 -0
- package/src/template/metadata.json +5 -0
package/dist/codicon.ttf
CHANGED
|
Binary file
|
package/dist/codiconsLibrary.ts
CHANGED
package/dist/metadata.json
CHANGED
|
@@ -789,6 +789,11 @@
|
|
|
789
789
|
"category": "application",
|
|
790
790
|
"description": "Terminal or console"
|
|
791
791
|
},
|
|
792
|
+
"terminal-secure": {
|
|
793
|
+
"tags": ["console", "command", "shell", "cli", "lock", "secure", "protected"],
|
|
794
|
+
"category": "application",
|
|
795
|
+
"description": "Secure terminal"
|
|
796
|
+
},
|
|
792
797
|
"text-size": {
|
|
793
798
|
"tags": ["font", "typography", "scale", "zoom"],
|
|
794
799
|
"category": "text",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vscode/codicons",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46-0",
|
|
4
4
|
"fontVersion": "1.15",
|
|
5
5
|
"description": "The icon font for Visual Studio Code",
|
|
6
6
|
"license": "CC-BY-4.0",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"embed-metadata": "node ./scripts/embed-metadata.js",
|
|
17
17
|
"embed-svg-data": "node ./scripts/embed-svg-data.js",
|
|
18
18
|
"check-metadata": "node ./scripts/check-metadata.js",
|
|
19
|
-
"fonts": "fantasticon",
|
|
19
|
+
"fonts": "node ./scripts/patch-fantasticon.js && fantasticon",
|
|
20
20
|
"dev": "npm run build && npm run replace-in-vscode",
|
|
21
21
|
"build": "npm run clean && npm run svgo && npm run fonts && npm run export-to-ts && npm run export-to-csv && npm run copy-metadata && npm run embed-metadata && npm run embed-svg-data && npm run sprite",
|
|
22
22
|
"version:bump": "node ./scripts/version-bump.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"ansi-regex": ">=5.0.1",
|
|
40
|
-
"fantasticon": "^1.
|
|
40
|
+
"fantasticon": "^4.1.0",
|
|
41
41
|
"husky": "^9.1.7",
|
|
42
42
|
"opentype.js": "^1.3.4",
|
|
43
43
|
"svg-sprite": "^2.0.4",
|
|
44
|
-
"svgo": "4.0.
|
|
44
|
+
"svgo": "4.0.1"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Temporary Windows compatibility patch for Fantasticon.
|
|
3
|
+
*
|
|
4
|
+
* Context:
|
|
5
|
+
* https://github.com/tancredi/fantasticon/issues/470
|
|
6
|
+
*
|
|
7
|
+
* Fantasticon 4.x builds the SVG discovery pattern internally using `path.join`
|
|
8
|
+
* and then passes that pattern into `glob`. On Windows, `path.join` emits
|
|
9
|
+
* backslashes, so the generated pattern looks like:
|
|
10
|
+
*
|
|
11
|
+
* D:\a\vscode-codicons\vscode-codicons\src\icons\**\*.svg
|
|
12
|
+
*
|
|
13
|
+
* The `glob` package does not interpret those backslashes as path separators in
|
|
14
|
+
* a glob expression. Instead, they are treated as escape characters. The result
|
|
15
|
+
* is that the pattern matches zero files, even though the icons are present on
|
|
16
|
+
* disk and earlier build steps such as `svgo -f ./src/icons/` can see them.
|
|
17
|
+
*
|
|
18
|
+
* That is why the CI failure looks misleading:
|
|
19
|
+
*
|
|
20
|
+
* No SVGs found in D:/a/vscode-codicons/vscode-codicons/src/icons
|
|
21
|
+
*
|
|
22
|
+
* The directory exists. The files exist. The problem is the glob pattern that
|
|
23
|
+
* Fantasticon constructs internally before it searches for the files.
|
|
24
|
+
*
|
|
25
|
+
* We already normalize the paths we pass into `.fantasticonrc.js`, but that is
|
|
26
|
+
* not sufficient because Fantasticon recreates the broken Windows pattern inside
|
|
27
|
+
* its own compiled runtime. The upstream issue thread repeatedly points to the
|
|
28
|
+
* same low-level fix: normalize the generated glob path to forward slashes
|
|
29
|
+
* before `glob` receives it.
|
|
30
|
+
*
|
|
31
|
+
* This script applies exactly that workaround to the installed Fantasticon
|
|
32
|
+
* package on Windows before the `fantasticon` CLI is executed. It patches both
|
|
33
|
+
* the library bundle and the CLI bundle because the published package contains
|
|
34
|
+
* duplicated compiled entrypoints under `dist/`.
|
|
35
|
+
*
|
|
36
|
+
* Scope and intent:
|
|
37
|
+
* - Windows only
|
|
38
|
+
* - No-op on macOS/Linux
|
|
39
|
+
* - Idempotent if the dependency is already patched
|
|
40
|
+
* - Fails loudly if Fantasticon changes shape and the expected line is no longer
|
|
41
|
+
* present, because a silent no-op would hide a broken release path
|
|
42
|
+
*
|
|
43
|
+
* This should be considered a repository-side compatibility shim until the
|
|
44
|
+
* upstream fix from the Fantasticon issue/PR thread lands in a released version
|
|
45
|
+
* that we can consume directly.
|
|
46
|
+
*/
|
|
47
|
+
const fs = require('fs');
|
|
48
|
+
const path = require('path');
|
|
49
|
+
|
|
50
|
+
if (process.platform !== 'win32') {
|
|
51
|
+
process.exit(0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const targetFiles = [
|
|
55
|
+
path.resolve(__dirname, '..', 'node_modules', 'fantasticon', 'dist', 'index.cjs'),
|
|
56
|
+
path.resolve(__dirname, '..', 'node_modules', 'fantasticon', 'dist', 'cli', 'index.cjs')
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
const replacementSuffix = ".replace(/\\\\/g, '/')";
|
|
60
|
+
const targetSnippet = '`**/*.${ASSETS_EXTENSION}`';
|
|
61
|
+
let patchedFileCount = 0;
|
|
62
|
+
let alreadyPatchedCount = 0;
|
|
63
|
+
|
|
64
|
+
for (const targetFile of targetFiles) {
|
|
65
|
+
if (!fs.existsSync(targetFile)) {
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const originalContent = fs.readFileSync(targetFile, 'utf8');
|
|
70
|
+
const patchedContent = originalContent
|
|
71
|
+
.split('\n')
|
|
72
|
+
.map((line) => {
|
|
73
|
+
if (!line.includes('const globPath = ') || !line.includes(targetSnippet) || line.includes(replacementSuffix)) {
|
|
74
|
+
return line;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return line.replace(';', `${replacementSuffix};`);
|
|
78
|
+
})
|
|
79
|
+
.join('\n');
|
|
80
|
+
|
|
81
|
+
if (patchedContent !== originalContent) {
|
|
82
|
+
fs.writeFileSync(targetFile, patchedContent, 'utf8');
|
|
83
|
+
patchedFileCount += 1;
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
if (originalContent.includes(replacementSuffix)) {
|
|
88
|
+
alreadyPatchedCount += 1;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (patchedFileCount === 0 && alreadyPatchedCount === 0) {
|
|
93
|
+
console.error('fantasticon-fix: expected globPath pattern not found in installed Fantasticon files.');
|
|
94
|
+
process.exit(1);
|
|
95
|
+
}
|
package/scripts/reset.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
const fs = require("fs");
|
|
2
|
-
const rimraf = require("rimraf");
|
|
3
2
|
|
|
4
3
|
const outputDirectory = "dist";
|
|
5
4
|
|
|
6
5
|
// clear dist folder
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fs.mkdirSync(outputDirectory);
|
|
13
|
-
});
|
|
6
|
+
fs.rmSync(outputDirectory, { recursive: true, force: true });
|
|
7
|
+
console.log(`deleted "${outputDirectory}" folder`);
|
|
8
|
+
|
|
9
|
+
// re-create dist folder
|
|
10
|
+
fs.mkdirSync(outputDirectory, { recursive: true });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M14
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M14.452 1.548C14.087 1.183 13.608 1 13.13 1C12.652 1 12.173 1.183 11.808 1.548L6.979 6.377C6.697 6.659 6.498 7.011 6.401 7.398L6.027 8.896C5.883 9.473 6.329 10.002 6.886 10.002C6.958 10.002 7.031 9.993 7.106 9.975L8.604 9.601C8.99 9.504 9.343 9.305 9.625 9.023L14.454 4.194C15.184 3.464 15.184 2.28 14.454 1.549L14.452 1.548ZM13.745 3.485L8.916 8.314C8.763 8.467 8.57 8.576 8.36 8.629L7.04 8.962L7.371 7.64C7.424 7.43 7.532 7.237 7.686 7.084L12.516 2.255C12.68 2.091 12.899 2 13.131 2C13.363 2 13.582 2.091 13.746 2.255C14.085 2.594 14.085 3.146 13.746 3.486L13.745 3.485ZM13 7.768L14 6.768V11.5C14 12.878 12.879 14 11.5 14H4.5C3.121 14 2 12.878 2 11.5V4.5C2 3.122 3.121 2 4.5 2H9.236L8.236 3H4.5C3.673 3 3 3.673 3 4.5V11.5C3 12.327 3.673 13 4.5 13H11.5C12.327 13 13 12.327 13 11.5V7.768Z"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg" fill="currentColor"><path d="M15 3H14.5V2C14.5 0.895 13.605 0 12.5 0C11.395 0 10.5 0.895 10.5 2V3H10C9.448 3 9 3.448 9 4V8C9 8.552 9.448 9 10 9H15C15.552 9 16 8.552 16 8V4C16 3.448 15.552 3 15 3ZM12.5 6.75C12.086 6.75 11.75 6.414 11.75 6C11.75 5.586 12.086 5.25 12.5 5.25C12.914 5.25 13.25 5.586 13.25 6C13.25 6.414 12.914 6.75 12.5 6.75ZM13.5 3H11.5V2C11.5 1.448 11.948 1 12.5 1C13.052 1 13.5 1.448 13.5 2V3ZM14 10H15V12.5C15 13.879 13.879 15 12.5 15H3.5C2.121 15 1 13.879 1 12.5V3.5C1 2.122 2.121 1 3.5 1H9V2H3.5C2.673 2 2 2.673 2 3.5V12.5C2 13.327 2.673 14 3.5 14H12.5C13.327 14 14 13.327 14 12.5V10ZM7 11.5C7 11.224 7.224 11 7.5 11H12.5C12.776 11 13 11.224 13 11.5C13 11.776 12.776 12 12.5 12H7.5C7.224 12 7 11.776 7 11.5ZM3.146 11.147L5.792 8.501L3.146 5.855C2.951 5.66 2.951 5.343 3.146 5.148C3.341 4.953 3.658 4.953 3.853 5.148L6.853 8.148C7.048 8.343 7.048 8.66 6.853 8.855L3.854 11.854C3.756 11.952 3.628 12 3.5 12C3.372 12 3.244 11.951 3.146 11.854C2.951 11.659 2.951 11.342 3.146 11.147Z"/></svg>
|
|
@@ -789,6 +789,11 @@
|
|
|
789
789
|
"category": "application",
|
|
790
790
|
"description": "Terminal or console"
|
|
791
791
|
},
|
|
792
|
+
"terminal-secure": {
|
|
793
|
+
"tags": ["console", "command", "shell", "cli", "lock", "secure", "protected"],
|
|
794
|
+
"category": "application",
|
|
795
|
+
"description": "Secure terminal"
|
|
796
|
+
},
|
|
792
797
|
"text-size": {
|
|
793
798
|
"tags": ["font", "typography", "scale", "zoom"],
|
|
794
799
|
"category": "text",
|