@jungvonmatt/cssg-plugin-hugo 4.1.2 → 5.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.
@@ -1,4 +1,6 @@
1
-
2
- > @jungvonmatt/cssg-plugin-hugo@4.1.1 lint /Users/benjamin.zoerb/Github/contentful-ssg/packages/cssg-plugin-hugo
3
- > eslint --color index.js --fix
4
-
1
+
2
+ > @jungvonmatt/cssg-plugin-hugo@5.0.0 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 10ms on 1 file using 10 threads.
package/CHANGELOG.md CHANGED
@@ -3,11 +3,89 @@
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.1](https://github.com/jungvonmatt/contentful-ssg/compare/v5.0.0...v5.0.1) (2026-05-05)
7
+
8
+ **Note:** Version bump only for package @jungvonmatt/cssg-plugin-hugo
9
+
10
+ # [5.0.0](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.2...v5.0.0) (2026-05-05)
11
+
12
+ * Migrate vitest (#84) ([3e38739](https://github.com/jungvonmatt/contentful-ssg/commit/3e38739cd8419fa6e514eccaad1464d3fdebd98b)), closes [#84](https://github.com/jungvonmatt/contentful-ssg/issues/84)
13
+ * Bump dependencies (#83) ([a195ac0](https://github.com/jungvonmatt/contentful-ssg/commit/a195ac095e6376fe10b8c25ae009b314752dc455)), closes [#83](https://github.com/jungvonmatt/contentful-ssg/issues/83)
14
+
15
+ ### BREAKING CHANGES
16
+
17
+ * drop Node 20 support, require Node >=22
18
+
19
+ * chore!: replace eslint+prettier with oxlint+oxfmt
20
+
21
+ - Add oxlint, oxlint-tsgolint, oxfmt as devDependencies
22
+ - Create .oxlintrc.json with type-aware linting enabled (>50 TS rules)
23
+ - Create .oxfmtrc.json (drop-in prettier replacement: singleQuote, printWidth=100)
24
+ - Replace prettier programmatic API in cssg cli.ts init command with oxfmt
25
+ - Update lint scripts in all packages to oxlint --type-aware --fix
26
+ - Add format / format:check root scripts using oxfmt
27
+ - Switch lint-staged from prettier to oxfmt + oxlint --fix
28
+ - Remove eslint, prettier, all xo configs, typescript-eslint, all eslint-plugin-*
29
+ - Delete .eslintrc.cjs files, .eslintignore, .prettierrc
30
+ - Apply oxfmt across the codebase (formatting changes only, no logic)
31
+
32
+ Type-aware linting now flags real issues (no-floating-promises,
33
+ no-misused-promises, await-thenable, switch-exhaustiveness-check,
34
+ unbound-method) as warnings; addressing them is left for follow-up.
35
+ * lint and format scripts changed; contributors must
36
+ re-run pnpm install. The .prettierrc is replaced by .oxfmtrc.json.
37
+
38
+ * style: apply oxfmt to remaining files
39
+
40
+ * fix: address oxlint type-aware warnings
41
+
42
+ - contentful-config: remove unused AwaitedCollectionItem type alias
43
+ - contentful-ssg/lib/config: prefix unused configFile with underscore
44
+ - contentful-ssg/lib/contentful: assign client/managementClient to
45
+ module-scoped vars (no-unassigned-vars); replace reduce-with-spread
46
+ in getFieldSettings with for-of (no-accumulating-spread)
47
+ - contentful-ssg/lib/array: replace for-await-of over sync iterable
48
+ with Promise.all (await-thenable)
49
+ - contentful-ssg/lib/ui: drop redundant Boolean() wrapper
50
+ * drop Node 20 support, require Node >=22
51
+
52
+ * chore!: replace eslint+prettier with oxlint+oxfmt
53
+
54
+ - Add oxlint, oxlint-tsgolint, oxfmt as devDependencies
55
+ - Create .oxlintrc.json with type-aware linting enabled (>50 TS rules)
56
+ - Create .oxfmtrc.json (drop-in prettier replacement: singleQuote, printWidth=100)
57
+ - Replace prettier programmatic API in cssg cli.ts init command with oxfmt
58
+ - Update lint scripts in all packages to oxlint --type-aware --fix
59
+ - Add format / format:check root scripts using oxfmt
60
+ - Switch lint-staged from prettier to oxfmt + oxlint --fix
61
+ - Remove eslint, prettier, all xo configs, typescript-eslint, all eslint-plugin-*
62
+ - Delete .eslintrc.cjs files, .eslintignore, .prettierrc
63
+ - Apply oxfmt across the codebase (formatting changes only, no logic)
64
+
65
+ Type-aware linting now flags real issues (no-floating-promises,
66
+ no-misused-promises, await-thenable, switch-exhaustiveness-check,
67
+ unbound-method) as warnings; addressing them is left for follow-up.
68
+ * lint and format scripts changed; contributors must
69
+ re-run pnpm install. The .prettierrc is replaced by .oxfmtrc.json.
70
+
71
+ * style: apply oxfmt to remaining files
72
+
73
+ * fix: address oxlint type-aware warnings
74
+
75
+ - contentful-config: remove unused AwaitedCollectionItem type alias
76
+ - contentful-ssg/lib/config: prefix unused configFile with underscore
77
+ - contentful-ssg/lib/contentful: assign client/managementClient to
78
+ module-scoped vars (no-unassigned-vars); replace reduce-with-spread
79
+ in getFieldSettings with for-of (no-accumulating-spread)
80
+ - contentful-ssg/lib/array: replace for-await-of over sync iterable
81
+ with Promise.all (await-thenable)
82
+ - contentful-ssg/lib/ui: drop redundant Boolean() wrapper
83
+
6
84
  ## [4.1.2](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.1...v4.1.2) (2026-02-12)
7
85
 
8
86
  ### Bug Fixes
9
87
 
10
- * use workspace versions for internal deps ([38e767b](https://github.com/jungvonmatt/contentful-ssg/commit/38e767b171c9d082a31c2455c6ca3798d2f88d45))
88
+ - use workspace versions for internal deps ([38e767b](https://github.com/jungvonmatt/contentful-ssg/commit/38e767b171c9d082a31c2455c6ca3798d2f88d45))
11
89
 
12
90
  ## [4.1.1](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.0...v4.1.1) (2026-02-11)
13
91
 
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, ...(args || {}) };
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) => ({ ...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].sort(
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 { ...prev, managedDirectories: [...(managedDirectories || []), 'data'] };
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
- ? { contentDir: `content/${hugoLocaleCode(locale)}`, ...localeConfig }
302
+ ? {
303
+ contentDir: `content/${hugoLocaleCode(locale)}`,
304
+ ...localeConfig,
305
+ }
300
306
  : localeConfig,
301
307
  ];
302
308
  }),
package/package.json CHANGED
@@ -1,38 +1,35 @@
1
1
  {
2
2
  "name": "@jungvonmatt/cssg-plugin-hugo",
3
- "version": "4.1.2",
3
+ "version": "5.0.1",
4
4
  "description": "",
5
- "main": "index.js",
6
- "typings": "./index.d.ts",
7
- "exports": {
8
- ".": "./index.js"
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
- "keywords": [],
23
- "author": "Ben Zörb",
24
- "license": "MIT",
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": "4.1.2",
30
+ "@jungvonmatt/contentful-ssg": "5.0.1",
31
31
  "fs-extra": "^11.1.0",
32
32
  "micromatch": "^4.0.5"
33
33
  },
34
- "devDependencies": {
35
- "eslint": "^8.56.0"
36
- },
37
- "gitHead": "03c3432540f82a9d81f05087d1ccc57b547e37a9"
34
+ "gitHead": "bf80023197f4d76775841eaba734907f852264ef"
38
35
  }
package/tsconfig.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "extends": "../../tsconfig.base.json",
2
+ "extends": "../../tsconfig.base.json"
3
3
  }
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
- };
@@ -1,28 +0,0 @@
1
-
2
- 
3
- > @jungvonmatt/cssg-plugin-hugo@4.0.1 test
4
- > jest
5
-
6
- Determining test suites to run...
7
-
8
-  RUNS   cssg-plugin-hugo  ./index.test.js
9
-
10
-  RUNS   cssg-plugin-hugo  ./index.test.js
11
-
12
-
13
-  RUNS   cssg-plugin-hugo  ./index.test.js
14
-
15
-
16
-  RUNS   cssg-plugin-hugo  ./index.test.js
17
-
18
-
19
-  RUNS   cssg-plugin-hugo  ./index.test.js
20
-
21
-
22
-  RUNS   cssg-plugin-hugo  ./index.test.js
23
-
24
- Tests: 1 passed, 1 total
25
- Snapshots: 0 total
26
- Time: 0.235 s
27
- Ran all test suites.
28
- ⠙
package/jest.config.js DELETED
@@ -1,4 +0,0 @@
1
- export default {
2
- displayName: 'cssg-plugin-hugo',
3
- preset: '../../jest.preset.js',
4
- };