@jungvonmatt/cssg-plugin-hugo 4.1.1 → 5.0.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/.turbo/turbo-lint.log +6 -4
- package/CHANGELOG.md +80 -0
- package/index.d.ts +2 -3
- package/index.js +11 -5
- package/package.json +18 -18
- package/tsconfig.json +1 -1
- package/.eslintrc.cjs +0 -13
- package/.turbo/turbo-test.log +0 -28
- package/jest.config.js +0 -4
package/.turbo/turbo-lint.log
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
> @jungvonmatt/cssg-plugin-hugo@4.1.
|
|
3
|
-
>
|
|
4
|
-
|
|
1
|
+
|
|
2
|
+
> @jungvonmatt/cssg-plugin-hugo@4.1.2 lint /Users/benjamin.zoerb/Github/contentful-ssg/packages/cssg-plugin-hugo
|
|
3
|
+
> oxlint --fix index.js
|
|
4
|
+
|
|
5
|
+
Found 0 warnings and 0 errors.
|
|
6
|
+
Finished in 18ms on 1 file using 10 threads.
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,86 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [5.0.0](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.2...v5.0.0) (2026-05-05)
|
|
7
|
+
|
|
8
|
+
* Migrate vitest (#84) ([3e38739](https://github.com/jungvonmatt/contentful-ssg/commit/3e38739cd8419fa6e514eccaad1464d3fdebd98b)), closes [#84](https://github.com/jungvonmatt/contentful-ssg/issues/84)
|
|
9
|
+
* Bump dependencies (#83) ([a195ac0](https://github.com/jungvonmatt/contentful-ssg/commit/a195ac095e6376fe10b8c25ae009b314752dc455)), closes [#83](https://github.com/jungvonmatt/contentful-ssg/issues/83)
|
|
10
|
+
|
|
11
|
+
### BREAKING CHANGES
|
|
12
|
+
|
|
13
|
+
* drop Node 20 support, require Node >=22
|
|
14
|
+
|
|
15
|
+
* chore!: replace eslint+prettier with oxlint+oxfmt
|
|
16
|
+
|
|
17
|
+
- Add oxlint, oxlint-tsgolint, oxfmt as devDependencies
|
|
18
|
+
- Create .oxlintrc.json with type-aware linting enabled (>50 TS rules)
|
|
19
|
+
- Create .oxfmtrc.json (drop-in prettier replacement: singleQuote, printWidth=100)
|
|
20
|
+
- Replace prettier programmatic API in cssg cli.ts init command with oxfmt
|
|
21
|
+
- Update lint scripts in all packages to oxlint --type-aware --fix
|
|
22
|
+
- Add format / format:check root scripts using oxfmt
|
|
23
|
+
- Switch lint-staged from prettier to oxfmt + oxlint --fix
|
|
24
|
+
- Remove eslint, prettier, all xo configs, typescript-eslint, all eslint-plugin-*
|
|
25
|
+
- Delete .eslintrc.cjs files, .eslintignore, .prettierrc
|
|
26
|
+
- Apply oxfmt across the codebase (formatting changes only, no logic)
|
|
27
|
+
|
|
28
|
+
Type-aware linting now flags real issues (no-floating-promises,
|
|
29
|
+
no-misused-promises, await-thenable, switch-exhaustiveness-check,
|
|
30
|
+
unbound-method) as warnings; addressing them is left for follow-up.
|
|
31
|
+
* lint and format scripts changed; contributors must
|
|
32
|
+
re-run pnpm install. The .prettierrc is replaced by .oxfmtrc.json.
|
|
33
|
+
|
|
34
|
+
* style: apply oxfmt to remaining files
|
|
35
|
+
|
|
36
|
+
* fix: address oxlint type-aware warnings
|
|
37
|
+
|
|
38
|
+
- contentful-config: remove unused AwaitedCollectionItem type alias
|
|
39
|
+
- contentful-ssg/lib/config: prefix unused configFile with underscore
|
|
40
|
+
- contentful-ssg/lib/contentful: assign client/managementClient to
|
|
41
|
+
module-scoped vars (no-unassigned-vars); replace reduce-with-spread
|
|
42
|
+
in getFieldSettings with for-of (no-accumulating-spread)
|
|
43
|
+
- contentful-ssg/lib/array: replace for-await-of over sync iterable
|
|
44
|
+
with Promise.all (await-thenable)
|
|
45
|
+
- contentful-ssg/lib/ui: drop redundant Boolean() wrapper
|
|
46
|
+
* drop Node 20 support, require Node >=22
|
|
47
|
+
|
|
48
|
+
* chore!: replace eslint+prettier with oxlint+oxfmt
|
|
49
|
+
|
|
50
|
+
- Add oxlint, oxlint-tsgolint, oxfmt as devDependencies
|
|
51
|
+
- Create .oxlintrc.json with type-aware linting enabled (>50 TS rules)
|
|
52
|
+
- Create .oxfmtrc.json (drop-in prettier replacement: singleQuote, printWidth=100)
|
|
53
|
+
- Replace prettier programmatic API in cssg cli.ts init command with oxfmt
|
|
54
|
+
- Update lint scripts in all packages to oxlint --type-aware --fix
|
|
55
|
+
- Add format / format:check root scripts using oxfmt
|
|
56
|
+
- Switch lint-staged from prettier to oxfmt + oxlint --fix
|
|
57
|
+
- Remove eslint, prettier, all xo configs, typescript-eslint, all eslint-plugin-*
|
|
58
|
+
- Delete .eslintrc.cjs files, .eslintignore, .prettierrc
|
|
59
|
+
- Apply oxfmt across the codebase (formatting changes only, no logic)
|
|
60
|
+
|
|
61
|
+
Type-aware linting now flags real issues (no-floating-promises,
|
|
62
|
+
no-misused-promises, await-thenable, switch-exhaustiveness-check,
|
|
63
|
+
unbound-method) as warnings; addressing them is left for follow-up.
|
|
64
|
+
* lint and format scripts changed; contributors must
|
|
65
|
+
re-run pnpm install. The .prettierrc is replaced by .oxfmtrc.json.
|
|
66
|
+
|
|
67
|
+
* style: apply oxfmt to remaining files
|
|
68
|
+
|
|
69
|
+
* fix: address oxlint type-aware warnings
|
|
70
|
+
|
|
71
|
+
- contentful-config: remove unused AwaitedCollectionItem type alias
|
|
72
|
+
- contentful-ssg/lib/config: prefix unused configFile with underscore
|
|
73
|
+
- contentful-ssg/lib/contentful: assign client/managementClient to
|
|
74
|
+
module-scoped vars (no-unassigned-vars); replace reduce-with-spread
|
|
75
|
+
in getFieldSettings with for-of (no-accumulating-spread)
|
|
76
|
+
- contentful-ssg/lib/array: replace for-await-of over sync iterable
|
|
77
|
+
with Promise.all (await-thenable)
|
|
78
|
+
- contentful-ssg/lib/ui: drop redundant Boolean() wrapper
|
|
79
|
+
|
|
80
|
+
## [4.1.2](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.1...v4.1.2) (2026-02-12)
|
|
81
|
+
|
|
82
|
+
### Bug Fixes
|
|
83
|
+
|
|
84
|
+
- use workspace versions for internal deps ([38e767b](https://github.com/jungvonmatt/contentful-ssg/commit/38e767b171c9d082a31c2455c6ca3798d2f88d45))
|
|
85
|
+
|
|
6
86
|
## [4.1.1](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.0...v4.1.1) (2026-02-11)
|
|
7
87
|
|
|
8
88
|
**Note:** Version bump only for package @jungvonmatt/cssg-plugin-hugo
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export type TYPECONFIG_KEY = 'page' | 'data' | 'headless';
|
|
1
|
+
export type TYPECONFIG_KEY = 'page' | 'data' | 'headless';
|
|
3
2
|
export type TRANSLATION_STRATEGY = 'directory' | 'filename';
|
|
4
3
|
|
|
5
4
|
export interface AssetPluginConfig {
|
|
@@ -12,5 +11,5 @@ export interface AssetPluginConfig {
|
|
|
12
11
|
fieldIdParent: string;
|
|
13
12
|
typeConfig: {
|
|
14
13
|
[x: TYPECONFIG_KEY]: string | string[];
|
|
15
|
-
}
|
|
14
|
+
};
|
|
16
15
|
}
|
package/index.js
CHANGED
|
@@ -42,7 +42,7 @@ const defaultOptions = {
|
|
|
42
42
|
const hugoLocaleCode = (locale) => locale.code.toLowerCase();
|
|
43
43
|
|
|
44
44
|
export default (args) => {
|
|
45
|
-
const options = { ...defaultOptions, ...
|
|
45
|
+
const options = { ...defaultOptions, ...args };
|
|
46
46
|
|
|
47
47
|
const getSettingsHelper = (runtimeContext) => {
|
|
48
48
|
let settings = {};
|
|
@@ -56,7 +56,7 @@ export default (args) => {
|
|
|
56
56
|
);
|
|
57
57
|
const settingsFields = settingsEntries
|
|
58
58
|
.map((entry) => entry?.fields ?? {})
|
|
59
|
-
.reduce((result, fields) => (
|
|
59
|
+
.reduce((result, fields) => Object.assign(result, fields), {});
|
|
60
60
|
|
|
61
61
|
return [locale, settingsFields];
|
|
62
62
|
},
|
|
@@ -211,7 +211,7 @@ export default (args) => {
|
|
|
211
211
|
);
|
|
212
212
|
|
|
213
213
|
// Sort based on menuPos field
|
|
214
|
-
const sorted = [...filtered].
|
|
214
|
+
const sorted = [...filtered].toSorted(
|
|
215
215
|
(a, b) =>
|
|
216
216
|
(a?.fields?.[options.fieldIdMenuPos] ?? Number.MAX_SAFE_INTEGER) -
|
|
217
217
|
(b?.fields?.[options.fieldIdMenuPos] ?? Number.MAX_SAFE_INTEGER),
|
|
@@ -253,7 +253,10 @@ export default (args) => {
|
|
|
253
253
|
config(prev) {
|
|
254
254
|
const { managedDirectories } = prev || {};
|
|
255
255
|
|
|
256
|
-
return {
|
|
256
|
+
return {
|
|
257
|
+
...prev,
|
|
258
|
+
managedDirectories: [...(managedDirectories || []), 'data'],
|
|
259
|
+
};
|
|
257
260
|
},
|
|
258
261
|
|
|
259
262
|
// Before hook
|
|
@@ -296,7 +299,10 @@ export default (args) => {
|
|
|
296
299
|
return [
|
|
297
300
|
hugoLocaleCode(locale),
|
|
298
301
|
options.translationStrategy === 'directory'
|
|
299
|
-
? {
|
|
302
|
+
? {
|
|
303
|
+
contentDir: `content/${hugoLocaleCode(locale)}`,
|
|
304
|
+
...localeConfig,
|
|
305
|
+
}
|
|
300
306
|
: localeConfig,
|
|
301
307
|
];
|
|
302
308
|
}),
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jungvonmatt/cssg-plugin-hugo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
},
|
|
10
|
-
"type": "module",
|
|
11
|
-
"scripts": {
|
|
12
|
-
"test": "jest",
|
|
13
|
-
"lint": "eslint --color index.js --fix"
|
|
5
|
+
"keywords": [],
|
|
6
|
+
"homepage": "https://github.com/jungvonmatt/contentful-ssg#readme",
|
|
7
|
+
"bugs": {
|
|
8
|
+
"url": "https://github.com/jungvonmatt/contentful-ssg/issues"
|
|
14
9
|
},
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"author": "Ben Zörb",
|
|
15
12
|
"repository": {
|
|
16
13
|
"type": "git",
|
|
17
14
|
"url": "git+https://github.com/jungvonmatt/contentful-ssg.git"
|
|
18
15
|
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"main": "index.js",
|
|
18
|
+
"typings": "./index.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./index.js"
|
|
21
|
+
},
|
|
19
22
|
"publishConfig": {
|
|
20
23
|
"access": "public"
|
|
21
24
|
},
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
"bugs": {
|
|
26
|
-
"url": "https://github.com/jungvonmatt/contentful-ssg/issues"
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "vitest run",
|
|
27
|
+
"lint": "oxlint --fix index.js"
|
|
27
28
|
},
|
|
28
|
-
"homepage": "https://github.com/jungvonmatt/contentful-ssg#readme",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@jungvonmatt/contentful-ssg": "
|
|
30
|
+
"@jungvonmatt/contentful-ssg": "5.0.0",
|
|
31
31
|
"fs-extra": "^11.1.0",
|
|
32
32
|
"micromatch": "^4.0.5"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "dfbefe2c66877ed9411bdb242327e6915f58cf3e"
|
|
35
35
|
}
|
package/tsconfig.json
CHANGED
package/.eslintrc.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
root: true,
|
|
3
|
-
plugins: ['prettier'],
|
|
4
|
-
extends: ['xo-space', 'plugin:prettier/recommended'],
|
|
5
|
-
ignorePatterns: ['**/*.cjs', 'src/**/*.test.js', 'src/__test__/*'],
|
|
6
|
-
env: {
|
|
7
|
-
node: true,
|
|
8
|
-
jest: true,
|
|
9
|
-
},
|
|
10
|
-
rules: {
|
|
11
|
-
'@typescript-eslint/prefer-nullish-coalescing': 0,
|
|
12
|
-
},
|
|
13
|
-
};
|
package/.turbo/turbo-test.log
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
> @jungvonmatt/cssg-plugin-hugo@4.0.1 test
|
|
4
|
-
> jest
|
|
5
|
-
|
|
6
|
-
[1G[0K[1m[2mDetermining test suites to run...[22m[22m[999D[K
|
|
7
|
-
|
|
8
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
9
|
-
|
|
10
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
[0m[7m[33m[1m RUNS [22m[39m[27m[0m [0m[7m[37m cssg-plugin-hugo [39m[27m[0m [2m./[22m[1mindex.test.js[22m
|
|
23
|
-
|
|
24
|
-
[1mTests: [22m[1m[32m1 passed[39m[22m, 1 total
|
|
25
|
-
[1mSnapshots: [22m0 total
|
|
26
|
-
[1mTime:[22m 0.235 s
|
|
27
|
-
[2mRan all test suites[22m[2m.[22m
|
|
28
|
-
[1G[0K⠙[1G[0K
|
package/jest.config.js
DELETED