@lssm/tool.tsdown 0.12.1 → 1.41.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.
Files changed (2) hide show
  1. package/index.js +9 -69
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -1,5 +1,12 @@
1
1
  import { defineConfig } from 'tsdown';
2
2
 
3
+ export const withDevExports = {
4
+ exports: {
5
+ all: true,
6
+ devExports: true,
7
+ },
8
+ };
9
+
3
10
  const obfuscation = defineConfig({
4
11
  minify: {
5
12
  compress: {
@@ -20,18 +27,14 @@ const obfuscation = defineConfig({
20
27
  export const base = defineConfig({
21
28
  exports: {
22
29
  all: true,
23
- devExports: false,
30
+ devExports: true,
24
31
  },
25
32
  clean: true,
26
33
  sourcemap: false,
27
34
  format: ['esm'],
28
- // format: ['esm', 'cjs'],
29
- // format: ['esm'],
30
35
  target: 'esnext',
31
- // Let packages add their own externals; keep common ones minimal.
32
- external: [],
33
36
 
34
- dts: true,
37
+ dts: false,
35
38
  // bundle: false,
36
39
  unbundle: true,
37
40
  splitting: false,
@@ -46,64 +49,9 @@ export const base = defineConfig({
46
49
  ],
47
50
  });
48
51
 
49
- const sharedExternal = [
50
- 'next',
51
- 'next/headers',
52
- 'next/navigation',
53
- 'next/link',
54
- 'react',
55
- 'react-dom',
56
- 'react-native',
57
- 'server-only',
58
- '@lssm/lib.ui-kit-web',
59
- '@lssm/lib.ui-kit',
60
- '@lssm/lib.ui-kit/*',
61
- '@lssm/lib.ui-kit-web/*',
62
- '@lssm/lib.ui-kit-web/ui/*',
63
- 'lucide-react',
64
- 'lucide-react-native',
65
- 'react-native',
66
- 'react-native-safe-area-context',
67
- 'expo',
68
- 'expo-router',
69
- '@prisma/client',
70
- '@prisma/client/runtime/client',
71
- '@prisma/client/runtime',
72
- '@prisma/adapter-pg',
73
- 'pg',
74
- 'graphql',
75
- 'elysia',
76
- 'posthog-node',
77
- 'posthog-js',
78
- 'posthog',
79
- 'posthog-browser',
80
- 'posthog-react',
81
- 'posthog-react-native',
82
- 'jotai',
83
- 'jotai-tanstack-query',
84
- '@tanstack/query-core',
85
- '@tanstack/react-query',
86
- '@tanstack/react-query-devtools',
87
- '@sentry/nextjs',
88
- 'react-map-gl',
89
- 'react-map-gl/maplibre',
90
- 'maplibre-gl',
91
- 'node:buffer',
92
- 'node:timers/promises',
93
- 'node:crypto',
94
- 'node:assert',
95
- 'node:url',
96
- '@google-cloud/secret-manager',
97
- '@google-cloud/storage',
98
- '@google-cloud/pubsub',
99
- 'googleapis',
100
- 'postmark',
101
- ];
102
-
103
52
  export const reactLibrary = defineConfig({
104
53
  ...base,
105
54
  format: ['esm'],
106
- external: [...sharedExternal],
107
55
  minify: false,
108
56
  platform: 'browser',
109
57
  });
@@ -111,13 +59,7 @@ export const reactLibrary = defineConfig({
111
59
  export const moduleLibrary = defineConfig({
112
60
  ...base,
113
61
  format: ['esm'],
114
- external: [...sharedExternal],
115
62
  platform: 'neutral',
116
- exports: {
117
- all: true,
118
- devExports: false,
119
- },
120
- skipNodeModulesBundle: true,
121
63
  ...obfuscation,
122
64
  });
123
65
 
@@ -126,7 +68,6 @@ export const nodeLib = defineConfig({
126
68
  format: ['esm'],
127
69
  // format: ['esm', 'cjs'],
128
70
  platform: 'node',
129
- external: [...sharedExternal],
130
71
  ...obfuscation,
131
72
  });
132
73
 
@@ -136,7 +77,6 @@ export const nodeDatabaseLib = defineConfig({
136
77
  platform: 'node',
137
78
  // platform: 'neutral',
138
79
  unbundle: true,
139
- external: [...sharedExternal],
140
80
  // ...obfuscation,
141
81
  entry: ['src/index.ts', 'src/client.ts', 'src/enums.ts', 'src/models.ts'],
142
82
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lssm/tool.tsdown",
3
- "version": "0.12.1",
3
+ "version": "1.41.0",
4
4
  "type": "module",
5
5
  "description": "Shared tsdown config presets for LSSM monorepo",
6
6
  "exports": {
@@ -11,7 +11,7 @@
11
11
  "README.md"
12
12
  ],
13
13
  "peerDependencies": {
14
- "tsdown": "^0.16.6"
14
+ "tsdown": "^0.17.4"
15
15
  },
16
16
  "publishConfig": {
17
17
  "access": "public"