@yarn-tool/static-file 3.0.31 → 3.0.33

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,32 @@
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.33](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.32...@yarn-tool/static-file@3.0.33) (2026-11-16)
7
+
8
+
9
+
10
+ ### ✨ Features
11
+
12
+ * **test:** 新增 Playwright 測試支援 ([cffba94](https://github.com/bluelovers/ws-yarn-workspaces/commit/cffba94d62dd933e5ff70cd8b3830459e56f4944))
13
+
14
+
15
+ ### 🛠 Build System
16
+
17
+ * update build ([ef0f46f](https://github.com/bluelovers/ws-yarn-workspaces/commit/ef0f46f1e88ed77365cbf7762f4bfe6d29a510fd))
18
+
19
+
20
+
21
+ ## [3.0.32](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.31...@yarn-tool/static-file@3.0.32) (2026-11-16)
22
+
23
+
24
+
25
+ ### ♻️ Chores
26
+
27
+ * update ignore files ([1d16f08](https://github.com/bluelovers/ws-yarn-workspaces/commit/1d16f0870ada8b29b3ff8131074c5fd2bb6f4ada))
28
+ * **deps:** 更新依賴項目並優化靜態檔案發佈流程 ([5e9eb81](https://github.com/bluelovers/ws-yarn-workspaces/commit/5e9eb819a8526c55a34b4d95d7fb2b331ce1617b))
29
+
30
+
31
+
6
32
  ## [3.0.31](https://github.com/bluelovers/ws-yarn-workspaces/compare/@yarn-tool/static-file@3.0.29...@yarn-tool/static-file@3.0.31) (2026-11-06)
7
33
 
8
34
 
package/file/gitignore CHANGED
@@ -71,6 +71,10 @@ tsc-multi.json.tpl
71
71
  .turbo
72
72
  .next
73
73
 
74
+ /api-extractor.json
75
+
76
+ /src/index.ts.tpl
77
+
74
78
  # 測試檔 / test files · git 專用 / git only
75
79
  # 測試建置產物(共用輔助產生)/ test build artifacts (generated by shared helper)
76
80
  test/temp*
@@ -155,6 +159,8 @@ coverage
155
159
  *.spec.d.ts
156
160
  *.spec.js
157
161
 
162
+ test-results/.last-run.json
163
+
158
164
  # IDE 與編輯器設定 / IDE & editor settings · 兩類共用 / shared
159
165
  .idea
160
166
  .vscode
package/file/npmignore CHANGED
@@ -91,6 +91,10 @@ tsc-multi.json.tpl
91
91
  .turbo
92
92
  .next
93
93
 
94
+ /api-extractor.json
95
+
96
+ /src/index.ts.tpl
97
+
94
98
  # 測試檔 / test files · npm 發布專用 / npm publish only
95
99
  test
96
100
  .gitkeep
@@ -177,6 +181,8 @@ coverage
177
181
  *.spec.d.ts
178
182
  *.spec.js
179
183
 
184
+ test-results/.last-run.json
185
+
180
186
  # IDE 與編輯器設定 / IDE & editor settings · npm 發布專用 / npm publish only
181
187
  intellij-style-guide.xml
182
188
 
@@ -0,0 +1,6 @@
1
+ // @ts-ignore
2
+ import { defineConfig } from '@playwright/test';
3
+
4
+ export default defineConfig({
5
+ testMatch: /.*\.playwright(?:-|\.)(?:spec|test)\.(?:ts)/,
6
+ });
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", "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"][]];
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"], ["playwright.config.ts", "file/playwright.config.ts", "playwright.config.js"], ["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
  *
package/lib/const.js CHANGED
@@ -36,6 +36,7 @@ const _defaultCopyStaticFiles = [
36
36
  * ESLint configuration
37
37
  */
38
38
  ['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],
39
+ ['playwright.config.ts', 'file/playwright.config.ts', 'playwright.config.js'],
39
40
  /**
40
41
  * 文件
41
42
  * Documentation
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;;;OAGG;IACH,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC;;;OAGG;IACH,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;;;OAGG;IACH,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,CAAC;IAElE;;;OAGG;IACH,CAAC,WAAW,EAAE,gBAAgB,CAAC;IAE/B;;;OAGG;IACH,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAExC,CAAC,gBAAgB,EAAE,0BAA0B,CAAC;IAE9C;;;OAGG;IACH,CAAC,YAAY,EAAE,gBA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,YAAY,EAAE,QAAQ,CAAC;IAEtC,CAAC,UAAU,EAAE,UAAU,CAAC;IAExB;;;;;;OAMG;IACH,6CAA6C;IAC7C,iDAAiD;IACjD,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;IAEvD;;;OAGG;IACH,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAC9C,CAAC,eAAe,EAAE,uBAAuB,CAAC;IAE1C;;;OAGG;IACH,CAAC,kBAAkB,EAAE,4BAA4B,CAAC;IAElD;;;OAGG;IACH,CAAC,iBAAiB,EAAE,6BAA6B,CAAC;IAElD;;;OAGG;IACH,uEAAuE;IAEvE;;;OAGG;IACH,0CAA0C;CAEM,CAAC;AAElD;;;;;GAKG;AACH,MAAM,iCAAiC,GAAG;IAEzC;;;OAGG;IACH,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IAEzC;;;OAGG;IACH,CAAC,qBAAqB,EAAE,0BAA0B,CAAC;IAEnD;;;OAGG;IACH,uEAAuE;IAEvE;;;OAGG;IACH,CAAC,cAAc,EAAE,2BAA2B,CAAC;IAE7C;;;;;;OAMG;IACH,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IACjD,CAAC,gBAAgB,EAAE,6BAA6B,CAAC;IAEjD,CAAC,oBAAoB,EAAE,6BAA6B,CAAC;IAErD;;;OAGG;IACH,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/**\n\t * 忽略檔案\n\t * Ignore files\n\t */\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\t['.eslintignore', 'file/eslintignore'],\n\n\t/**\n\t * TypeScript 配置\n\t * TypeScript configuration\n\t */\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/**\n\t * ESLint 配置\n\t * ESLint configuration\n\t */\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t/**\n\t * 文件\n\t * Documentation\n\t */\n\t['README.md', 'file/README.md'],\n\n\t/**\n\t * 測試配置\n\t * Test configuration\n\t */\n\t['.mocharc.yml.tpl', 'file/mocharc.yml'],\n\n\t['jest.config.js', 'file/jest.config.auto.js'],\n\n\t/**\n\t * Now/Zeit 部署配置\n\t * Now/Zeit deployment\n\t */\n\t['.nowignore', 'file/nowignore'],\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t/**\n\t * TSDX 配置\n\t * TSDX configuration\n\t */\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n\t/**\n\t * 測試\n\t * test\n\t *\n\t * 以展開運算式一次產生 test/ 底下的固定樣板條目\n\t * Expands into template entries under test/ in one go\n\t */\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/**\n\t\t * 測試固定檔案\n\t\t * Test fixtures\n\t\t */\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/**\n\t * Monorepo 配置\n\t * Monorepo configuration\n\t */\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml'],\n\n\t/**\n\t * GitHub Actions 工作流程\n\t * GitHub Actions workflows\n\t */\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/**\n\t * 額外的 GitHub 配置\n\t * Additional GitHub configuration\n\t */\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/**\n\t * Node 版本檔案\n\t * Node version files\n\t */\n\t['.node-version.tpl', 'file/nvmrc'],\n\t['.nvmrc.tpl', 'file/nvmrc'],\n\n\t/**\n\t * 根目錄 TypeScript 配置\n\t * Root TypeScript configuration\n\t *\n\t * 注意:此處目標為 .eslintrc.json,屬於根目錄專用的 ESLint 設定\n\t * Note: the target here is .eslintrc.json, the ESLint config used only at the root\n\t */\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/**\n\t * 套件管理器配置\n\t * Package manager configuration\n\t */\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/**\n\t * Jest 配置\n\t * Jest configuration\n\t *\n\t * 僅放置 .tpl 樣板,正式設定檔交由工作區層級建立\n\t * Only the .tpl template is shipped here; the real config is created by the workspace layer\n\t */\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/**\n\t * 編輯器配置\n\t * Editor configuration\n\t */\n\t['.editorconfig.tpl', 'file/tpl.editorconfig'],\n\t['.editorconfig', 'file/tpl.editorconfig'],\n\n\t/**\n\t * 全域型別宣告\n\t * Global type declarations\n\t */\n\t['global.tsdx.d.ts', 'file/root/global.tsdx.d.ts'],\n\n\t/**\n\t * Browserslist 配置\n\t * Browserslist configuration\n\t */\n\t['.browserslistrc', 'file/ws-root/browserslistrc'],\n\n\t/**\n\t * TSC 多配置\n\t * TSC multi configuration\n\t */\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t/**\n\t * NYC 覆蓋率配置\n\t * NYC coverage configuration\n\t */\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/**\n\t * Lerna 配置\n\t * Lerna configuration\n\t */\n\t['lerna.json.tpl', 'file/lerna.json.tpl'],\n\n\t/**\n\t * pnpm 工作區配置\n\t * pnpm workspace configuration\n\t */\n\t['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],\n\n\t/**\n\t * TSC 多配置\n\t * TSC multi configuration\n\t */\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t/**\n\t * 工作區根目錄檔案\n\t * Workspace root file\n\t */\n\t['__root_ws.ts', 'file/ws-root/__root_ws.ts'],\n\n\t/**\n\t * Jest 配置\n\t * Jest configuration\n\t *\n\t * 工作區根目錄同時提供正式設定與樣板兩種形式\n\t * The workspace root ships both the real config and the template form\n\t */\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/**\n\t * 執行配置\n\t * Run configurations\n\t */\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;;;OAGG;IACH,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,YAAY,EAAE,gBAAgB,CAAC;IAChC,CAAC,eAAe,EAAE,mBAAmB,CAAC;IAEtC;;;OAGG;IACH,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;;;OAGG;IACH,CAAC,oBAAoB,EAAE,wBAAwB,EAAE,gBAAgB,CAAC;IAElE,CAAC,sBAAsB,EAAE,2BAA2B,EAAE,sBAAsB,CAAC;IAE7E;;;OAGG;IACH,CAAC,WAAW,EAAE,gBAAgB,CA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AAM,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/**\n\t * 忽略檔案\n\t * Ignore files\n\t */\n\t['.npmignore', 'file/npmignore'],\n\t['.gitignore', 'file/gitignore'],\n\t['.eslintignore', 'file/eslintignore'],\n\n\t/**\n\t * TypeScript 配置\n\t * TypeScript configuration\n\t */\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/**\n\t * ESLint 配置\n\t * ESLint configuration\n\t */\n\t['.eslintrc.json.tpl', 'file/eslintrc.json.tpl', '.eslintrc.json'],\n\n\t['playwright.config.ts', 'file/playwright.config.ts', 'playwright.config.js'],\n\n\t/**\n\t * 文件\n\t * Documentation\n\t */\n\t['README.md', 'file/README.md'],\n\n\t/**\n\t * 測試配置\n\t * Test configuration\n\t */\n\t['.mocharc.yml.tpl', 'file/mocharc.yml'],\n\n\t['jest.config.js', 'file/jest.config.auto.js'],\n\n\t/**\n\t * Now/Zeit 部署配置\n\t * Now/Zeit deployment\n\t */\n\t['.nowignore', 'file/nowignore'],\n\t['now.json.tpl', 'file/now.json.tpl', 'now.json'],\n\n\t/**\n\t * TSDX 配置\n\t * TSDX configuration\n\t */\n\t['tsdx.config.js.tpl', 'file/tsdx.config.js', 'tsdx.config.js'],\n\n\t/**\n\t * 測試\n\t * test\n\t *\n\t * 以展開運算式一次產生 test/ 底下的固定樣板條目\n\t * Expands into template entries under test/ in one go\n\t */\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/**\n\t\t * 測試固定檔案\n\t\t * Test fixtures\n\t\t */\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/**\n\t * Monorepo 配置\n\t * Monorepo configuration\n\t */\n\t['lerna.json.tpl', 'file/lerna.json.tpl', 'lerna.json'],\n\t['pnpm-workspace.yaml.tpl', 'file/pnpm-workspace.yaml'],\n\n\t/**\n\t * GitHub Actions 工作流程\n\t * GitHub Actions workflows\n\t */\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/**\n\t * 額外的 GitHub 配置\n\t * Additional GitHub configuration\n\t */\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/**\n\t * Node 版本檔案\n\t * Node version files\n\t */\n\t['.node-version.tpl', 'file/nvmrc'],\n\t['.nvmrc.tpl', 'file/nvmrc'],\n\n\t/**\n\t * 根目錄 TypeScript 配置\n\t * Root TypeScript configuration\n\t *\n\t * 注意:此處目標為 .eslintrc.json,屬於根目錄專用的 ESLint 設定\n\t * Note: the target here is .eslintrc.json, the ESLint config used only at the root\n\t */\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/**\n\t * 套件管理器配置\n\t * Package manager configuration\n\t */\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/**\n\t * Jest 配置\n\t * Jest configuration\n\t *\n\t * 僅放置 .tpl 樣板,正式設定檔交由工作區層級建立\n\t * Only the .tpl template is shipped here; the real config is created by the workspace layer\n\t */\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/**\n\t * 編輯器配置\n\t * Editor configuration\n\t */\n\t['.editorconfig.tpl', 'file/tpl.editorconfig'],\n\t['.editorconfig', 'file/tpl.editorconfig'],\n\n\t/**\n\t * 全域型別宣告\n\t * Global type declarations\n\t */\n\t['global.tsdx.d.ts', 'file/root/global.tsdx.d.ts'],\n\n\t/**\n\t * Browserslist 配置\n\t * Browserslist configuration\n\t */\n\t['.browserslistrc', 'file/ws-root/browserslistrc'],\n\n\t/**\n\t * TSC 多配置\n\t * TSC multi configuration\n\t */\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t/**\n\t * NYC 覆蓋率配置\n\t * NYC coverage configuration\n\t */\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/**\n\t * Lerna 配置\n\t * Lerna configuration\n\t */\n\t['lerna.json.tpl', 'file/lerna.json.tpl'],\n\n\t/**\n\t * pnpm 工作區配置\n\t * pnpm workspace configuration\n\t */\n\t['pnpm-workspace.yaml', 'file/pnpm-workspace.yaml'],\n\n\t/**\n\t * TSC 多配置\n\t * TSC multi configuration\n\t */\n\t// ['tsc-multi.json.tpl', 'file/tsc-multi.json.tpl', 'tsc-multi.json'],\n\n\t/**\n\t * 工作區根目錄檔案\n\t * Workspace root file\n\t */\n\t['__root_ws.ts', 'file/ws-root/__root_ws.ts'],\n\n\t/**\n\t * Jest 配置\n\t * Jest configuration\n\t *\n\t * 工作區根目錄同時提供正式設定與樣板兩種形式\n\t * The workspace root ships both the real config and the template form\n\t */\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/**\n\t * 執行配置\n\t * Run configurations\n\t */\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.31",
3
+ "version": "3.0.33",
4
4
  "description": "用於將靜態設定檔案 (static configuration files) 複製到 yarn 工作區專案的工具 / A utility for copying static configuration files to yarn workspace projects",
5
5
  "keywords": [
6
6
  "static-file",
@@ -44,9 +44,10 @@
44
44
  "test:tsd": "ynpx tsd",
45
45
  "npm:publish": "npm publish",
46
46
  "preversion": "pnpm run test",
47
- "prepublishOnly": "node --run fix:ignore",
47
+ "prepublishOnly": "node --run fix:ignore && node --run fix:ignore:commit",
48
48
  "fix:ignore": "node --run fix:ignore:build && node --run fix:ignore:copy && node --run fix:ignore:merge",
49
49
  "fix:ignore:build": "tsx test/scripts/compose-split-ignore-files.ts",
50
+ "fix:ignore:commit": "git commit -m \"chore: update ignore files\" ./test/fixtures/split ./test/fixtures/out ./file/gitignore ./file/npmignore & echo fix:ignore:commit done",
50
51
  "fix:ignore:copy": "copy test\\fixtures\\out\\gitignore file\\gitignore && copy test\\fixtures\\out\\npmignore file\\npmignore && echo ignore file copyed",
51
52
  "fix:ignore:merge": "tsx test/scripts/update-npmignore-static-files.ts",
52
53
  "ncu": "yarn-tool ncu -u",
@@ -54,7 +55,7 @@
54
55
  "tsc:showConfig": "ynpx get-current-tsconfig -p"
55
56
  },
56
57
  "dependencies": {
57
- "@yarn-tool/ignore": "^1.0.8",
58
+ "@yarn-tool/ignore": "^1.0.9",
58
59
  "array-hyper-unique": "^2.1.10",
59
60
  "fs-extra": "^11.4.1",
60
61
  "tslib": ">=2.8.1"
@@ -62,5 +63,5 @@
62
63
  "publishConfig": {
63
64
  "access": "public"
64
65
  },
65
- "gitHead": "491c2429f96718eca2e628c00a8cd0cf5ade31c2"
66
+ "gitHead": "2a8c9e6427b77617197a2815821e6c10692a8bbd"
66
67
  }
@@ -130,6 +130,21 @@ exports[`_copyStaticFilesCoreListGenerator > 預設值 + 必填參數 / defaults
130
130
  },
131
131
  "copy": "function"
132
132
  },
133
+ {
134
+ "entry": [
135
+ "playwright.config.ts",
136
+ "file/playwright.config.ts",
137
+ "playwright.config.js"
138
+ ],
139
+ "runtime": {
140
+ "targetFile": "playwright.config.ts",
141
+ "staticFile": "file/playwright.config.ts",
142
+ "targetFileFull": "<ws-yarn-workspaces>/packages/@yarn-tool/static-file/test/playwright.config.ts",
143
+ "staticFileFull": "<ws-yarn-workspaces>/packages/@yarn-tool/static-file/file/playwright.config.ts",
144
+ "overwrite": false
145
+ },
146
+ "copy": "function"
147
+ },
133
148
  {
134
149
  "entry": [
135
150
  "README.md",
@@ -376,6 +391,11 @@ exports[`_handleCopyStaticFilesOptions > 預設值 + 必填參數 / defaults wit
376
391
  "file/eslintrc.json.tpl",
377
392
  ".eslintrc.json"
378
393
  ],
394
+ [
395
+ "playwright.config.ts",
396
+ "file/playwright.config.ts",
397
+ "playwright.config.js"
398
+ ],
379
399
  [
380
400
  "README.md",
381
401
  "file/README.md"
@@ -71,6 +71,10 @@ tsc-multi.json.tpl
71
71
  .turbo
72
72
  .next
73
73
 
74
+ /api-extractor.json
75
+
76
+ /src/index.ts.tpl
77
+
74
78
  # 測試檔 / test files · git 專用 / git only
75
79
  # 測試建置產物(共用輔助產生)/ test build artifacts (generated by shared helper)
76
80
  test/temp*
@@ -155,6 +159,8 @@ coverage
155
159
  *.spec.d.ts
156
160
  *.spec.js
157
161
 
162
+ test-results/.last-run.json
163
+
158
164
  # IDE 與編輯器設定 / IDE & editor settings · 兩類共用 / shared
159
165
  .idea
160
166
  .vscode
@@ -91,6 +91,10 @@ tsc-multi.json.tpl
91
91
  .turbo
92
92
  .next
93
93
 
94
+ /api-extractor.json
95
+
96
+ /src/index.ts.tpl
97
+
94
98
  # 測試檔 / test files · npm 發布專用 / npm publish only
95
99
  test
96
100
  .gitkeep
@@ -177,6 +181,8 @@ coverage
177
181
  *.spec.d.ts
178
182
  *.spec.js
179
183
 
184
+ test-results/.last-run.json
185
+
180
186
  # IDE 與編輯器設定 / IDE & editor settings · npm 發布專用 / npm publish only
181
187
  intellij-style-guide.xml
182
188
 
@@ -36,3 +36,7 @@ web_modules
36
36
  tsc-multi.json.tpl
37
37
  .turbo
38
38
  .next
39
+
40
+ /api-extractor.json
41
+
42
+ /src/index.ts.tpl
@@ -5,3 +5,5 @@ coverage
5
5
  .mocharc.yml
6
6
  *.spec.d.ts
7
7
  *.spec.js
8
+
9
+ test-results/.last-run.json