@jpp-toolkit/tsdown-config 0.0.14 → 0.0.16

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/dist/index.mjs CHANGED
@@ -1,11 +1,10 @@
1
1
  import path from "node:path";
2
- import { defineConfig } from "tsdown";
3
2
 
4
3
  //#region src/index.ts
5
4
  function createTsdownConfig(overrides = {}) {
6
5
  const cwd = overrides.cwd ?? process.cwd();
7
6
  const ignoreWatch = Array.isArray(overrides.ignoreWatch) ? overrides.ignoreWatch : overrides.ignoreWatch ? [overrides.ignoreWatch] : [];
8
- return defineConfig({
7
+ return {
9
8
  cwd,
10
9
  target: "node24",
11
10
  platform: "node",
@@ -19,6 +18,7 @@ function createTsdownConfig(overrides = {}) {
19
18
  shims: true,
20
19
  ...overrides,
21
20
  ignoreWatch: [
21
+ /\/\.git\//u,
22
22
  /\/\.turbo\//u,
23
23
  /\/coverage\//u,
24
24
  /\/dist\//u,
@@ -27,7 +27,7 @@ function createTsdownConfig(overrides = {}) {
27
27
  /\/tmp\//u,
28
28
  ...ignoreWatch
29
29
  ]
30
- });
30
+ };
31
31
  }
32
32
 
33
33
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import path from 'node:path';\n\nimport { defineConfig } from 'tsdown';\nimport type { UserConfig } from 'tsdown';\n\nexport function createTsdownConfig(overrides: UserConfig = {}): UserConfig {\n const cwd = overrides.cwd ?? process.cwd();\n\n const ignoreWatch =\n Array.isArray(overrides.ignoreWatch) ? overrides.ignoreWatch\n : overrides.ignoreWatch ? [overrides.ignoreWatch]\n : [];\n\n return defineConfig({\n cwd,\n\n target: 'node24',\n platform: 'node',\n\n entry: path.resolve(cwd, 'src/index.ts'),\n outDir: path.resolve(cwd, 'dist'),\n tsconfig: path.resolve(cwd, 'tsconfig.json'),\n\n format: ['esm'],\n\n dts: true,\n sourcemap: true,\n nodeProtocol: true,\n shims: true,\n\n ...overrides,\n\n ignoreWatch: [\n /\\/\\.turbo\\//u,\n /\\/coverage\\//u,\n /\\/dist\\//u,\n /\\/generated\\//u,\n /\\/old\\//u,\n /\\/tmp\\//u,\n ...ignoreWatch,\n ],\n });\n}\n"],"mappings":";;;;AAKA,SAAgB,mBAAmB,YAAwB,EAAE,EAAc;CACvE,MAAM,MAAM,UAAU,OAAO,QAAQ,KAAK;CAE1C,MAAM,cACF,MAAM,QAAQ,UAAU,YAAY,GAAG,UAAU,cAC/C,UAAU,cAAc,CAAC,UAAU,YAAY,GAC/C,EAAE;AAER,QAAO,aAAa;EAChB;EAEA,QAAQ;EACR,UAAU;EAEV,OAAO,KAAK,QAAQ,KAAK,eAAe;EACxC,QAAQ,KAAK,QAAQ,KAAK,OAAO;EACjC,UAAU,KAAK,QAAQ,KAAK,gBAAgB;EAE5C,QAAQ,CAAC,MAAM;EAEf,KAAK;EACL,WAAW;EACX,cAAc;EACd,OAAO;EAEP,GAAG;EAEH,aAAa;GACT;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACN;EACJ,CAAC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import path from 'node:path';\n\nimport type { UserConfig } from 'tsdown';\n\nexport function createTsdownConfig(overrides: UserConfig = {}): UserConfig {\n const cwd = overrides.cwd ?? process.cwd();\n\n const ignoreWatch =\n Array.isArray(overrides.ignoreWatch) ? overrides.ignoreWatch\n : overrides.ignoreWatch ? [overrides.ignoreWatch]\n : [];\n\n return {\n cwd,\n\n target: 'node24',\n platform: 'node',\n\n entry: path.resolve(cwd, 'src/index.ts'),\n outDir: path.resolve(cwd, 'dist'),\n tsconfig: path.resolve(cwd, 'tsconfig.json'),\n\n format: ['esm'],\n\n dts: true,\n sourcemap: true,\n nodeProtocol: true,\n shims: true,\n\n ...overrides,\n\n ignoreWatch: [\n /\\/\\.git\\//u,\n /\\/\\.turbo\\//u,\n /\\/coverage\\//u,\n /\\/dist\\//u,\n /\\/generated\\//u,\n /\\/old\\//u,\n /\\/tmp\\//u,\n ...ignoreWatch,\n ],\n };\n}\n"],"mappings":";;;AAIA,SAAgB,mBAAmB,YAAwB,EAAE,EAAc;CACvE,MAAM,MAAM,UAAU,OAAO,QAAQ,KAAK;CAE1C,MAAM,cACF,MAAM,QAAQ,UAAU,YAAY,GAAG,UAAU,cAC/C,UAAU,cAAc,CAAC,UAAU,YAAY,GAC/C,EAAE;AAER,QAAO;EACH;EAEA,QAAQ;EACR,UAAU;EAEV,OAAO,KAAK,QAAQ,KAAK,eAAe;EACxC,QAAQ,KAAK,QAAQ,KAAK,OAAO;EACjC,UAAU,KAAK,QAAQ,KAAK,gBAAgB;EAE5C,QAAQ,CAAC,MAAM;EAEf,KAAK;EACL,WAAW;EACX,cAAc;EACd,OAAO;EAEP,GAAG;EAEH,aAAa;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA,GAAG;GACN;EACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpp-toolkit/tsdown-config",
3
- "version": "0.0.14",
3
+ "version": "0.0.16",
4
4
  "description": "Tsdown configurations for JS/TS projects.",
5
5
  "keywords": [
6
6
  "jpp",
@@ -31,7 +31,7 @@
31
31
  "src"
32
32
  ],
33
33
  "devDependencies": {
34
- "tsdown": "0.17.1"
34
+ "tsdown": "0.17.2"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "tsdown": "0.17"
package/src/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import path from 'node:path';
2
2
 
3
- import { defineConfig } from 'tsdown';
4
3
  import type { UserConfig } from 'tsdown';
5
4
 
6
5
  export function createTsdownConfig(overrides: UserConfig = {}): UserConfig {
@@ -11,7 +10,7 @@ export function createTsdownConfig(overrides: UserConfig = {}): UserConfig {
11
10
  : overrides.ignoreWatch ? [overrides.ignoreWatch]
12
11
  : [];
13
12
 
14
- return defineConfig({
13
+ return {
15
14
  cwd,
16
15
 
17
16
  target: 'node24',
@@ -31,6 +30,7 @@ export function createTsdownConfig(overrides: UserConfig = {}): UserConfig {
31
30
  ...overrides,
32
31
 
33
32
  ignoreWatch: [
33
+ /\/\.git\//u,
34
34
  /\/\.turbo\//u,
35
35
  /\/coverage\//u,
36
36
  /\/dist\//u,
@@ -39,5 +39,5 @@ export function createTsdownConfig(overrides: UserConfig = {}): UserConfig {
39
39
  /\/tmp\//u,
40
40
  ...ignoreWatch,
41
41
  ],
42
- });
42
+ };
43
43
  }