nibula 2.0.1 → 2.0.2
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 +29 -0
- package/bin/nibula.js +24 -2
- package/package.json +1 -1
- package/src/frontend/components/global/header.njk +1 -1
- package/src/frontend/js/global.js +3 -7
- package/src/frontend/ts/global.ts +3 -7
- package/src/frontend/ts/pages/404.ts +1 -1
- package/src/frontend/ts/pages/homepage.ts +1 -1
- package/tools/config/messages.json +10 -0
- package/tools/res/templates/template.js +1 -0
- package/tools/res/templates/template.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,35 @@ All notable changes to Nibula are documented here.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.2] - 2026-08-08
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- `nib update` installed the new version without saying which one, and without
|
|
12
|
+
asking. It now reports the installed version and the one it is about to
|
|
13
|
+
install, and waits for confirmation — the update replaces the globally
|
|
14
|
+
installed Nibula, so it should not happen as a side effect of typing the
|
|
15
|
+
command.
|
|
16
|
+
- The prompt states that the update applies to newly created projects only.
|
|
17
|
+
Existing ones keep running their own copy, which the delegation introduced in
|
|
18
|
+
1.6.0 already guaranteed, but nothing said so at the moment it mattered.
|
|
19
|
+
- `nib update` no longer installs blindly when the npm registry can't be
|
|
20
|
+
reached. The version lookup returns nothing in that case, and the command went
|
|
21
|
+
on to install `nibula@latest` anyway; it now reports the failure and stops.
|
|
22
|
+
- Running `nib update` outside a terminal updated without confirmation and
|
|
23
|
+
reported nothing. It now explains that a terminal is required.
|
|
24
|
+
|
|
25
|
+
### Changed
|
|
26
|
+
- `src/frontend/js/global.js` and `src/frontend/ts/global.ts` call the listener
|
|
27
|
+
directly instead of declaring `initGlobal` and passing it to
|
|
28
|
+
`DOMContentLoaded`. The named function added a level of indirection to a
|
|
29
|
+
scaffolded file that starts out empty, and a beginner reading it had to follow
|
|
30
|
+
two hops to find where their code goes.
|
|
31
|
+
- `src/frontend/components/global/header.njk` reads the logo from
|
|
32
|
+
`{{ site.logo }}` instead of a hardcoded path. The value was already in
|
|
33
|
+
`site.json`, documented and used by the Open Graph image and the JSON-LD
|
|
34
|
+
publisher block; the header was the one place that ignored it, so changing the
|
|
35
|
+
logo left it pointing at the old file.
|
|
36
|
+
|
|
8
37
|
## [2.0.1] - 2026-08-08
|
|
9
38
|
|
|
10
39
|
### Added
|
package/bin/nibula.js
CHANGED
|
@@ -278,10 +278,32 @@ async function main() {
|
|
|
278
278
|
}
|
|
279
279
|
case 'update': {
|
|
280
280
|
const info = await checkVersion();
|
|
281
|
-
|
|
282
|
-
|
|
281
|
+
|
|
282
|
+
if (info.latest === null) {
|
|
283
|
+
console.error(`\n${color.yellow}${message('update.unknownLatest')}${color.reset}\n`);
|
|
284
|
+
process.exit(1);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
if (!info.behind) {
|
|
288
|
+
console.log(message('update.upToDate', { current: info.current }));
|
|
289
|
+
process.exit(0);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
console.log(`\n${message('update.current', { current: info.current })}`);
|
|
293
|
+
console.log(`${color.green}${message('update.available', { latest: info.latest })}${color.reset}`);
|
|
294
|
+
console.log(`${color.dim}${message('update.scopeNotice')}${color.reset}\n`);
|
|
295
|
+
|
|
296
|
+
if (!process.stdin.isTTY) {
|
|
297
|
+
console.error(message('update.nonInteractive'));
|
|
298
|
+
process.exit(1);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const answer = await ask(message('update.confirm'));
|
|
302
|
+
if (answer !== '' && answer !== 'y' && answer !== 'yes') {
|
|
303
|
+
console.log(message('update.cancelled'));
|
|
283
304
|
process.exit(0);
|
|
284
305
|
}
|
|
306
|
+
|
|
285
307
|
process.exit(updateGlobal(info.latest));
|
|
286
308
|
}
|
|
287
309
|
case undefined:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nibula",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "A beginner-friendly static site generator built on Eleventy that stays close to vanilla HTML, CSS and JS — with a page-management CLI, an optional PHP backend, and SEO files generated for you.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"11ty",
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// import { initExampleModule } from "./modules/exampleModule.js";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
4
4
|
// initExampleModule();
|
|
5
|
-
}
|
|
5
|
+
});
|
|
6
6
|
|
|
7
|
-
// Global logic here
|
|
8
|
-
|
|
9
|
-
// Do not touch
|
|
10
|
-
// This instruction starts global.js itself
|
|
11
|
-
document.addEventListener('DOMContentLoaded', initGlobal);
|
|
7
|
+
// Global logic here
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
// import { initExampleModule } from "./modules/exampleModule"
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
document.addEventListener('DOMContentLoaded', () => {
|
|
4
4
|
// initExampleModule();
|
|
5
|
-
}
|
|
5
|
+
});
|
|
6
6
|
|
|
7
|
-
// Global logic here
|
|
8
|
-
|
|
9
|
-
// Do not touch
|
|
10
|
-
// This instruction starts global.ts itself
|
|
11
|
-
document.addEventListener('DOMContentLoaded', initGlobal);
|
|
7
|
+
// Global logic here
|
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
"alreadyInside": "You are already inside a Nibula project.",
|
|
5
5
|
"alreadyInsideHint": "Run \"nib new\" from outside a project."
|
|
6
6
|
},
|
|
7
|
+
"update": {
|
|
8
|
+
"current": "Current version: {current}",
|
|
9
|
+
"available": "Latest version: {latest}",
|
|
10
|
+
"unknownLatest": "Could not reach the npm registry to check the latest version.",
|
|
11
|
+
"scopeNotice": "The update applies to newly created projects only. Existing ones keep running their own copy of Nibula.",
|
|
12
|
+
"confirm": "Update now? [Y/n] ",
|
|
13
|
+
"cancelled": "Update cancelled.",
|
|
14
|
+
"nonInteractive": "Run the command in a terminal to confirm the update.",
|
|
15
|
+
"upToDate": "Already on the latest version ({current})."
|
|
16
|
+
},
|
|
7
17
|
"validation": {
|
|
8
18
|
"invalidName": "Invalid name.",
|
|
9
19
|
"invalidNameCharacters": "Page name can only contain lowercase letters, numbers, and hyphens.",
|