@yarn-tool/static-file 3.0.16 → 3.0.18

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
@@ -3,6 +3,52 @@
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
+ ## [3.0.18](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.17...@yarn-tool/static-file@3.0.18) (2026-09-08)
7
+
8
+
9
+
10
+ ### ⚙️ Continuous Integration
11
+
12
+ * **@yarn-tool/static-file:** 自動化更新 .gitignore 與 .npmignore 中的靜態檔案排除清單 ([1841063](https://github.com/bluelovers/ws-yarn-workspaces/commit/1841063c025c0d9e561386b8b4e91e19c24d8bfc))
13
+
14
+
15
+
16
+ ## [3.0.17](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.16...@yarn-tool/static-file@3.0.17) (2026-09-06)
17
+
18
+
19
+
20
+ ### 📦 Code Refactoring
21
+
22
+ * **@yarn-tool/static-file:** 優化模板檔案結構與配置管理 ([4dee77b](https://github.com/bluelovers/ws-yarn-workspaces/commit/4dee77bb027f49b987e689486d828e924492ed99))
23
+ * **@yarn-tool/static-file:** 移除舊版 jest 配置並修正 preset 路徑 ([92c97af](https://github.com/bluelovers/ws-yarn-workspaces/commit/92c97afcf90efacb50ccc81948c727716bd46ef5))
24
+ * **tools:** 優化各工具套件的實作細節與測試邏輯 ([f1f02f2](https://github.com/bluelovers/ws-yarn-workspaces/commit/f1f02f2319e9b5f7383e4001c7c67c60e8aae01a))
25
+
26
+
27
+ ### 🛠 Build System
28
+
29
+ * update Static Files ([b2f5d72](https://github.com/bluelovers/ws-yarn-workspaces/commit/b2f5d7216773c53eb35f267ba34f8788543d46a1))
30
+ * **monorepo:** 優化靜態檔案範本與腳本指令 ([3ec7521](https://github.com/bluelovers/ws-yarn-workspaces/commit/3ec7521f4deb6625c4a567dc6885300e92c2a7ed))
31
+ * **static-file:** 在 tsconfig 範本中新增 jest 與 node 型別定義 ([774e55e](https://github.com/bluelovers/ws-yarn-workspaces/commit/774e55e092e07ec2bf72224797e1fe7b6b8a9ddc))
32
+
33
+
34
+ ### ⚙️ Continuous Integration
35
+
36
+ * **workflow:** 新增 pnpm 工作流程並重構 GitHub Actions 配置 ([82e781d](https://github.com/bluelovers/ws-yarn-workspaces/commit/82e781dd53007bff5e3d693bb650a483a8b9c48c))
37
+
38
+
39
+ ### ♻️ Chores
40
+
41
+ * **@yarn-tool/static-file:** 註解掉 pnpm-workspace 中的 publicHoistPattern 配置 ([49a2905](https://github.com/bluelovers/ws-yarn-workspaces/commit/49a290584df520d00fa55589a4518042b7748d32))
42
+ * **workspace:** 將所有套件的指令從 yarn 改為 pnpm 並更新依賴版本 ([0505892](https://github.com/bluelovers/ws-yarn-workspaces/commit/0505892e5e7c356f8cf59495fefda1aa681499c6))
43
+
44
+
45
+ ### 🔖 Miscellaneous
46
+
47
+ * . ([b545589](https://github.com/bluelovers/ws-yarn-workspaces/commit/b54558925d67304019e2b4f9bb3c4671c429a96e))
48
+ * . ([50c995f](https://github.com/bluelovers/ws-yarn-workspaces/commit/50c995f7f5c8640fde49bc6c71e987a7bd01ece4))
49
+
50
+
51
+
6
52
  ## [3.0.16](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.15...@yarn-tool/static-file@3.0.16) (2026-04-26)
7
53
 
8
54
 
package/file/env ADDED
@@ -0,0 +1,5 @@
1
+ NODE_TLS_REJECT_UNAUTHORIZED=0
2
+ TMPDIR=T:/tmp
3
+ TEMP=T:/tmp
4
+ TMP=T:/tmp
5
+ NEXT_CACHE_DIR=T:/tmp-next
@@ -0,0 +1,71 @@
1
+ name: build-pnpm
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ branches:
7
+ - master
8
+ - main
9
+ paths-ignore:
10
+ - 'test/**'
11
+ - '.run/**'
12
+ - '.github/**'
13
+ - '/*.*'
14
+ - '/.*'
15
+ # schedule:
16
+ ## https://help.github.com/en/actions/automating-your-workflow-with-github-actions/events-that-trigger-workflows#scheduled-events-schedule
17
+ ## ┌───────────── minute (0 - 59)
18
+ ## │ ┌───────────── hour (0 - 23)
19
+ ## │ │ ┌───────────── day of the month (1 - 31)
20
+ ## │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
21
+ ## │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
22
+ ## │ │ │ │ │
23
+ ## │ │ │ │ │
24
+ ## │ │ │ │ │
25
+ ## * * * * *
26
+ # - cron: '* * 1 * *'
27
+ # - cron: '* * 15 * *'
28
+
29
+ jobs:
30
+ build:
31
+ runs-on: ubuntu-latest
32
+ if: "!contains(github.event.head_commit.message, '[skip ci]')"
33
+
34
+ strategy:
35
+ matrix:
36
+ node-version: [ 26 ]
37
+
38
+ steps:
39
+ - uses: actions/checkout@main
40
+ with:
41
+ fetch-depth: 2
42
+ token: ${{ secrets.GITHUB_TOKEN }}
43
+ - name: Set up Node.js ${{ matrix.node-version }} + pnpm
44
+ uses: pnpm/setup@v1
45
+ with:
46
+ version: next-12
47
+ runtime: node@${{ matrix.node-version }}
48
+ cache: true
49
+ - name: set cache id
50
+ id: id-cache
51
+ run: echo "::set-output name=id::${GITHUB_SHA}"
52
+ - name: echo var
53
+ run: |
54
+ echo ${{ steps.id-cache.outputs.id }}
55
+ echo ${GITHUB_SHA}
56
+ - name: setup git config
57
+ run: |
58
+ git config --local user.email "action@github.com"
59
+ git config --local user.name "GitHub Action"
60
+ - name: install deps
61
+ run: |
62
+ pnpm install --frozen-lockfile
63
+ pnpm run ci:install
64
+ - name: run script
65
+ if: success()
66
+ run: pnpm run ci:build
67
+ - name: Push changes
68
+ if: success()
69
+ uses: ad-m/github-push-action@master
70
+ with:
71
+ github_token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,4 +1,4 @@
1
- name: build
1
+ name: build-yarn
2
2
 
3
3
  on:
4
4
  workflow_dispatch:
@@ -30,11 +30,11 @@ jobs:
30
30
  build:
31
31
  runs-on: ubuntu-latest
32
32
  if: "!contains(github.event.head_commit.message, '[skip ci]')"
33
-
33
+
34
34
  strategy:
35
35
  matrix:
36
- node-version: [ 17 ]
37
-
36
+ node-version: [ 26 ]
37
+
38
38
  steps:
39
39
  - uses: actions/checkout@main
40
40
  with:
package/file/gitignore CHANGED
@@ -268,3 +268,10 @@ out/
268
268
  .next
269
269
 
270
270
  test/temp*/
271
+
272
+ !__root-core.cjs
273
+ !__root-core.mjs
274
+ !__root-core.d.cts
275
+ !__root-core.d.mts
276
+ !__root-core.d.ts
277
+ !__root-core.ts
@@ -142,7 +142,8 @@ try
142
142
  */
143
143
  case 'jest-preset':
144
144
  // @ts-ignore
145
- jestConfig.preset = dirname(result);
145
+ // jestConfig.preset = dirname(result);
146
+ jestConfig.preset = result;
146
147
  break;
147
148
  /**
148
149
  * 其他情況,載入配置檔案內容
@@ -47,7 +47,6 @@
47
47
  "stream": true
48
48
  }
49
49
  },
50
- "npmClient": "yarn",
51
- "useWorkspaces": true,
50
+ "npmClient": "pnpm",
52
51
  "version": "independent"
53
52
  }
@@ -4,17 +4,17 @@ packages:
4
4
  # exclude packages that are inside test/ directories
5
5
  - '!**/test/**'
6
6
 
7
- publicHoistPattern:
8
- - "ts-type"
9
- - "@bluelovers/tsconfig"
10
- - "@bluelovers/jest-config"
11
- - "@types/node"
12
- - "@types/jest"
13
- - "jest"
14
- - "ts-jest"
15
- - "ts-node"
16
- - "tsx"
17
- - "tslib"
7
+ # publicHoistPattern:
8
+ # - "ts-type"
9
+ # - "@bluelovers/tsconfig"
10
+ # - "@bluelovers/jest-config"
11
+ # - "@types/node"
12
+ # - "@types/jest"
13
+ # - "jest"
14
+ # - "ts-jest"
15
+ # - "ts-node"
16
+ # - "tsx"
17
+ # - "tslib"
18
18
 
19
19
  linkWorkspacePackages: true
20
20
  saveWorkspaceProtocol: false
@@ -8,6 +8,13 @@
8
8
  "noUnusedParameters": false,
9
9
  "allowUnusedLabels": true,
10
10
  "noUnusedLocals": false,
11
- "noPropertyAccessFromIndexSignature": false
12
- }
11
+ "noPropertyAccessFromIndexSignature": false,
12
+ "types": [
13
+ "jest",
14
+ "node"
15
+ ]
16
+ },
17
+ "include": [
18
+ "test"
19
+ ]
13
20
  }
@@ -5,6 +5,10 @@
5
5
  "outDir": "./esm",
6
6
  "rootDir": "./lib",
7
7
  "module": "esnext",
8
- "noImplicitAny": true
8
+ "noImplicitAny": true,
9
+ "types": [
10
+ "jest",
11
+ "node"
12
+ ]
9
13
  }
10
14
  }
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "extends": "@bluelovers/tsconfig/esm/mapfile.json",
3
3
  "compilerOptions": {
4
- "importHelpers": true
4
+ "importHelpers": true,
5
+ "types": [
6
+ "jest",
7
+ "node"
8
+ ]
5
9
  }
6
10
  }
@@ -1,6 +1,10 @@
1
1
  {
2
2
  "extends": "@bluelovers/tsconfig/tsdx/index.json",
3
- "compilerOptions": {},
3
+ "compilerOptions": {
4
+ "importHelpers": true,
5
+ "moduleResolution": "bundler",
6
+ "rootDir": "src"
7
+ },
4
8
  "exclude": [
5
9
  "dist",
6
10
  "test"
package/lib/const.d.ts CHANGED
@@ -20,7 +20,7 @@ import { _Key, IStaticFilesMapArray } from './types';
20
20
  * - staticFile: The source static file path (relative to static root) / 來源靜態檔案路徑(相對於靜態根目錄)
21
21
  * - detectFile: Optional file to check for existence before copying / 可選的檢測檔案,複製前檢查是否存在
22
22
  */
23
- declare const _defaultCopyStaticFiles: [[".npmignore", "file/npmignore"], [".gitignore", "file/gitignore"], [".eslintignore", "file/eslintignore"], ["tsconfig.json.tpl", "file/tsconfig.json.tpl", "tsconfig.json"], ["test/tsconfig.json.tpl", "file/test/tsconfig.json.tpl", "test/tsconfig.json"], ["test/tsconfig.json", "file/test/tsconfig.json.tpl"], ["tsconfig.esm.json.tpl", "file/tsconfig.esm.json.tpl", "tsconfig.esm.json"], ["tsconfig.tsdx.json.tpl", "file/tsconfig.tsdx.json.tpl", "tsconfig.tsdx.json"], ["tsconfig.json", "file/tsconfig.json.tpl"], [".eslintrc.json.tpl", "file/eslintrc.json.tpl", ".eslintrc.json"], ["README.md", "file/README.md"], [".mocharc.yml.tpl", "file/mocharc.yml"], ["jest.config.js", "file/jest.config.auto.js"], [".nowignore", "file/nowignore"], ["now.json.tpl", "file/now.json.tpl", "now.json"], ["tsdx.config.js.tpl", "file/tsdx.config.js", "tsdx.config.js"], ["test/__root.ts", "file/test/__root.ts"], ["test/fixtures/.gitkeep", "file/test/fixtures/.gitkeep"], ...["test/temp.ts" | "test/__root-core.cjs" | "test/__root-core.mjs" | "test/__root-core.d.cts" | "test/__root-core.d.mts" | "test/__root-core.d.ts", "file/test/temp.ts" | "file/test/__root-core.cjs" | "file/test/__root-core.mjs" | "file/test/__root-core.d.cts" | "file/test/__root-core.d.mts" | "file/test/__root-core.d.ts"][]];
23
+ declare const _defaultCopyStaticFiles: [[".npmignore", "file/npmignore"], [".gitignore", "file/gitignore"], [".eslintignore", "file/eslintignore"], ["tsconfig.json", "file/tsconfig.json.tpl"], ["tsconfig.json.tpl", "file/tsconfig.json.tpl"], ["test/tsconfig.json.tpl", "file/test/tsconfig.json.tpl", "test/tsconfig.json"], ["tsconfig.esm.json.tpl", "file/tsconfig.esm.json.tpl", "tsconfig.esm.json"], ["tsconfig.tsdx.json.tpl", "file/tsconfig.tsdx.json.tpl", "tsconfig.tsdx.json"], [".eslintrc.json.tpl", "file/eslintrc.json.tpl", ".eslintrc.json"], ["README.md", "file/README.md"], [".mocharc.yml.tpl", "file/mocharc.yml"], ["jest.config.js", "file/jest.config.auto.js"], [".nowignore", "file/nowignore"], ["now.json.tpl", "file/now.json.tpl", "now.json"], ["tsdx.config.js.tpl", "file/tsdx.config.js", "tsdx.config.js"], ...["test/temp.ts" | "test/__root.ts" | "test/__root-core.cjs" | "test/__root-core.mjs" | "test/__root-core.d.cts" | "test/__root-core.d.mts" | "test/__root-core.d.ts" | "test/fixtures/.gitkeep", "file/test/temp.ts" | "file/test/__root.ts" | "file/test/__root-core.cjs" | "file/test/__root-core.mjs" | "file/test/__root-core.d.cts" | "file/test/__root-core.d.mts" | "file/test/__root-core.d.ts" | "file/test/fixtures/.gitkeep"][]];
24
24
  /**
25
25
  * Default static files for root-level only copying / 僅根目錄層級複製的預設靜態檔案
26
26
  *
@@ -30,14 +30,14 @@ declare const _defaultCopyStaticFiles: [[".npmignore", "file/npmignore"], [".git
30
30
  * These files are typically shared across all packages in a monorepo.
31
31
  * 這些檔案通常在 monorepo 中的所有套件之間共享。
32
32
  */
33
- declare const _defaultCopyStaticFilesRootOnly: [["lerna.json.tpl", "file/lerna.json.tpl", "lerna.json"], ["pnpm-workspace.yaml.tpl", "file/pnpm-workspace.yaml", "pnpm-workspace.yaml"], [".github/workflows/coverage.yml", "file/github/workflows/coverage.yml"], [".github/workflows/action-yarnlock-dedupe.yml", "file/github/workflows/action-yarnlock-dedupe.yml"], [".github/workflows/build.yml", "file/github/workflows/build.yml"], [".github/workflows/yarn-lock-changes.yml", "file/github/workflows/yarn-lock-changes.yml"], [".github/commit-convention.md", "file/github/commit-convention.md"], ...[".github/dependabot.yml" | ".github/workflows/codeql-analysis.yml" | ".github/workflows/cmd-rebase.yml", "file/github/dependabot.yml" | "file/github/workflows/codeql-analysis.yml" | "file/github/workflows/cmd-rebase.yml"][], [".node-version", "file/nvmrc"], [".nvmrc", "file/nvmrc"], [".eslintrc.json", "file/eslintrc.json.tpl", ".eslintrc.json"], [".yarnrc.yml.tpl", "file/root/yarnrc.yml", ".yarnrc.yml"], [".npmrc.tpl", "file/npmrc", ".npmrc"], ["jest.config.js", "file/jest.config.js"], ["jest.config.js.tpl", "file/jest.config.js"], ["jest.config.auto.js.tpl", "file/jest.config.auto.js"], [".editorconfig.tpl", "file/tpl.editorconfig"], [".editorconfig", "file/tpl.editorconfig"], ["global.tsdx.d.ts", "file/root/global.tsdx.d.ts"], [".browserslistrc", "file/ws-root/browserslistrc"], ["tsc-multi.json.tpl", "file/tsc-multi.json.tpl", "tsc-multi.json"], [".nycrc.tpl", "file/nycrc"]];
33
+ declare const _defaultCopyStaticFilesRootOnly: [["lerna.json.tpl", "file/lerna.json.tpl", "lerna.json"], ["pnpm-workspace.yaml.tpl", "file/pnpm-workspace.yaml"], [".github/workflows/build-pnpm.yml", "file/github/workflows/build-pnpm.yml"], [".github/workflows/build-yarn.yml", "file/github/workflows/build-yarn.yml"], ...[".github/dependabot.yml" | ".github/commit-convention.md", "file/github/dependabot.yml" | "file/github/commit-convention.md"][], [".node-version.tpl", "file/nvmrc"], [".nvmrc.tpl", "file/nvmrc"], [".eslintrc.json", "file/eslintrc.json.tpl", ".eslintrc.json"], [".yarnrc.yml.tpl", "file/root/yarnrc.yml", ".yarnrc.yml"], [".npmrc.tpl", "file/npmrc", ".npmrc"], [".env.tpl", "file/env"], ["jest.config.auto.js.tpl", "file/jest.config.auto.js"], [".editorconfig.tpl", "file/tpl.editorconfig"], [".editorconfig", "file/tpl.editorconfig"], ["global.tsdx.d.ts", "file/root/global.tsdx.d.ts"], [".browserslistrc", "file/ws-root/browserslistrc"]];
34
34
  /**
35
35
  * Default static files for workspace root only / 僅工作區根目錄的預設靜態檔案
36
36
  *
37
37
  * Contains files specific to workspace root management.
38
38
  * 包含特定於工作區根目錄管理的檔案。
39
39
  */
40
- declare const _defaultCopyStaticFilesWsRootOnly: [["lerna.json.tpl", "file/lerna.json.tpl"], ["pnpm-workspace.yaml", "file/pnpm-workspace.yaml"], ["tsc-multi.json.tpl", "file/tsc-multi.json.tpl", "tsc-multi.json"], ["__root_ws.ts", "file/ws-root/__root_ws.ts"], ["jest.config.js", "file/ws-root/jest.config.js"], ["jest-preset.js", "file/ws-root/jest-preset.js"], [".run/lerna_publish_yes.run.xml", "file/ws-root/.run/lerna_publish_yes.run.xml"]];
40
+ declare const _defaultCopyStaticFilesWsRootOnly: [["lerna.json.tpl", "file/lerna.json.tpl"], ["pnpm-workspace.yaml", "file/pnpm-workspace.yaml"], ["__root_ws.ts", "file/ws-root/__root_ws.ts"], ["jest.config.js", "file/ws-root/jest.config.js"], ["jest-preset.js", "file/ws-root/jest-preset.js"], ["jest.config.js.tpl", "file/ws-root/jest.config.js"], [".run/lerna_publish_yes.run.xml", "file/ws-root/.run/lerna_publish_yes.run.xml"]];
41
41
  /**
42
42
  * Frozen default static files for package-level / 凍結的套件層級預設靜態檔案
43
43
  *
package/lib/const.js CHANGED
@@ -20,36 +20,34 @@ const _defaultCopyStaticFiles = [
20
20
  ['.gitignore', 'file/gitignore'],
21
21
  ['.eslintignore', 'file/eslintignore'],
22
22
  // TypeScript configuration / TypeScript 配置
23
- ['tsconfig.json.tpl', 'file/tsconfig.json.tpl', 'tsconfig.json'],
23
+ ['tsconfig.json', 'file/tsconfig.json.tpl'],
24
+ ['tsconfig.json.tpl', 'file/tsconfig.json.tpl'],
24
25
  ['test/tsconfig.json.tpl', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],
25
- ['test/tsconfig.json', 'file/test/tsconfig.json.tpl'],
26
26
  ['tsconfig.esm.json.tpl', 'file/tsconfig.esm.json.tpl', 'tsconfig.esm.json'],
27
27
  ['tsconfig.tsdx.json.tpl', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.tsdx.json'],
28
- ['tsconfig.json', 'file/tsconfig.json.tpl'],
29
28
  // ESLint configuration / ESLint 配置
30
29
  ['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],
31
30
  // Documentation / 文檔
32
31
  ['README.md', 'file/README.md'],
33
32
  // Test configuration / 測試配置
34
33
  ['.mocharc.yml.tpl', 'file/mocharc.yml'],
35
- //['jest.config.js', 'file/jest.config.js'],
36
34
  ['jest.config.js', 'file/jest.config.auto.js'],
37
35
  // Now/Zeit deployment / Now/Zeit 部署配置
38
36
  ['.nowignore', 'file/nowignore'],
39
37
  ['now.json.tpl', 'file/now.json.tpl', 'now.json'],
40
38
  // TSDX configuration / TSDX 配置
41
39
  ['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],
42
- // Test fixtures / 測試固定檔案
43
- ['test/__root.ts', 'file/test/__root.ts'],
44
- ['test/fixtures/.gitkeep', 'file/test/fixtures/.gitkeep'],
45
- // Temporary test files / 臨時測試檔案
40
+ // test / 測試
46
41
  ...([
47
42
  'temp.ts',
43
+ '__root.ts',
48
44
  '__root-core.cjs',
49
45
  '__root-core.mjs',
50
46
  '__root-core.d.cts',
51
47
  '__root-core.d.mts',
52
48
  '__root-core.d.ts',
49
+ // Test fixtures / 測試固定檔案
50
+ 'fixtures/.gitkeep',
53
51
  ].map(file => [
54
52
  `test/${file}`,
55
53
  `file/test/${file}`
@@ -68,31 +66,35 @@ const _defaultCopyStaticFiles = [
68
66
  const _defaultCopyStaticFilesRootOnly = [
69
67
  // Monorepo configuration / Monorepo 配置
70
68
  ['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],
71
- ['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml', 'pnpm-workspace.yaml'],
69
+ ['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml'],
72
70
  // GitHub Actions workflows / GitHub Actions 工作流程
73
- ['.github/workflows/coverage.yml', 'file/github/workflows/coverage.yml'],
74
- ['.github/workflows/action-yarnlock-dedupe.yml', 'file/github/workflows/action-yarnlock-dedupe.yml'],
75
- ['.github/workflows/build.yml', 'file/github/workflows/build.yml'],
76
- ['.github/workflows/yarn-lock-changes.yml', 'file/github/workflows/yarn-lock-changes.yml'],
77
- ['.github/commit-convention.md', 'file/github/commit-convention.md'],
71
+ ['.github/workflows/build-pnpm.yml', 'file/github/workflows/build-pnpm.yml'],
72
+ ['.github/workflows/build-yarn.yml', 'file/github/workflows/build-yarn.yml'],
78
73
  // Additional GitHub configuration / 額外的 GitHub 配置
79
74
  ...([
80
75
  'dependabot.yml',
81
- 'workflows/codeql-analysis.yml',
82
- 'workflows/cmd-rebase.yml',
76
+ 'commit-convention.md',
77
+ // ---
78
+ // 'workflows/codeql-analysis.yml',
79
+ // 'workflows/cmd-rebase.yml',
80
+ // 'workflows/coverage.yml',
81
+ // 'workflows/action-yarnlock-dedupe.yml',
82
+ // 'workflows/yarn-lock-changes.yml',
83
+ // ---
83
84
  ].map(file => [`.github/${file}`, `file/github/${file}`])),
84
85
  // Node version files / Node 版本檔案
85
- ['.node-version', 'file/nvmrc'],
86
- ['.nvmrc', 'file/nvmrc'],
86
+ ['.node-version.tpl', 'file/nvmrc'],
87
+ ['.nvmrc.tpl', 'file/nvmrc'],
87
88
  // Root TypeScript configuration / 根目錄 TypeScript 配置
88
89
  ['.eslintrc.json', 'file/eslintrc.json.tpl', '.eslintrc.json'],
89
90
  //['changelog-option.js', 'file/changelog-option.js', 'changelog-option.js.tpl'],
90
91
  // Package manager configuration / 套件管理器配置
91
92
  ['.yarnrc.yml.tpl', 'file/root/yarnrc.yml', '.yarnrc.yml'],
92
93
  ['.npmrc.tpl', 'file/npmrc', '.npmrc'],
94
+ ['.env.tpl', 'file/env'],
93
95
  // Jest configuration / Jest 配置
94
- ['jest.config.js', 'file/jest.config.js'],
95
- ['jest.config.js.tpl', 'file/jest.config.js'],
96
+ // ['jest.config.js', 'file/jest.config.js'],
97
+ // ['jest.config.js.tpl', 'file/jest.config.js'],
96
98
  ['jest.config.auto.js.tpl', 'file/jest.config.auto.js'],
97
99
  // Editor configuration / 編輯器配置
98
100
  ['.editorconfig.tpl', 'file/tpl.editorconfig'],
@@ -102,9 +104,9 @@ const _defaultCopyStaticFilesRootOnly = [
102
104
  // Browserslist configuration / Browserslist 配置
103
105
  ['.browserslistrc', 'file/ws-root/browserslistrc'],
104
106
  // TSC multi configuration / TSC 多配置
105
- ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
107
+ // ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
106
108
  // NYC coverage configuration / NYC 覆蓋率配置
107
- ['.nycrc.tpl', 'file/nycrc'],
109
+ // ['.nycrc.tpl', 'file/nycrc', '.nycrc'],
108
110
  ];
109
111
  /**
110
112
  * Default static files for workspace root only / 僅工作區根目錄的預設靜態檔案
@@ -118,12 +120,13 @@ const _defaultCopyStaticFilesWsRootOnly = [
118
120
  // pnpm workspace configuration / pnpm 工作區配置
119
121
  ['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],
120
122
  // TSC multi configuration / TSC 多配置
121
- ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
123
+ // ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],
122
124
  // Workspace root file / 工作區根目錄檔案
123
125
  ['__root_ws.ts', 'file/ws-root/__root_ws.ts'],
124
126
  // Jest configuration / Jest 配置
125
127
  ['jest.config.js', 'file/ws-root/jest.config.js'],
126
128
  ['jest-preset.js', 'file/ws-root/jest-preset.js'],
129
+ ['jest.config.js.tpl', 'file/ws-root/jest.config.js'],
127
130
  // Run configurations / 執行配置
128
131
  ['.run/lerna_publish_yes.run.xml', 'file/ws-root/.run/lerna_publish_yes.run.xml'],
129
132
  ];
package/lib/const.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"const.js","sourceRoot":"","sources":["const.ts"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;GAYG;AACH,MAAM,uBAAuB,GAAG;IAE/B,sBAAsB;IACtB,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC,2CAA2C;IAC3C,CAAC,mBAAmB,EAAE,wBAAwB,EAAE,eAAe,CAAC;IAEhE,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAC/E,CAAC,oBAAoB,EAAE,6BAA6B,CAAC;IAErD,CAAC,uBAAuB,EAAE,4BAA4B,EAAE,mBAAmB,CAAC;IAC5E,CA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AiC;IACjC,CAAC,cAAc,EAAE,2BAA2B,CAAC;IAE7C,+BAA+B;IAC/B,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IACjD,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IAEjD,4BAA4B;IAC5B,CAAC,gCAAgC,EAAE,6CAA6C,CAAC;CAEjC,CAAC;AAElD;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAsE,CAAC;AAElJ;;;;;GAKG;AACU,QAAA,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,+BAA+B,CAA8E,CAAC;AAE1K;;;;;GAKG;AACU,QAAA,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAAC,iCAAiC,CAAgF,CAAC","sourcesContent":["/**\n * Static file mapping constants / 靜態檔案映射常量\n *\n * This module defines the default static file mappings for different project scenarios.\n * 此模組定義了不同專案情境的預設靜態檔案映射。\n *\n * @module const\n */\nimport { _Key, IStaticFilesKey, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\n\n/**\n * Default static files for package-level copying / 套件層級複製的預設靜態檔案\n *\n * Contains common configuration files that should be copied to each package.\n * 包含應複製到每個套件的常用配置檔案。\n *\n * Each entry follows the format: [targetFile, staticFile, detectFile?]\n * 每個條目遵循格式:[目標檔案, 靜態檔案, 檢測檔案?]\n *\n * - targetFile: The destination file path / 目標檔案路徑\n * - staticFile: The source static file path (relative to static root) / 來源靜態檔案路徑(相對於靜態根目錄)\n * - detectFile: Optional file to check for existence before copying / 可選的檢測檔案,複製前檢查是否存在\n */\nconst _defaultCopyStaticFiles = [\n\n\t// Ignore files / 忽略檔案\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\t['.eslintignore', 'file/eslintignore'],\n\n\t// TypeScript configuration / TypeScript 配置\n\t['tsconfig.json.tpl', 'file/tsconfig.json.tpl', 'tsconfig.json'],\n\n\t['test/tsconfig.json.tpl', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\t['test/tsconfig.json', 'file/test/tsconfig.json.tpl'],\n\n\t['tsconfig.esm.json.tpl', 'file/tsconfig.esm.json.tpl', 'tsconfig.esm.json'],\n\t['tsconfig.tsdx.json.tpl', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.tsdx.json'],\n\n\t['tsconfig.json', 'file/tsconfig.json.tpl'],\n\n\t// ESLint configuration / ESLint 配置\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t// Documentation / 文檔\n\t['README.md', 'file/README.md'],\n\n\t// Test configuration / 測試配置\n\t['.mocharc.yml.tpl', 'file/mocharc.yml'],\n\t//['jest.config.js', 'file/jest.config.js'],\n\t['jest.config.js', 'file/jest.config.auto.js'],\n\n\t// Now/Zeit deployment / Now/Zeit 部署配置\n\t['.nowignore', 'file/nowignore'],\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t// TSDX configuration / TSDX 配置\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n\t// Test fixtures / 測試固定檔案\n\t['test/__root.ts', 'file/test/__root.ts'],\n\t['test/fixtures/.gitkeep', 'file/test/fixtures/.gitkeep'],\n\n\t// Temporary test files / 臨時測試檔案\n\t...(([\n\t\t'temp.ts',\n\n\t\t'__root-core.cjs',\n\t\t'__root-core.mjs',\n\n\t\t'__root-core.d.cts',\n\t\t'__root-core.d.mts',\n\n\t\t'__root-core.d.ts',\n\n\t] as const).map(file => [\n\t\t`test/${file}`,\n\t\t`file/test/${file}`\n\t] as const satisfies IStaticFilesMapArrayEntry<string>)),\n\n\t//['changelog-option.js.tpl', 'file/changelog-option.js', 'changelog-option.js'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Default static files for root-level only copying / 僅根目錄層級複製的預設靜態檔案\n *\n * Contains configuration files that should only be copied to the workspace root.\n * 包含僅應複製到工作區根目錄的配置檔案。\n *\n * These files are typically shared across all packages in a monorepo.\n * 這些檔案通常在 monorepo 中的所有套件之間共享。\n */\nconst _defaultCopyStaticFilesRootOnly = [\n\n\t// Monorepo configuration / Monorepo 配置\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml', 'pnpm-workspace.yaml'],\n\n\t// GitHub Actions workflows / GitHub Actions 工作流程\n\t['.github/workflows/coverage.yml', 'file/github/workflows/coverage.yml'],\n\t['.github/workflows/action-yarnlock-dedupe.yml', 'file/github/workflows/action-yarnlock-dedupe.yml'],\n\t['.github/workflows/build.yml', 'file/github/workflows/build.yml'],\n\t['.github/workflows/yarn-lock-changes.yml', 'file/github/workflows/yarn-lock-changes.yml'],\n\t['.github/commit-convention.md', 'file/github/commit-convention.md'],\n\n\t// Additional GitHub configuration / 額外的 GitHub 配置\n\t...(([\n\t\t'dependabot.yml',\n\t\t'workflows/codeql-analysis.yml',\n\t\t'workflows/cmd-rebase.yml',\n\t] as const).map(file => [`.github/${file}`, `file/github/${file}`] as const satisfies IStaticFilesMapArrayEntry<string>)),\n\n\t// Node version files / Node 版本檔案\n\t['.node-version', 'file/nvmrc'],\n\t['.nvmrc', 'file/nvmrc'],\n\n\t// Root TypeScript configuration / 根目錄 TypeScript 配置\n\t['.eslintrc.json', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t//['changelog-option.js', 'file/changelog-option.js', 'changelog-option.js.tpl'],\n\n\t// Package manager configuration / 套件管理器配置\n\t['.yarnrc.yml.tpl', 'file/root/yarnrc.yml', '.yarnrc.yml'],\n\t['.npmrc.tpl', 'file/npmrc', '.npmrc'],\n\n\t// Jest configuration / Jest 配置\n\t['jest.config.js', 'file/jest.config.js'],\n\t['jest.config.js.tpl', 'file/jest.config.js'],\n\t['jest.config.auto.js.tpl', 'file/jest.config.auto.js'],\n\n\t// Editor configuration / 編輯器配置\n\t['.editorconfig.tpl', 'file/tpl.editorconfig'],\n\t['.editorconfig', 'file/tpl.editorconfig'],\n\n\t// Global type declarations / 全局類型聲明\n\t['global.tsdx.d.ts', 'file/root/global.tsdx.d.ts'],\n\n\t// Browserslist configuration / Browserslist 配置\n\t['.browserslistrc', 'file/ws-root/browserslistrc'],\n\n\t// TSC multi configuration / TSC 多配置\n\t['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t// NYC coverage configuration / NYC 覆蓋率配置\n\t['.nycrc.tpl', 'file/nycrc'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Default static files for workspace root only / 僅工作區根目錄的預設靜態檔案\n *\n * Contains files specific to workspace root management.\n * 包含特定於工作區根目錄管理的檔案。\n */\nconst _defaultCopyStaticFilesWsRootOnly = [\n\n\t// Lerna configuration / Lerna 配置\n\t['lerna.json.tpl', 'file/lerna.json.tpl'],\n\n\t// pnpm workspace configuration / pnpm 工作區配置\n\t['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],\n\n\t// TSC multi configuration / TSC 多配置\n\t['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t// Workspace root file / 工作區根目錄檔案\n\t['__root_ws.ts', 'file/ws-root/__root_ws.ts'],\n\n\t// Jest configuration / Jest 配置\n\t['jest.config.js', 'file/ws-root/jest.config.js'],\n\t['jest-preset.js', 'file/ws-root/jest-preset.js'],\n\n\t// Run configurations / 執行配置\n\t['.run/lerna_publish_yes.run.xml', 'file/ws-root/.run/lerna_publish_yes.run.xml'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Frozen default static files for package-level / 凍結的套件層級預設靜態檔案\n *\n * Use this for copying static files to individual packages.\n * 用於將靜態檔案複製到各個套件。\n */\nexport const defaultCopyStaticFiles = Object.freeze(_defaultCopyStaticFiles) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFiles>>;\n\n/**\n * Frozen default static files for root-level only / 凍結的僅根目錄層級預設靜態檔案\n *\n * Use this for copying static files to the workspace root only.\n * 用於將靜態檔案僅複製到工作區根目錄。\n */\nexport const defaultCopyStaticFilesRootOnly = Object.freeze(_defaultCopyStaticFilesRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesRootOnly>>;\n\n/**\n * Frozen default static files for workspace root / 凍結的工作區根目錄預設靜態檔案\n *\n * Use this for workspace root specific file management.\n * 用於工作區根目錄特定的檔案管理。\n */\nexport const defaultCopyStaticFilesWsRootOnly = Object.freeze(_defaultCopyStaticFilesWsRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesWsRootOnly>>;\n"]}
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["const.ts"],"names":[],"mappings":";;;AAUA;;;;;;;;;;;;GAYG;AACH,MAAM,uBAAuB,GAAG;IAE/B,sBAAsB;IACtB,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC,2CAA2C;IAC3C,CAAC,eAAe,EAAE,wBAAwB,CAAC;IAC3C,CAAC,mBAAmB,EAAE,wBAAwB,CAAC;IAE/C,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,CAAC,uBAAuB,EAAE,4BAA4B,EAAE,mBAAmB,CAAC;IAC5E,CAAC,wBAAwB,EAAE,6BAA6B,EAAE,oBAAoB,CAAC;IAE/E,mCAAmC;IACnC,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,CAAC;IAElE,qBAAqB;IACrB,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAE/B,4BAA4B;IAC5B,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAExC,CAAC,gBAAgB,EAAE,0BAA0B,CAAC;IAE9C,sCAAsC;IACtC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,cAAc,EAAE,mBAAmB,EAAE,UAAU,CAAC;IAEjD,+BAA+B;IAC/B,C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/B,6CAA6C;IAC7C,iDAAiD;IACjD,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;IAEvD,+BAA+B;IAC/B,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAC9C,CAAC,eAAe,EAAE,uBAAuB,CAAC;IAE1C,oCAAoC;IACpC,CAAC,kBAAkB,EAAE,4BAA4B,CAAC;IAElD,+CAA+C;IAC/C,CAAC,iBAAiB,EAAE,6BAA6B,CAAC;IAElD,oCAAoC;IACpC,uEAAuE;IAEvE,yCAAyC;IACzC,0CAA0C;CAEM,CAAC;AAElD;;;;;GAKG;AACH,MAAM,iCAAiC,GAAG;IAEzC,iCAAiC;IACjC,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IAEzC,4CAA4C;IAC5C,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAEnD,oCAAoC;IACpC,uEAAuE;IAEvE,iCAAiC;IACjC,CAAC,cAAc,EAAE,2BAA2B,CAAC;IAE7C,+BAA+B;IAC/B,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IACjD,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IAEjD,CAAC,oBAAoB,EAAE,6BAA6B,CAAC;IAErD,4BAA4B;IAC5B,CAAC,gCAAgC,EAAE,6CAA6C,CAAC;CAEjC,CAAC;AAElD;;;;;GAKG;AACU,QAAA,sBAAsB,GAAG,MAAM,CAAC,MAAM,CAAC,uBAAuB,CAAsE,CAAC;AAElJ;;;;;GAKG;AACU,QAAA,8BAA8B,GAAG,MAAM,CAAC,MAAM,CAAC,+BAA+B,CAA8E,CAAC;AAE1K;;;;;GAKG;AACU,QAAA,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAAC,iCAAiC,CAAgF,CAAC","sourcesContent":["/**\n * Static file mapping constants / 靜態檔案映射常量\n *\n * This module defines the default static file mappings for different project scenarios.\n * 此模組定義了不同專案情境的預設靜態檔案映射。\n *\n * @module const\n */\nimport { _Key, IStaticFilesKey, IStaticFilesMapArray, IStaticFilesMapArrayEntry } from './types';\n\n/**\n * Default static files for package-level copying / 套件層級複製的預設靜態檔案\n *\n * Contains common configuration files that should be copied to each package.\n * 包含應複製到每個套件的常用配置檔案。\n *\n * Each entry follows the format: [targetFile, staticFile, detectFile?]\n * 每個條目遵循格式:[目標檔案, 靜態檔案, 檢測檔案?]\n *\n * - targetFile: The destination file path / 目標檔案路徑\n * - staticFile: The source static file path (relative to static root) / 來源靜態檔案路徑(相對於靜態根目錄)\n * - detectFile: Optional file to check for existence before copying / 可選的檢測檔案,複製前檢查是否存在\n */\nconst _defaultCopyStaticFiles = [\n\n\t// Ignore files / 忽略檔案\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\t['.eslintignore', 'file/eslintignore'],\n\n\t// TypeScript configuration / TypeScript 配置\n\t['tsconfig.json', 'file/tsconfig.json.tpl'],\n\t['tsconfig.json.tpl', 'file/tsconfig.json.tpl'],\n\n\t['test/tsconfig.json.tpl', 'file/test/tsconfig.json.tpl', 'test/tsconfig.json'],\n\n\t['tsconfig.esm.json.tpl', 'file/tsconfig.esm.json.tpl', 'tsconfig.esm.json'],\n\t['tsconfig.tsdx.json.tpl', 'file/tsconfig.tsdx.json.tpl', 'tsconfig.tsdx.json'],\n\n\t// ESLint configuration / ESLint 配置\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t// Documentation / 文檔\n\t['README.md', 'file/README.md'],\n\n\t// Test configuration / 測試配置\n\t['.mocharc.yml.tpl', 'file/mocharc.yml'],\n\n\t['jest.config.js', 'file/jest.config.auto.js'],\n\n\t// Now/Zeit deployment / Now/Zeit 部署配置\n\t['.nowignore', 'file/nowignore'],\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t// TSDX configuration / TSDX 配置\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n\t// test / 測試\n\t...(([\n\t\t'temp.ts',\n\n\t\t'__root.ts',\n\n\t\t'__root-core.cjs',\n\t\t'__root-core.mjs',\n\n\t\t'__root-core.d.cts',\n\t\t'__root-core.d.mts',\n\n\t\t'__root-core.d.ts',\n\n\t\t// Test fixtures / 測試固定檔案\n\t\t'fixtures/.gitkeep',\n\n\t] as const).map(file => [\n\t\t`test/${file}`,\n\t\t`file/test/${file}`\n\t] as const satisfies IStaticFilesMapArrayEntry<string>)),\n\n\t//['changelog-option.js.tpl', 'file/changelog-option.js', 'changelog-option.js'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Default static files for root-level only copying / 僅根目錄層級複製的預設靜態檔案\n *\n * Contains configuration files that should only be copied to the workspace root.\n * 包含僅應複製到工作區根目錄的配置檔案。\n *\n * These files are typically shared across all packages in a monorepo.\n * 這些檔案通常在 monorepo 中的所有套件之間共享。\n */\nconst _defaultCopyStaticFilesRootOnly = [\n\n\t// Monorepo configuration / Monorepo 配置\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml'],\n\n\t// GitHub Actions workflows / GitHub Actions 工作流程\n\t['.github/workflows/build-pnpm.yml', 'file/github/workflows/build-pnpm.yml'],\n\t['.github/workflows/build-yarn.yml', 'file/github/workflows/build-yarn.yml'],\n\n\t// Additional GitHub configuration / 額外的 GitHub 配置\n\t...(([\n\t\t'dependabot.yml',\n\t\t'commit-convention.md',\n\n\t\t// ---\n\n\t\t// 'workflows/codeql-analysis.yml',\n\t\t// 'workflows/cmd-rebase.yml',\n\n\t\t// 'workflows/coverage.yml',\n\t\t// 'workflows/action-yarnlock-dedupe.yml',\n\t\t// 'workflows/yarn-lock-changes.yml',\n\n\t\t// ---\n\n\t] as const).map(file => [`.github/${file}`, `file/github/${file}`] as const satisfies IStaticFilesMapArrayEntry<string>)),\n\n\t// Node version files / Node 版本檔案\n\t['.node-version.tpl', 'file/nvmrc'],\n\t['.nvmrc.tpl', 'file/nvmrc'],\n\n\t// Root TypeScript configuration / 根目錄 TypeScript 配置\n\t['.eslintrc.json', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t//['changelog-option.js', 'file/changelog-option.js', 'changelog-option.js.tpl'],\n\n\t// Package manager configuration / 套件管理器配置\n\t['.yarnrc.yml.tpl', 'file/root/yarnrc.yml', '.yarnrc.yml'],\n\t['.npmrc.tpl', 'file/npmrc', '.npmrc'],\n\n\t['.env.tpl', 'file/env'],\n\n\t// Jest configuration / Jest 配置\n\t// ['jest.config.js', 'file/jest.config.js'],\n\t// ['jest.config.js.tpl', 'file/jest.config.js'],\n\t['jest.config.auto.js.tpl', 'file/jest.config.auto.js'],\n\n\t// Editor configuration / 編輯器配置\n\t['.editorconfig.tpl', 'file/tpl.editorconfig'],\n\t['.editorconfig', 'file/tpl.editorconfig'],\n\n\t// Global type declarations / 全局類型聲明\n\t['global.tsdx.d.ts', 'file/root/global.tsdx.d.ts'],\n\n\t// Browserslist configuration / Browserslist 配置\n\t['.browserslistrc', 'file/ws-root/browserslistrc'],\n\n\t// TSC multi configuration / TSC 多配置\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t// NYC coverage configuration / NYC 覆蓋率配置\n\t// ['.nycrc.tpl', 'file/nycrc', '.nycrc'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Default static files for workspace root only / 僅工作區根目錄的預設靜態檔案\n *\n * Contains files specific to workspace root management.\n * 包含特定於工作區根目錄管理的檔案。\n */\nconst _defaultCopyStaticFilesWsRootOnly = [\n\n\t// Lerna configuration / Lerna 配置\n\t['lerna.json.tpl', 'file/lerna.json.tpl'],\n\n\t// pnpm workspace configuration / pnpm 工作區配置\n\t['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],\n\n\t// TSC multi configuration / TSC 多配置\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t// Workspace root file / 工作區根目錄檔案\n\t['__root_ws.ts', 'file/ws-root/__root_ws.ts'],\n\n\t// Jest configuration / Jest 配置\n\t['jest.config.js', 'file/ws-root/jest.config.js'],\n\t['jest-preset.js', 'file/ws-root/jest-preset.js'],\n\n\t['jest.config.js.tpl', 'file/ws-root/jest.config.js'],\n\n\t// Run configurations / 執行配置\n\t['.run/lerna_publish_yes.run.xml', 'file/ws-root/.run/lerna_publish_yes.run.xml'],\n\n] as const satisfies IStaticFilesMapArray<string>;\n\n/**\n * Frozen default static files for package-level / 凍結的套件層級預設靜態檔案\n *\n * Use this for copying static files to individual packages.\n * 用於將靜態檔案複製到各個套件。\n */\nexport const defaultCopyStaticFiles = Object.freeze(_defaultCopyStaticFiles) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFiles>>;\n\n/**\n * Frozen default static files for root-level only / 凍結的僅根目錄層級預設靜態檔案\n *\n * Use this for copying static files to the workspace root only.\n * 用於將靜態檔案僅複製到工作區根目錄。\n */\nexport const defaultCopyStaticFilesRootOnly = Object.freeze(_defaultCopyStaticFilesRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesRootOnly>>;\n\n/**\n * Frozen default static files for workspace root / 凍結的工作區根目錄預設靜態檔案\n *\n * Use this for workspace root specific file management.\n * 用於工作區根目錄特定的檔案管理。\n */\nexport const defaultCopyStaticFilesWsRootOnly = Object.freeze(_defaultCopyStaticFilesWsRootOnly) as any as IStaticFilesMapArray<_Key<typeof _defaultCopyStaticFilesWsRootOnly>>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yarn-tool/static-file",
3
- "version": "3.0.16",
3
+ "version": "3.0.18",
4
4
  "description": "",
5
5
  "homepage": "https://github.com/bluelovers/ws-yarn-workspaces/tree/master/packages/@yarn-tool/static-file#readme",
6
6
  "bugs": {
@@ -15,28 +15,26 @@
15
15
  "author": "",
16
16
  "main": "index.js",
17
17
  "scripts": {
18
- "coverage": "npx nyc npm run test",
19
- "lint": "npx eslint **/*.ts",
20
18
  "test": "node --run test:jest --",
21
19
  "test:jest": "jest --passWithNoTests",
22
- "test:jest:coverage": "yarn run test:jest -- --coverage",
23
- "test:jest:snapshot": "yarn run test:jest -- -u",
24
- "test:snapshot": "yarn run test -- -u",
20
+ "test:jest:coverage": "pnpm run test:jest -- --coverage",
21
+ "test:jest:snapshot": "pnpm run test:jest -- -u",
22
+ "test:snapshot": "pnpm run test -u",
25
23
  "test:tsd": "ynpx tsd",
26
24
  "npm:publish": "npm publish",
27
- "preversion": "yarn run test",
28
- "prepublishOnly": "echo prepublishOnly",
29
- "postpublish_": "git commit -m \"chore(release): publish\" .",
30
- "ncu": "npx yarn-tool ncu -u",
31
- "sort-package-json": "npx yarn-tool sort",
25
+ "preversion": "pnpm run test",
26
+ "prepublishOnly": "node --run fix:ignore",
27
+ "ncu": "yarn-tool ncu -u",
28
+ "sort-package-json": "yarn-tool sort",
29
+ "fix:ignore": "tsx test/scripts/update-npmignore-static-files.ts",
32
30
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
33
31
  },
34
32
  "dependencies": {
35
- "fs-extra": "^11.3.4",
33
+ "fs-extra": "^11.4.0",
36
34
  "tslib": ">=2.8.1"
37
35
  },
38
36
  "publishConfig": {
39
37
  "access": "public"
40
38
  },
41
- "gitHead": "8c939a673ef0f088d4a3aa8a240ed6c28d390f98"
39
+ "gitHead": "98d097882fd29058be00d45ff225929538d323d0"
42
40
  }
@@ -1,12 +0,0 @@
1
- // @ts-check
2
-
3
- /**
4
- * @type { import('@types/conventional-changelog').Options }
5
- */
6
- const options = {
7
- gitRawCommitsOpts: {
8
- merges: null,
9
- },
10
- }
11
-
12
- module.exports = options
@@ -1,205 +0,0 @@
1
- // @ts-check
2
- // @deprecated replace by jest.config.auto.js
3
-
4
- const { join, dirname } = require('path');
5
- // @ts-ignore
6
- const { tryRealpath } = require('jest-util');
7
- const { tmpdir } = require('os');
8
-
9
- /**
10
- * @param {string} name
11
- * @returns {string}
12
- * @private
13
- */
14
- function _requireResolve(name)
15
- {
16
- let result;
17
-
18
- try
19
- {
20
- // @ts-ignore
21
- const { requireResolveExtra, requireResolveCore } = require('@yarn-tool/require-resolve');
22
-
23
- const paths = [
24
- requireResolveExtra('@bluelovers/tsdx').result,
25
- requireResolveExtra('tsdx').result,
26
- ].filter(Boolean);
27
-
28
- result = requireResolveCore(name, {
29
- includeGlobal: true,
30
- includeCurrentDirectory: true,
31
- paths,
32
- })
33
- }
34
- catch (e)
35
- {
36
-
37
- }
38
-
39
- result = result || require.resolve(name);
40
-
41
- console.info('[require.resolve]', name, '=>', result)
42
-
43
- return result
44
- }
45
-
46
- /**
47
- * @returns {string}
48
- * @see https://github.com/facebook/jest/blob/main/packages/jest-config/src/getCacheDirectory.ts
49
- */
50
- function getCacheDirectory()
51
- {
52
- const { getuid } = process;
53
- const tmpdirPath = process.env['JEST_CACHE_DIRECTORY'] || join(tryRealpath(tmpdir()), 'jest');
54
- if (getuid == null)
55
- {
56
- return tmpdirPath;
57
- }
58
- else
59
- {
60
- // On some platforms tmpdir() is `/tmp`, causing conflicts between different
61
- // users and permission issues. Adding an additional subdivision by UID can
62
- // help.
63
- return `${tmpdirPath}_${getuid.call(process).toString(36)}`;
64
- }
65
- }
66
-
67
- const testExt = [
68
- 'ts',
69
- 'tsx',
70
- 'mts',
71
- 'cts',
72
- //'js',
73
- //'jsx',
74
- // 'mjs',
75
- // 'cjs',
76
- ].join('|');
77
-
78
- const cacheDirectory = getCacheDirectory();
79
-
80
- /**
81
- * @_type { import('@jest/types').Config.InitialOptions }
82
- * @type { import('ts-jest').InitialOptionsTsJest }
83
- */
84
- const jestConfig = {
85
- globals: {
86
- 'ts-jest': {
87
- //tsconfig: 'tsconfig.spec.json',
88
- },
89
- },
90
- cacheDirectory,
91
- maxWorkers: 1,
92
- clearMocks: true,
93
- passWithNoTests: true,
94
- moduleFileExtensions: [
95
- 'ts',
96
- 'tsx',
97
- 'mts',
98
- 'cts',
99
- 'js',
100
- 'jsx',
101
- 'mjs',
102
- 'cjs',
103
- 'json',
104
- 'node',
105
- ],
106
- testEnvironment: 'node',
107
- //testMatch: ['**/*.test.ts', '**/*.spec.ts'],
108
- testMatch: void 0,
109
- testRegex: [
110
- `\\.(tests?|spec)\\.(${testExt})$`,
111
- `__tests__\/\.*\\.(${testExt})$`,
112
- ],
113
- testPathIgnorePatterns: [
114
- '/node_modules/',
115
- '/__fixtures__/',
116
- '/fixtures/',
117
- '/__tests__/helpers/',
118
- '/__tests__/utils/',
119
- '__mocks__',
120
- '/dist/',
121
- ],
122
- //testRunner: 'jest-circus/runner',
123
- setupFilesAfterEnv: [
124
- //"jest-chain",
125
- //"jest-extended/all",
126
- //"jest-extended-extra",
127
- //"jest-num-close-with",
128
- /**
129
- * https://medium.com/doctolib/how-to-run-the-same-jest-test-suite-across-several-platforms-jest-os-detection-plugin-included-f8113832482b
130
- * https://github.com/doctolib/jest-os-detection
131
- */
132
- //'jest-os-detection',
133
- ],
134
- transform: {
135
- '.(ts|tsx|mts|cts)$': _requireResolve('ts-jest'),
136
- },
137
- verbose: true,
138
- /**
139
- * if didn't set `coverageProvider` to `v8`
140
- * with `collectCoverage` `true`, nodejs debug point maybe will fail
141
- */
142
- coverageProvider: 'v8',
143
- collectCoverage: false,
144
- coveragePathIgnorePatterns: [
145
- '/node_modules/',
146
- '/__snapshots__/',
147
- '/__tests__/',
148
- '/__test__/',
149
- //'**/node_modules/',
150
- //'**/__snapshots__/',
151
- //'**/__tests__/',
152
- '/dist/',
153
- '/test/',
154
- '/fixture/',
155
- ],
156
- /**
157
- * https://github.com/facebook/jest/issues/9771#issuecomment-872764344
158
- */
159
- //resolver: 'jest-node-exports-resolver',
160
- }
161
-
162
- /*
163
- try
164
- {
165
- if (!jestConfig.preset)
166
- {
167
- let result = require('@yarn-tool/ws-find-up-paths').findUpPathsWorkspaces('jest.config.js', {
168
- ignoreCurrentPackage: true,
169
- onlyFiles: true,
170
- }).result;
171
- if (result)
172
- {
173
- jestConfig.preset = result;
174
- }
175
- }
176
- }
177
- catch (e)
178
- {
179
-
180
- }
181
- */
182
-
183
- try
184
- {
185
- if (!jestConfig.preset)
186
- {
187
- let result = _requireResolve('@bluelovers/jest-config/package.json');
188
- if (result)
189
- {
190
- jestConfig.preset = dirname(result);
191
- }
192
- }
193
- }
194
- catch (e)
195
- {
196
-
197
- }
198
-
199
- console.info(`jest.config`);
200
- console.info(`- file: ${__filename}`);
201
- console.info(`- cwd: ${process.cwd()}`);
202
- console.info(`- cacheDirectory: ${cacheDirectory}`);
203
- console.info(`- preset: ${jestConfig.preset}`);
204
-
205
- module.exports = jestConfig
@@ -1,6 +0,0 @@
1
- {
2
- "targets": [
3
- { "extname": ".cjs", "module": "commonjs" },
4
- { "extname": ".mjs", "module": "nodenext" }
5
- ]
6
- }
@@ -1,5 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "noEmit": true
4
- }
5
- }