@hiscovega/vundle 0.0.9 → 0.0.11

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 ADDED
@@ -0,0 +1,49 @@
1
+ # Changelog
2
+
3
+ ## [0.0.11](https://github.com/griddo/griddo-bundler/compare/v0.0.10...v0.0.11) (2025-09-24)
4
+
5
+ ## [0.0.10](https://github.com/griddo/griddo-bundler/compare/v0.0.9...v0.0.10) (2025-09-03)
6
+
7
+ ## [0.0.9](https://github.com/griddo/griddo-bundler/compare/v0.0.8...v0.0.9) (2025-09-03)
8
+
9
+
10
+ ### Bug Fixes
11
+
12
+ * use process.cwd() instead of __dirname to find client config and add better logging ([ee889de](https://github.com/griddo/griddo-bundler/commit/ee889deaeab374c581a2de83e8b0cfaca227a160))
13
+
14
+ ## [0.0.8](https://github.com/griddo/griddo-bundler/compare/v0.0.7...v0.0.8) (2025-09-03)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * use process.cwd() instead of __dirname for entry files to resolve correctly from client projects ([55c8d0b](https://github.com/griddo/griddo-bundler/commit/55c8d0b947d9f92dddef42963704427c7c86f6b9))
20
+
21
+ ## [0.0.7](https://github.com/griddo/griddo-bundler/compare/v0.0.6...v0.0.7) (2025-09-03)
22
+
23
+
24
+ ### Bug Fixes
25
+
26
+ * use .mjs extension for plugins import to match actual file extension ([7660df8](https://github.com/griddo/griddo-bundler/commit/7660df832922bdcb586c01493007e22984385854))
27
+
28
+ ## [0.0.6](https://github.com/griddo/griddo-bundler/compare/v0.0.5...v0.0.6) (2025-09-03)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * use explicit .js extension for plugins import to resolve correctly from client projects ([5c7ec02](https://github.com/griddo/griddo-bundler/commit/5c7ec0269eae522fbe1045654b2fb6c5595a0c3e))
34
+
35
+ ## 0.0.5 (2025-09-03)
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * allow CHANGELOG.md to be tracked for release-it ([fdb6f45](https://github.com/griddo/griddo-bundler/commit/fdb6f45a63ee2b5537291c83deeff73e2c025fbc))
41
+ * change releaseNotes from 'auto' to true in release-it config ([007aa2f](https://github.com/griddo/griddo-bundler/commit/007aa2fd45b9d58216b32ad998f73541409257da))
42
+ * remove unnecessary build hook from release-it config ([eda4deb](https://github.com/griddo/griddo-bundler/commit/eda4debab057f88f45a54353bff488dfbb2b7cf7))
43
+
44
+ ## 0.0.4 (2025-09-03)
45
+
46
+
47
+ ### Bug Fixes
48
+
49
+ * remove unnecessary build hook from release-it config ([eda4deb](https://github.com/griddo/griddo-bundler/commit/eda4debab057f88f45a54353bff488dfbb2b7cf7))
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # @griddo/bundler
1
+ # @griddo/vundler
2
2
 
3
- Master bundler configuration for Griddo Instance projects as an ESModules npm package.
3
+ Griddo vite bundler configuration for Griddo Instance projects.
4
4
 
5
5
  ## 📦 Installation
6
6
 
7
7
  ```bash
8
- npm install @griddo/bundler
8
+ npm install @hiscovega/vundle # at @hiscovega org for the beta testing
9
9
  ```
10
10
 
11
11
  ## 🚀 Publishing
@@ -14,237 +14,23 @@ npm install @griddo/bundler
14
14
 
15
15
  This package uses [release-it](https://github.com/release-it/release-it) for automated versioning and publishing.
16
16
 
17
- #### Prerequisites
18
-
19
- 1. **NPM Token**: Ensure you have an NPM token with publish permissions
20
- 2. **GitHub Token**: For automatic GitHub releases (optional)
21
- 3. **Clean working directory**: All changes should be committed
22
-
23
- #### Release Commands
24
-
25
- ```bash
26
- # Dry run (recommended first)
27
- npm run release:dry
28
-
29
- # Release patch version (1.0.0 -> 1.0.1)
30
- npm run release:patch
31
-
32
- # Release minor version (1.0.0 -> 1.1.0)
33
- npm run release:minor
34
-
35
- # Release major version (1.0.0 -> 2.0.0)
36
- npm run release:major
37
-
38
- # Interactive release (recommended)
39
- npm run release
40
- ```
41
-
42
- #### What happens during release:
43
-
44
- 1. ✅ **Pre-release checks**: Lint and format verification
45
- 2. 📝 **Version bump**: Automatic version increment
46
- 3. 📝 **Changelog generation**: Conventional commits to CHANGELOG.md
47
- 4. 🔖 **Git operations**: Commit, tag, and push
48
- 5. 📦 **NPM publish**: Publish to npm registry
49
- 6. 🐙 **GitHub release**: Create GitHub release (if configured)
50
-
51
- #### Conventional Commits
52
-
53
- Use conventional commit format for automatic changelog generation:
54
-
55
- ```bash
56
- feat: add new feature
57
- fix: bug fix
58
- docs: documentation update
59
- style: code style changes
60
- refactor: code refactoring
61
- test: add tests
62
- chore: maintenance tasks
63
- ```
64
-
65
17
  ## 🚀 Usage
66
18
 
67
- ### Configuración Automática (Recomendada)
68
-
69
- ```javascript
70
- // vite.config.js
71
- import { defineConfig } from "vite";
72
- import react from "@vitejs/plugin-react";
73
- import { plugins } from "@griddo/bundler/plugins";
74
-
75
- export default defineConfig({
76
- plugins: [react(), ...plugins],
77
- build: {
78
- // Tu configuración se mergeará automáticamente desde vite.config.mjs
79
- },
80
- });
81
- ```
82
-
83
19
  ### Client Configuration (vite.config.mjs)
84
20
 
85
- The bundler automatically looks for a `vite.config.mjs` file in your project root. Create this file to customize the build configuration.
86
-
87
- #### Quick Start Template
88
-
89
- Copy the `vite.config.mjs.example` file from this repository as a starting point:
90
-
91
- ```bash
92
- cp node_modules/@griddo/bundler/vite.config.mjs.example ./vite.config.mjs
93
- ```
94
-
95
- Or create it manually:
21
+ The bundler automatically looks for a `vite.config.mjs` file in a Griddo project root. Create this file to customize the build configuration.
96
22
 
97
23
  ```javascript
98
24
  // vite.config.mjs (in your project root)
99
25
  export default {
100
- build: {
101
- rollupOptions: {
102
- external: (id) => {
103
- // Custom external dependencies
104
- if (id === "your-heavy-dependency") return true;
105
- return false;
106
- },
107
- },
108
- },
109
26
  plugins: [
110
27
  // Additional Vite plugins for your project
111
28
  ],
29
+ griddoOptions: {
30
+ customExternals: [
31
+ "some-heavy-package-foo", // Mark as external by exact name
32
+ // /^@company\//, // Mark all packages from a scope as external
33
+ ],
34
+ }
112
35
  };
113
- ```
114
-
115
- ### Advanced Configuration
116
-
117
- ```javascript
118
- // If you need more complex configuration, you can also do:
119
- import { defineConfig } from 'vite';
120
- import { plugins } from "@griddo/bundler/plugins";
121
-
122
- // Your project's main vite.config.js
123
- export default defineConfig({
124
- plugins: [
125
- ...plugins,
126
- // Your additional plugins
127
- ],
128
- build: {
129
- // Your custom build config
130
- },
131
- });
132
- ```
133
-
134
- ### TypeScript Support
135
-
136
- ```typescript
137
- // vite.config.ts
138
- import { defineConfig } from "vite";
139
- import type { ClientConfig } from "@griddo/bundler/types";
140
- import { plugins } from "@griddo/bundler/plugins";
141
-
142
- const clientConfig: ClientConfig = {
143
- build: {
144
- rollupOptions: {
145
- external: (id) => id.startsWith("client-dependency"),
146
- },
147
- },
148
- };
149
-
150
- export default defineConfig({
151
- ...clientConfig,
152
- plugins: [...plugins],
153
- });
154
- ```
155
-
156
- ## 📁 Package Structure
157
-
158
- ```
159
- @griddo/bundler/
160
- ├── vite.config.ts # 📦 Main configuration file
161
- ├── plugins/
162
- │ ├── index.mjs # ESModule plugins
163
- │ └── index.d.ts # TypeScript definitions
164
- ├── types/
165
- │ └── client-config.d.ts # TypeScript types
166
- ├── package.json # 📦 Package definition
167
- └── README.md # 📖 Documentation
168
- ```
169
-
170
- ### Exports
171
-
172
- The package provides the following exports:
173
-
174
- - **Default config**: `import config from '@griddo/bundler'` - Configuración automática
175
- - **Vite config**: `import config from '@griddo/bundler/vite.config'`
176
- - **Plugins**: `import { plugins } from '@griddo/bundler/plugins'`
177
- - **Types**: `import type { ClientConfig } from '@griddo/bundler/types'`
178
-
179
- ## 🚀 Uso
180
-
181
- ### 1. "Instalar" el master bundler
182
-
183
- ```bash
184
- npm run install:master
185
- ```
186
-
187
- Esto crea un symlink desde `node_modules/@griddo/bundler/` hacia `external/config/`
188
-
189
- ### 2. Ejecutar el build
190
-
191
- ```bash
192
- npm run build
193
- ```
194
-
195
- El build ahora usa la configuración desde `node_modules/@griddo/bundler/vite.config.ts`
196
-
197
- ### 3. Limpiar la instalación simulada
198
-
199
- ```bash
200
- npm run uninstall:master
201
- ```
202
-
203
- ## 🔄 Flujo de trabajo
204
-
205
- 1. **Desarrollo**: Usa `npm run build:local` para trabajar con la config local
206
- 2. **Validación**: Usa `npm run install:master` + `npm run build` para validar el flujo simulado
207
- 3. **Producción**: Los clientes reales usarán `npm install @griddo/master-bundler`
208
-
209
- ## 📋 Comandos disponibles
210
-
211
- - `npm run install:master` - Instala el bundler simulado
212
- - `npm run uninstall:master` - Remueve la instalación simulada
213
- - `npm run build` - Build usando configuración simulada
214
- - `npm run build:local` - Build usando configuración local
215
-
216
- ## 🎯 Beneficios
217
-
218
- - ✅ **Simulación realista** del paquete NPM
219
- - ✅ **Sin cambios en el workflow** de desarrollo
220
- - ✅ **Validación completa** antes de publicar
221
- - ✅ **Transición suave** al paquete real
222
- - ✅ **Mantenimiento fácil** del código
223
-
224
- ## 🔧 Configuración del cliente
225
-
226
- Los clientes pueden mantener su `vite.config.ts` local con configuración específica:
227
-
228
- ```typescript
229
- // vite.config.ts del cliente
230
- import type { ClientConfig } from "@griddo/bundler/types";
231
-
232
- const config: ClientConfig = {
233
- plugins: [
234
- // Plugins específicos del cliente
235
- ],
236
- build: {
237
- rollupOptions: {
238
- external: (id) => {
239
- // Dependencias externas específicas
240
- if (id === "cliente-paquete-pesado") return true;
241
- return false;
242
- },
243
- },
244
- },
245
- };
246
-
247
- export default config;
248
- ```
249
-
250
- El master bundler combinará esta configuración con la suya propia.
36
+ ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hiscovega/vundle",
3
- "version": "0.0.9",
3
+ "version": "0.0.11",
4
4
  "description": "Master bundler configuration for Griddo Instance projects",
5
5
  "main": "vite.config.mjs",
6
6
  "module": "vite.config.mjs",
@@ -30,7 +30,8 @@
30
30
  "vite.config.mjs",
31
31
  "plugins/",
32
32
  "types/",
33
- "README.md"
33
+ "README.md",
34
+ "CHANGELOG.md"
34
35
  ],
35
36
  "scripts": {
36
37
  "remote:build": "vite build --config ./vite.config.mjs",
@@ -88,12 +89,12 @@
88
89
  "conventional-changelog"
89
90
  ],
90
91
  "author": "Griddo",
91
- "license": "MIT",
92
+ "license": "UNLICENSED",
92
93
  "engines": {
93
- "node": ">=18.0.0"
94
+ "node": ">=20.19"
94
95
  },
95
96
  "devDependencies": {
96
- "@biomejs/biome": "^2.2.2",
97
+ "@biomejs/biome": "2.2.4",
97
98
  "@release-it/conventional-changelog": "^10.0.1",
98
99
  "release-it": "^19.0.4"
99
100
  }
package/plugins/index.mjs CHANGED
@@ -1,21 +1,21 @@
1
1
  import react from "@vitejs/plugin-react";
2
- import dts from "vite-plugin-dts";
2
+ // import dts from "vite-plugin-dts";
3
3
 
4
4
  import { viteStaticCopy } from "vite-plugin-static-copy";
5
5
 
6
6
  export const plugins = [
7
7
  react(),
8
8
 
9
- dts({
10
- insertTypesEntry: true,
11
- include: ["src"],
12
- exclude: ["src/**/*.test.*", "src/**/*.spec.*", "src/builder/**/*.jsx"],
13
- entryRoot: "src",
14
- compilerOptions: {
15
- declaration: true,
16
- emitDeclarationOnly: false,
17
- },
18
- }),
9
+ // dts({
10
+ // insertTypesEntry: true,
11
+ // include: ["src"],
12
+ // exclude: ["src/**/*.test.*", "src/**/*.spec.*", "src/builder/**/*.jsx"],
13
+ // entryRoot: "src",
14
+ // compilerOptions: {
15
+ // declaration: true,
16
+ // emitDeclarationOnly: false,
17
+ // },
18
+ // }),
19
19
 
20
20
  viteStaticCopy({
21
21
  targets: [
package/vite.config.mjs CHANGED
@@ -1,16 +1,14 @@
1
1
  import { resolve } from "node:path";
2
2
  import { defineConfig, loadConfigFromFile, mergeConfig } from "vite";
3
-
4
3
  import { plugins as masterPlugins } from "./plugins/index.mjs";
5
4
 
6
5
  export default defineConfig(async ({ command, mode }) => {
7
6
  let clientConfig = {};
8
7
 
9
- // --- Lógica de Carga de Configuración del Cliente Mejorada ---
10
8
  // Usamos la función nativa de Vite para encontrar, cargar y transpilar
11
9
  // la configuración del cliente, soportando .ts, .js, .mjs, etc.
12
10
  try {
13
- console.log(`Buscando configuración del cliente en: ${process.cwd()}`);
11
+ console.log(`Looking for client configuration in: ${process.cwd()}`);
14
12
 
15
13
  const clientConfigResult = await loadConfigFromFile(
16
14
  { command, mode },
@@ -23,20 +21,18 @@ export default defineConfig(async ({ command, mode }) => {
23
21
 
24
22
  if (clientConfigResult) {
25
23
  clientConfig = clientConfigResult.config;
26
- console.log(`✅ Configuración del cliente cargada desde: ${clientConfigResult.path}`);
24
+ console.log(`Client configuration loaded from: ${clientConfigResult.path}`);
27
25
  } else {
28
- console.log("No se encontró configuración del cliente, usando configuración base del master.");
26
+ console.log("No client configuration found, using master base configuration.");
29
27
  }
30
28
  } catch (e) {
31
29
  // Si 'loadConfigFromFile' no encuentra el archivo, devuelve null en lugar de lanzar un error.
32
30
  // Este catch es para errores de sintaxis dentro del archivo de config del cliente u otros problemas.
33
- console.log(`❌ Error al cargar configuración del cliente: ${e.message}`);
34
- console.log("Usando configuración base del master.");
31
+ console.log(`Error loading client configuration: ${e.message}`);
32
+ console.log("Using master base configuration.");
35
33
  }
36
- // --- Fin de la Lógica de Carga ---
37
34
 
38
35
  // --- Configuración Base del Master ---
39
- // (El resto del archivo no cambia)
40
36
  const masterConfig = {
41
37
  logLevel: "warn",
42
38
  publicDir: "static",
@@ -48,6 +44,7 @@ export default defineConfig(async ({ command, mode }) => {
48
44
  entry: {
49
45
  index: resolve(process.cwd(), "src/index.tsx"),
50
46
  builder: resolve(process.cwd(), "src/builder.jsx"),
47
+ "griddo.config": resolve(process.cwd(), "src/griddo.config.ts"),
51
48
  },
52
49
  formats: ["es"],
53
50
  name: "GriddoInstance",
@@ -109,6 +106,5 @@ export default defineConfig(async ({ command, mode }) => {
109
106
  delete clientConfig.build.rollupOptions.external;
110
107
  }
111
108
 
112
- // Una única llamada a mergeConfig fusiona de forma inteligente ambas configuraciones.
113
109
  return mergeConfig(masterConfig, clientConfig);
114
110
  });