Add automated change file generation
This commit is contained in:
parent
78f0fb89e4
commit
799c5027e7
20 changed files with 1044 additions and 808 deletions
24
.editorconfig
Normal file
24
.editorconfig
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[*.{js,jsx,ts,tsx}]
|
||||||
|
insert_final_newline = true
|
||||||
|
block_comment_start = /*
|
||||||
|
block_comment = *
|
||||||
|
block_comment_end = */
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
insert_final_newline = false
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
# The indent size used in the `package.json` file cannot be changed
|
||||||
|
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
|
||||||
|
[{*.yml,*.yaml,package.json}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
|
@ -14,11 +14,12 @@
|
||||||
"extends": "eslint:recommended",
|
"extends": "eslint:recommended",
|
||||||
"rules": {
|
"rules": {
|
||||||
"indent": ["error", "tab", { "SwitchCase": 1 }],
|
"indent": ["error", "tab", { "SwitchCase": 1 }],
|
||||||
"linebreak-style": ["error", "windows"],
|
|
||||||
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
|
"quotes": ["error", "double", { "allowTemplateLiterals": true }],
|
||||||
"semi": ["error", "always"],
|
"semi": ["error", "always"],
|
||||||
"no-var":"error",
|
"no-var": "error",
|
||||||
"no-console": 0,
|
"no-console": 0,
|
||||||
"no-constant-condition": ["error", { "checkLoops": false }]
|
"no-constant-condition": ["error", { "checkLoops": false }],
|
||||||
|
"no-mixed-spaces-and-tabs": ["error", "smart-tabs"],
|
||||||
|
"no-unused-vars": ["off"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -63,3 +63,6 @@ package-lock.json
|
||||||
private.toml
|
private.toml
|
||||||
private-build-plans.toml
|
private-build-plans.toml
|
||||||
private.mk
|
private.mk
|
||||||
|
|
||||||
|
# Ignore tmp directory
|
||||||
|
tmp
|
1
.npmrc
Normal file
1
.npmrc
Normal file
|
@ -0,0 +1 @@
|
||||||
|
package-lock=false
|
4
changes/3.0.0-alpha.1.md
Normal file
4
changes/3.0.0-alpha.1.md
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
* The letters `k`, `x`, `v`, `A`, etc. will now use straight legs by default. The “curly” families will keep the old shape.
|
||||||
|
* Note this is a parameter difference rather than variant. So there won’t be a `cv##` or `ss##` variant selector.
|
||||||
|
* Introduced a curly italic `k` with untagged variant `v-k-italic`.
|
||||||
|
* Introduced `ss12` OpenType tag for Ubuntu-Mono style as well as a prebuilt `SS12` family.
|
10
changes/3.0.0-alpha.2.md
Normal file
10
changes/3.0.0-alpha.2.md
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
* Extended width will be built automatically and integrate into existing families.
|
||||||
|
* Added more letter-like symbols: `⅋`, `ℂ`, `ℍ`, `ℙ`, `ℕ`, `ℚ`, `ℝ`, `ℤ`, `ℵ`, `ℶ`.
|
||||||
|
* Refine the height of brackets and symbols.
|
||||||
|
* Renamed various variant selectors:
|
||||||
|
* `v-m-longleg` → `v-m-normal`
|
||||||
|
* `v-one-hooky` → `v-one-nobase`
|
||||||
|
* `v-one-serifed` → `v-one-base`
|
||||||
|
* `v-seven-normal` → `v-seven-noserif`
|
||||||
|
* `v-seven-force-serifed` → `v-seven-serifed`
|
||||||
|
* Added `v-lig-ltgteq-flat` (`cv66`) and `v-lig-ltgteq-slanted` (`cv67`) to change the shape of `<=` and `>=` ligation.
|
3
changes/3.0.0-alpha.3.md
Normal file
3
changes/3.0.0-alpha.3.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
* Added ligation for `~>`, `<~`, `~~>`, etc.
|
||||||
|
* Further refined the shapes of APL symbols.
|
||||||
|
* Added old-style numbers. Feature `onum` and `lnum` are enabled.
|
7
changes/3.0.0-alpha.4.md
Normal file
7
changes/3.0.0-alpha.4.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
* Added three-line ligation of `===` and `!==` for JavaScript, PHP, etc.
|
||||||
|
* Default ligature set selector: `ligset-javascript` and `ligset-php`.
|
||||||
|
* Cherry-picking configuration selector: `eqeqeq` and `exeqeq`.
|
||||||
|
* OpenType tags: `XJS0`, `XPHP`.
|
||||||
|
* Exposed curly-vs-straight letterform selectors.
|
||||||
|
* OpenType tags are from `cv70` to `cv83`.
|
||||||
|
* Fixed style linking for extended variants.
|
0
changes/3.0.0-alpha.5.md
Normal file
0
changes/3.0.0-alpha.5.md
Normal file
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "iosevka",
|
"name": "iosevka",
|
||||||
"version": "3.0.0-alpha.4",
|
"version": "3.0.0-alpha.5",
|
||||||
"main": "./generate.js",
|
"main": "./generate.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.4.0"
|
"node": ">=8.4.0"
|
||||||
|
@ -30,6 +30,7 @@
|
||||||
"patel": "^0.33.1",
|
"patel": "^0.33.1",
|
||||||
"patrisika-scopes": "^0.11.1",
|
"patrisika-scopes": "^0.11.1",
|
||||||
"eslint": "^5.2.0",
|
"eslint": "^5.2.0",
|
||||||
"stylus": "^0.54.5"
|
"stylus": "^0.54.5",
|
||||||
|
"semver": "^7.1.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
147
utility/generate-release-note.js
Normal file
147
utility/generate-release-note.js
Normal file
|
@ -0,0 +1,147 @@
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const path = require("path");
|
||||||
|
const fs = require("fs-extra");
|
||||||
|
const semver = require("semver");
|
||||||
|
|
||||||
|
const ChangeFileDir = path.join(__dirname, "../changes");
|
||||||
|
const ModifiedSinceVersion = "2.x";
|
||||||
|
const Version = process.argv[2];
|
||||||
|
|
||||||
|
class Output {
|
||||||
|
constructor() {
|
||||||
|
this.buffer = "";
|
||||||
|
}
|
||||||
|
log(...s) {
|
||||||
|
this.buffer += s.join("") + "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function main() {
|
||||||
|
const out = new Output();
|
||||||
|
await GenerateChangeList(out);
|
||||||
|
await CopyMarkdown(out, "packages-desc.md");
|
||||||
|
await GeneratePackageList(out);
|
||||||
|
await CopyMarkdown(out, "style-set-sample-image.md");
|
||||||
|
await CopyMarkdown(out, "deprecated-packages.md");
|
||||||
|
await fs.ensureDir(path.join(__dirname, `../release-archives/`));
|
||||||
|
await fs.writeFile(
|
||||||
|
path.join(__dirname, `../release-archives/release-notes-${Version}.md`),
|
||||||
|
out.buffer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
main().catch(e => {
|
||||||
|
console.error(e);
|
||||||
|
process.exit(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Copy Markdown
|
||||||
|
|
||||||
|
async function CopyMarkdown(out, name) {
|
||||||
|
const content = await fs.readFile(
|
||||||
|
path.resolve(__dirname, `release-note-fragments/${name}`),
|
||||||
|
"utf8"
|
||||||
|
);
|
||||||
|
out.log(content);
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// CHANGE LIST
|
||||||
|
|
||||||
|
async function GenerateChangeList(out) {
|
||||||
|
const changeFiles = await fs.readdir(ChangeFileDir);
|
||||||
|
const fragments = new Map();
|
||||||
|
for (const file of changeFiles) {
|
||||||
|
const filePath = path.join(ChangeFileDir, file);
|
||||||
|
const fileParts = path.parse(filePath);
|
||||||
|
if (fileParts.ext !== ".md") continue;
|
||||||
|
if (!semver.valid(fileParts.name) || semver.lt(Version, fileParts.name)) continue;
|
||||||
|
fragments.set(fileParts.name, await fs.readFile(filePath, "utf8"));
|
||||||
|
}
|
||||||
|
const sortedFragments = Array.from(fragments).sort((a, b) => semver.compare(b[0], a[0]));
|
||||||
|
|
||||||
|
out.log(`## Modifications since version ${ModifiedSinceVersion}`);
|
||||||
|
for (const [version, notes] of sortedFragments) {
|
||||||
|
out.log(` * **${version}**`);
|
||||||
|
out.log((notes.trim() + "\n").replace(/^/gm, " "));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// PACKAGE LIST
|
||||||
|
|
||||||
|
const PackageShapes = {
|
||||||
|
// shapeDesc, shapeNameSuffix, slab, count, nospace
|
||||||
|
"": ["Default", "", false, true],
|
||||||
|
slab: ["Slab", "Slab", true, true],
|
||||||
|
curly: ["Curly", "Curly", false, true],
|
||||||
|
"curly-slab": ["Curly Slab", "Curly Slab", true, true],
|
||||||
|
ss01: ["Andale Mono Style", "SS01"],
|
||||||
|
ss02: ["Anonymous Pro Style", "SS02"],
|
||||||
|
ss03: ["Consolas Style", "SS03"],
|
||||||
|
ss04: ["Menlo Style", "SS04"],
|
||||||
|
ss05: ["Fira Mono Style", "SS05"],
|
||||||
|
ss06: ["Liberation Mono Style", "SS06"],
|
||||||
|
ss07: ["Monaco Style", "SS07"],
|
||||||
|
ss08: ["Pragmata Pro Style", "SS08"],
|
||||||
|
ss09: ["Source Code Pro Style", "SS09"],
|
||||||
|
ss10: ["Envy Code R Style", "SS10"],
|
||||||
|
ss11: ["X Windows Fixed Style", "SS11"],
|
||||||
|
ss12: ["Ubuntu Mono Style", "SS12"],
|
||||||
|
aile: ["Quasi-proportional", "Aile", false, false, true],
|
||||||
|
etoile: ["Quasi-proportional slab-serif", "Etoile", false, false, true],
|
||||||
|
sparkle: ["Quasi-proportional family — like iA Writer’s Duo.", "Sparkle", false, false, true]
|
||||||
|
};
|
||||||
|
|
||||||
|
const PackageSpacings = {
|
||||||
|
// spacingDesc, ligation, spacingNameSuffix
|
||||||
|
"": ["Default", true, ""],
|
||||||
|
term: ["Terminal", false, "Type"],
|
||||||
|
type: ["Typesetting", true, "Type"],
|
||||||
|
"term-lig": ["Terminal-Ligature", true, "TermLig"]
|
||||||
|
};
|
||||||
|
|
||||||
|
async function GeneratePackageList(out) {
|
||||||
|
let nr = 1;
|
||||||
|
out.log(`### Packages`);
|
||||||
|
out.log(`| Package | Description |\n| --- | --- |`);
|
||||||
|
for (let shape in PackageShapes) {
|
||||||
|
const [shapeDesc, shapeNameSuffix, , count, nospace] = PackageShapes[shape];
|
||||||
|
for (let spacing in PackageSpacings) {
|
||||||
|
if (nospace && spacing) continue;
|
||||||
|
const [spacingDesc, ligation, spacingNameSuffix] = PackageSpacings[spacing];
|
||||||
|
const fileName = buildName(
|
||||||
|
"-",
|
||||||
|
count ? pad(nr, 2, "0") : "",
|
||||||
|
"iosevka",
|
||||||
|
spacing,
|
||||||
|
shape,
|
||||||
|
Version
|
||||||
|
);
|
||||||
|
const familyName = buildName(" ", "Iosevka", spacingNameSuffix, shapeNameSuffix);
|
||||||
|
const desc = nospace
|
||||||
|
? `_${shapeDesc}_`
|
||||||
|
: `**Shape**: _${shapeDesc}_; **Spacing**: _${spacingDesc}_ <br/>` +
|
||||||
|
`**Ligation**: ${flag(ligation)}`;
|
||||||
|
if (count) nr++;
|
||||||
|
out.log(`| \`${fileName}\`<br/>**Menu Name**: \`${familyName}\` | ${desc} |`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
out.log();
|
||||||
|
}
|
||||||
|
|
||||||
|
function pad(s, n, p) {
|
||||||
|
s = "" + s;
|
||||||
|
while (s.length < n) s = p + s;
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildName(j, ...parts) {
|
||||||
|
return parts.filter(x => !!x).join(j);
|
||||||
|
}
|
||||||
|
|
||||||
|
function flag(f) {
|
||||||
|
return f ? "**Yes**" : "No";
|
||||||
|
}
|
8
utility/release-note-fragments/deprecated-packages.md
Normal file
8
utility/release-note-fragments/deprecated-packages.md
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
### Deprecated Series
|
||||||
|
|
||||||
|
The “CC” series, which is intended to made width-compatible with legacy East Asian fonts from Iosevka 2.x is considered deprecated and will be removed soon. The variants include:
|
||||||
|
|
||||||
|
* `iosevka-cc-DEPRECATED-<version>`
|
||||||
|
* `iosevka-cc-slab-DEPRECATED-<version>`
|
||||||
|
* `iosevka-cc-curly-DEPRECATED-<version>`
|
||||||
|
* `iosevka-cc-curly-slab-DEPRECATED-<version>`
|
14
utility/release-note-fragments/packages-desc.md
Normal file
14
utility/release-note-fragments/packages-desc.md
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
## Prebuilt Packages
|
||||||
|
|
||||||
|
Iosevka provides a large variety of variants. Prebuilt variants are described below.
|
||||||
|
|
||||||
|
- **Spacing** : How wide some specific characters are.
|
||||||
|
- _Default_: The default variant with ligatures and semantic full-width glyphs.
|
||||||
|
- _Terminal_ (“Term”): Exact monospaced font without ligatures and full-width glyphs. Since some environments cannot interpret Iosevka as monospaced, and have difficulties with ligatures included, you can use Iosevka Term as an alternative.
|
||||||
|
- _Terminal-Ligature_ (“TermLig”):Exact monospaced font with ligatures.
|
||||||
|
- _Typesetting_ (“Type”): Similar to _Default_, but more mathematical symbols are wider.
|
||||||
|
- **Shape** : Key shape parameters:
|
||||||
|
- *Slab*: Letters will contain slab serif.
|
||||||
|
- *Curly*: Letters like `k`, `x`, `v`, `A`, `R` will have curly leg shapes.
|
||||||
|
- **Ligatures** : Whether the ligatures is included. The “no-ligature” variants are used for some Linux-based environments cannot handle ligatures correctly.
|
||||||
|
- **Menu Name** : The family name of the font in your OS after installation. If two variants share the same family name, they cannot be installed together.
|
1
utility/release-note-fragments/style-set-sample-image.md
Normal file
1
utility/release-note-fragments/style-set-sample-image.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|

|
12
verdafile.js
12
verdafile.js
|
@ -563,6 +563,17 @@ const AllSuperTtc = task(`all:super-ttc`, async target => {
|
||||||
await target.need(Object.keys(collectPlans.groups).map(gr => SuperTTC(gr)));
|
await target.need(Object.keys(collectPlans.groups).map(gr => SuperTTC(gr)));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const ChangeFileList = oracle.make(
|
||||||
|
() => `release:change-file-list`,
|
||||||
|
target => FileList({ under: "changes", pattern: "*.md" })(target)
|
||||||
|
);
|
||||||
|
const ReleaseNotes = task(`release:release-note`, async target => {
|
||||||
|
const [version] = await target.need(Version);
|
||||||
|
const [changeFiles] = await target.need(ChangeFileList());
|
||||||
|
await target.need(changeFiles.map(fu));
|
||||||
|
await run("node", "utility/generate-release-note", version);
|
||||||
|
});
|
||||||
|
|
||||||
phony(`clean`, async () => {
|
phony(`clean`, async () => {
|
||||||
await rm(`build`);
|
await rm(`build`);
|
||||||
await rm(`dist`);
|
await rm(`dist`);
|
||||||
|
@ -572,6 +583,7 @@ phony(`clean`, async () => {
|
||||||
phony(`release`, async target => {
|
phony(`release`, async target => {
|
||||||
await target.need(AllArchives, AllSuperTtc);
|
await target.need(AllArchives, AllSuperTtc);
|
||||||
await target.need(SampleImages, Pages);
|
await target.need(SampleImages, Pages);
|
||||||
|
await target.need(ReleaseNotes);
|
||||||
});
|
});
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue