@sayue_ltr/fleq 2.0.0 → 2.0.1
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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [2.0.1](https://github.com/Lateo2580/FlEq/compare/v2.0.0...v2.0.1) (2026-05-03)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### バグ修正
|
|
9
|
+
|
|
10
|
+
* **update-checker:** scoped package 名の `/` を %2F に encode する ([6f02a0e](https://github.com/Lateo2580/FlEq/commit/6f02a0e5e9536272d1c4760575f10c7c93cc10d3))
|
|
11
|
+
* **update-checker:** scoped パッケージ名対応と personal build 検出 ([b4c75d8](https://github.com/Lateo2580/FlEq/commit/b4c75d8cbec707255e6e8d50a688dee415217f15))
|
|
12
|
+
|
|
5
13
|
## [2.0.0](https://github.com/Lateo2580/FlEq/compare/v1.51.0...v2.0.0) (2026-04-25)
|
|
6
14
|
|
|
7
15
|
|
|
@@ -50,7 +50,7 @@ const updateChecker = __importStar(require("../startup/update-checker"));
|
|
|
50
50
|
const log = __importStar(require("../../logger"));
|
|
51
51
|
const pipeline_controller_1 = require("../filter-template/pipeline-controller");
|
|
52
52
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
53
|
-
const { version: VERSION } = require("../../../package.json");
|
|
53
|
+
const { version: VERSION, name: PACKAGE_NAME } = require("../../../package.json");
|
|
54
54
|
async function runMonitor(opts) {
|
|
55
55
|
// ログレベル設定
|
|
56
56
|
if (opts.debug) {
|
|
@@ -163,7 +163,7 @@ async function runMonitor(opts) {
|
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
await printBanner(config);
|
|
166
|
-
updateChecker.checkForUpdates(
|
|
166
|
+
updateChecker.checkForUpdates(PACKAGE_NAME, VERSION);
|
|
167
167
|
await (0, monitor_1.startMonitor)(config, pipelineController);
|
|
168
168
|
}
|
|
169
169
|
/** ターミナルタイトルを設定する (ANSI OSC sequence) */
|
|
@@ -37,6 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.isUpdateCheckDisabled = isUpdateCheckDisabled;
|
|
40
|
+
exports.isPersonalBuild = isPersonalBuild;
|
|
40
41
|
exports.isNewerVersion = isNewerVersion;
|
|
41
42
|
exports.checkForUpdates = checkForUpdates;
|
|
42
43
|
const https = __importStar(require("https"));
|
|
@@ -61,6 +62,15 @@ function isUpdateCheckDisabled(env = process.env) {
|
|
|
61
62
|
return false;
|
|
62
63
|
return ["1", "true", "yes", "on"].includes(raw.toLowerCase());
|
|
63
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* personal overlay 版のビルドかどうかを判定する。
|
|
67
|
+
* `package.json.version` に `-personal` を含むビルドは公開 npm 版と差分があり
|
|
68
|
+
* 「最新公開版にアップデートしろ」という通知は意味を持たないため、チェック自体を skip する。
|
|
69
|
+
* 詳細: docs/specs/personal-branch-overlay-pattern.md / Knowledge/Dev の同名ノート参照。
|
|
70
|
+
*/
|
|
71
|
+
function isPersonalBuild(version) {
|
|
72
|
+
return /-personal\b/i.test(version);
|
|
73
|
+
}
|
|
64
74
|
/** キャッシュを読み込む。無効ならnullを返す */
|
|
65
75
|
function readCache() {
|
|
66
76
|
try {
|
|
@@ -134,7 +144,11 @@ function fetchJson(url, extractVersion) {
|
|
|
134
144
|
}
|
|
135
145
|
/** npm registry から最新バージョンを取得する */
|
|
136
146
|
function fetchFromNpm(packageName) {
|
|
137
|
-
|
|
147
|
+
// scoped package (`@scope/name`) は npm registry API 仕様で `/` を `%2F` に encode する必要がある。
|
|
148
|
+
// registry.npmjs.org は生 `/` も受け付けるが、厳密なミラー/プロキシでは弾かれうるため
|
|
149
|
+
// 明示 encode して移植性を確保する。`@` は encode 不要(仕様上どちらでも可)。
|
|
150
|
+
const encodedName = packageName.replace("/", "%2F");
|
|
151
|
+
return fetchJson(`https://registry.npmjs.org/${encodedName}/latest`, (data) => {
|
|
138
152
|
if (typeof data === "object" &&
|
|
139
153
|
data != null &&
|
|
140
154
|
"version" in data &&
|
|
@@ -202,6 +216,10 @@ function checkForUpdates(packageName, currentVersion) {
|
|
|
202
216
|
log.debug("update check skipped by FLEQ_NO_UPDATE_CHECK");
|
|
203
217
|
return;
|
|
204
218
|
}
|
|
219
|
+
if (isPersonalBuild(currentVersion)) {
|
|
220
|
+
log.debug(`update check skipped: personal build (${currentVersion})`);
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
205
223
|
// キャッシュが有効なら registry にアクセスしない
|
|
206
224
|
const cache = readCache();
|
|
207
225
|
if (cache != null && Date.now() - cache.lastCheck < CHECK_INTERVAL_MS) {
|
|
@@ -224,6 +242,9 @@ function checkForUpdates(packageName, currentVersion) {
|
|
|
224
242
|
}
|
|
225
243
|
/** 更新通知を表示する */
|
|
226
244
|
function printUpdateNotice(current, latest, packageName) {
|
|
227
|
-
|
|
245
|
+
// GitHub Releases の tag_name は "v2.0.0" 形式なので、表示前に先頭の v を strip する
|
|
246
|
+
const currentDisplay = current.replace(/^v/, "");
|
|
247
|
+
const latestDisplay = latest.replace(/^v/, "");
|
|
248
|
+
log.warn(`Update available: v${currentDisplay} → v${latestDisplay} ` +
|
|
228
249
|
chalk_1.default.gray(`npm install -g ${packageName}@latest`));
|
|
229
250
|
}
|