@pixpilot/scaffoldfy-configs 0.46.0 → 0.47.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @pixpilot/scaffoldfy-configs
2
2
 
3
+ ## 0.47.0
4
+
5
+ ### Minor Changes
6
+
7
+ - support answers in scaffoldfy configs
8
+
3
9
  ## 0.46.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pixpilot/scaffoldfy-configs",
3
3
  "type": "module",
4
- "version": "0.46.0",
4
+ "version": "0.47.0",
5
5
  "author": "PixPilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,11 +29,11 @@
29
29
  "devDependencies": {
30
30
  "@types/node": "^22.18.11",
31
31
  "eslint": "^9.38.0",
32
+ "@internal/vitest-config": "0.1.0",
32
33
  "@internal/eslint-config": "0.3.0",
33
34
  "@internal/tsdown-config": "0.1.0",
34
35
  "@internal/prettier-config": "0.0.1",
35
- "@internal/vitest-config": "0.1.0",
36
- "@pixpilot/scaffoldfy": "0.57.0"
36
+ "@pixpilot/scaffoldfy": "0.58.0"
37
37
  },
38
38
  "prettier": "@internal/prettier-config",
39
39
  "publishConfig": {
@@ -0,0 +1,41 @@
1
+ import path from 'node:path';
2
+ import {
3
+ loadTasksWithInheritance,
4
+ resolveConfigAnswers,
5
+ validateScaffoldfyJsonFile,
6
+ } from '@pixpilot/scaffoldfy';
7
+ import { describe, expect, it } from 'vitest';
8
+
9
+ // The repo's own package generator (`pnpm gen:package`), which answers the prompts of
10
+ // workspace-package-generator in its `answers` field
11
+ const generatorPath = path.join(
12
+ __dirname,
13
+ '..',
14
+ '..',
15
+ '..',
16
+ 'generators',
17
+ 'package',
18
+ 'scaffoldfy.jsonc',
19
+ );
20
+
21
+ describe('package generator answers', () => {
22
+ it('should be a valid config', () => {
23
+ expect(validateScaffoldfyJsonFile(generatorPath).valid).toBe(true);
24
+ });
25
+
26
+ it('should answer existing workspace-package-generator prompts', async () => {
27
+ const { configs = [] } = await loadTasksWithInheritance(generatorPath, {
28
+ sequential: true,
29
+ });
30
+
31
+ expect(resolveConfigAnswers(configs)).toEqual({
32
+ workspace: 'packages',
33
+ bundler: 'tsdown',
34
+ author: 'PixPilot',
35
+ authorEmail: 'm.doaie@hotmail.com',
36
+ repoOwner: 'pixpilot',
37
+ orgName: 'pixpilot',
38
+ licenseType: 'MIT',
39
+ });
40
+ });
41
+ });