@jungvonmatt/cssg-plugin-hugo 4.1.2 → 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.
@@ -1,4 +1,6 @@
1
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
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
4
 
5
+ Found 0 warnings and 0 errors.
6
+ Finished in 18ms on 1 file using 10 threads.
package/CHANGELOG.md CHANGED
@@ -3,11 +3,85 @@
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
+
6
80
  ## [4.1.2](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.1...v4.1.2) (2026-02-12)
7
81
 
8
82
  ### Bug Fixes
9
83
 
10
- * use workspace versions for internal deps ([38e767b](https://github.com/jungvonmatt/contentful-ssg/commit/38e767b171c9d082a31c2455c6ca3798d2f88d45))
84
+ - use workspace versions for internal deps ([38e767b](https://github.com/jungvonmatt/contentful-ssg/commit/38e767b171c9d082a31c2455c6ca3798d2f88d45))
11
85
 
12
86
  ## [4.1.1](https://github.com/jungvonmatt/contentful-ssg/compare/v4.1.0...v4.1.1) (2026-02-11)
13
87
 
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.0",
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.0",
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": "dfbefe2c66877ed9411bdb242327e6915f58cf3e"
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
- };