@pixpilot/scaffoldfy-configs 0.43.0 → 0.45.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,17 @@
1
1
  # @pixpilot/scaffoldfy-configs
2
2
 
3
+ ## 0.45.0
4
+
5
+ ### Minor Changes
6
+
7
+ - enhance release workflow outputs
8
+
9
+ ## 0.44.0
10
+
11
+ ### Minor Changes
12
+
13
+ - add test for React package unbundling in tsdown.config.ts.hbs
14
+
3
15
  ## 0.43.0
4
16
 
5
17
  ### 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.43.0",
4
+ "version": "0.45.0",
5
5
  "author": "PixPilot <m.doaie@hotmail.com>",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -30,10 +30,10 @@
30
30
  "@types/node": "^22.18.11",
31
31
  "eslint": "^9.38.0",
32
32
  "@internal/eslint-config": "0.3.0",
33
- "@internal/vitest-config": "0.1.0",
34
33
  "@internal/tsdown-config": "0.1.0",
35
- "@pixpilot/scaffoldfy": "0.56.0",
36
- "@internal/prettier-config": "0.0.1"
34
+ "@internal/prettier-config": "0.0.1",
35
+ "@internal/vitest-config": "0.1.0",
36
+ "@pixpilot/scaffoldfy": "0.56.0"
37
37
  },
38
38
  "prettier": "@internal/prettier-config",
39
39
  "publishConfig": {
@@ -24,6 +24,10 @@ jobs:
24
24
  # Publishing targets GitHub Packages (publishConfig.registry in each package.json),
25
25
  # which authenticates with a token rather than npm OIDC trusted publishing.
26
26
  packages: write
27
+ outputs:
28
+ published: ${{ steps.release.outputs.published }}
29
+ published-versions: ${{ steps.release.outputs.published-versions }}
30
+ release-summary: ${{ steps.release.outputs.release-summary }}
27
31
 
28
32
  steps:
29
33
  - name: Generate bot app token
@@ -51,6 +55,7 @@ jobs:
51
55
  build: 'false'
52
56
 
53
57
  - name: Release
58
+ id: release
54
59
  uses: pixpilot/changesets-autopilot@v1
55
60
  with:
56
61
  GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
@@ -73,5 +78,9 @@ jobs:
73
78
  with:
74
79
  status: ${{ contains(needs.*.result, 'failure') && 'failure' || contains(needs.*.result, 'cancelled') && 'cancelled' || 'success' }}
75
80
  notify-on: any
81
+ # Names the released versions; an empty title falls back to the generated one.
82
+ title: ${{ needs.release.outputs.published == 'true' && format('Released {0} ({1})', needs.release.outputs.published-versions, github.repository) || '' }}
83
+ # Published packages, why nothing was published, or why the release failed.
84
+ message: ${{ needs.release.outputs.release-summary }}
76
85
  telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
77
86
  telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
@@ -22,6 +22,10 @@ jobs:
22
22
  contents: write
23
23
  pull-requests: write
24
24
  id-token: write
25
+ outputs:
26
+ published: ${{ steps.release.outputs.published }}
27
+ published-versions: ${{ steps.release.outputs.published-versions }}
28
+ release-summary: ${{ steps.release.outputs.release-summary }}
25
29
 
26
30
  steps:
27
31
  - name: Generate bot app token
@@ -44,6 +48,7 @@ jobs:
44
48
  build: 'false'
45
49
 
46
50
  - name: Release
51
+ id: release
47
52
  uses: pixpilot/changesets-autopilot@v1
48
53
  with:
49
54
  GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
@@ -61,5 +66,9 @@ jobs:
61
66
  with:
62
67
  status: ${{ contains(needs.*.result, 'failure') && 'failure' || contains(needs.*.result, 'cancelled') && 'cancelled' || 'success' }}
63
68
  notify-on: any
69
+ # Names the released versions; an empty title falls back to the generated one.
70
+ title: ${{ needs.release.outputs.published == 'true' && format('Released {0} ({1})', needs.release.outputs.published-versions, github.repository) || '' }}
71
+ # Published packages, why nothing was published, or why the release failed.
72
+ message: ${{ needs.release.outputs.release-summary }}
64
73
  telegram-bot-token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
65
74
  telegram-chat-id: ${{ secrets.TELEGRAM_CHAT_ID }}
@@ -376,6 +376,20 @@ describe('workspace-package-generator – package.json.hbs rendering', () => {
376
376
  describe('workspace-package-generator – tsdown.config.ts.hbs rendering', () => {
377
377
  const tplPath = path.join(TEMPLATES_DIR, 'tsdown.config.ts.hbs');
378
378
 
379
+ it('should unbundle React packages only', () => {
380
+ const reactConfig = renderHbs(tplPath, {
381
+ tsdownConfigPackage: '@pixpilot/tsdown-config',
382
+ isReactPackage: true,
383
+ });
384
+ const vanillaConfig = renderHbs(tplPath, {
385
+ tsdownConfigPackage: '@pixpilot/tsdown-config',
386
+ isReactPackage: false,
387
+ });
388
+
389
+ expect(reactConfig).toContain('unbundle: true,');
390
+ expect(vanillaConfig).not.toContain('unbundle:');
391
+ });
392
+
379
393
  it('should render without bundle size when bundleSizeLimit is falsy', () => {
380
394
  const ctx = {
381
395
  tsdownConfigPackage: '@pixpilot/tsdown-config',
@@ -11,6 +11,9 @@ export default defineConfig({
11
11
  {{/if}}
12
12
  entry: 'src/index.ts',
13
13
  dts: true,
14
+ {{#if isReactPackage}}
15
+ unbundle: true,
16
+ {{/if}}
14
17
  minify: false,
15
18
  clean: true,
16
19
  {{#if isPublishablePackage}}