ywana-core8 0.1.98 β†’ 0.1.100

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/src/setupTests.js DELETED
@@ -1,38 +0,0 @@
1
- // Setup file for tests
2
- import '@testing-library/jest-dom'
3
-
4
- // Mock window.matchMedia
5
- Object.defineProperty(window, 'matchMedia', {
6
- writable: true,
7
- value: vi.fn().mockImplementation(query => ({
8
- matches: false,
9
- media: query,
10
- onchange: null,
11
- addListener: vi.fn(), // deprecated
12
- removeListener: vi.fn(), // deprecated
13
- addEventListener: vi.fn(),
14
- removeEventListener: vi.fn(),
15
- dispatchEvent: vi.fn(),
16
- })),
17
- })
18
-
19
- // Mock ResizeObserver
20
- global.ResizeObserver = vi.fn().mockImplementation(() => ({
21
- observe: vi.fn(),
22
- unobserve: vi.fn(),
23
- disconnect: vi.fn(),
24
- }))
25
-
26
- // Mock IntersectionObserver
27
- global.IntersectionObserver = vi.fn().mockImplementation(() => ({
28
- observe: vi.fn(),
29
- unobserve: vi.fn(),
30
- disconnect: vi.fn(),
31
- }))
32
-
33
- // Mock window.getComputedStyle
34
- Object.defineProperty(window, 'getComputedStyle', {
35
- value: () => ({
36
- getPropertyValue: () => '',
37
- }),
38
- })
package/test-publish.sh DELETED
@@ -1,159 +0,0 @@
1
- #!/bin/bash
2
-
3
- # πŸ§ͺ Script de Prueba para el Publisher
4
- # ====================================
5
- # Este script muestra cΓ³mo se ve el publisher sin hacer cambios reales
6
-
7
- # Colores para output
8
- RED='\033[0;31m'
9
- GREEN='\033[0;32m'
10
- YELLOW='\033[1;33m'
11
- BLUE='\033[0;34m'
12
- PURPLE='\033[0;35m'
13
- CYAN='\033[0;36m'
14
- NC='\033[0m' # No Color
15
-
16
- # FunciΓ³n para mostrar barras de progreso
17
- show_progress() {
18
- local duration=$1
19
- local message=$2
20
- local progress=0
21
- local bar_length=50
22
-
23
- echo -e "${CYAN}${message}${NC}"
24
-
25
- while [ $progress -le $duration ]; do
26
- local filled=$((progress * bar_length / duration))
27
- local empty=$((bar_length - filled))
28
-
29
- printf "\r${GREEN}["
30
- printf "%*s" $filled | tr ' ' '='
31
- printf "%*s" $empty | tr ' ' '-'
32
- printf "]${NC} %d%%" $((progress * 100 / duration))
33
-
34
- sleep 0.05
35
- progress=$((progress + 1))
36
- done
37
- echo ""
38
- }
39
-
40
- # FunciΓ³n para mostrar spinner
41
- show_spinner() {
42
- local duration=$1
43
- local message=$2
44
- local spin='⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏'
45
- local i=0
46
- local count=0
47
-
48
- echo -e "${CYAN}${message}${NC}"
49
- while [ $count -lt $duration ]; do
50
- i=$(( (i+1) %10 ))
51
- printf "\r${YELLOW}${spin:$i:1}${NC} Procesando..."
52
- sleep 0.1
53
- count=$((count + 1))
54
- done
55
- printf "\r${GREEN}βœ“${NC} Completado\n"
56
- }
57
-
58
- # FunciΓ³n para log con timestamp
59
- log() {
60
- local level=$1
61
- local message=$2
62
- local timestamp=$(date '+%H:%M:%S')
63
-
64
- case $level in
65
- "INFO") echo -e "${BLUE}[${timestamp}]${NC} ${message}" ;;
66
- "SUCCESS") echo -e "${GREEN}[${timestamp}] βœ“${NC} ${message}" ;;
67
- "WARNING") echo -e "${YELLOW}[${timestamp}] ⚠${NC} ${message}" ;;
68
- "ERROR") echo -e "${RED}[${timestamp}] βœ—${NC} ${message}" ;;
69
- esac
70
- }
71
-
72
- # Banner inicial
73
- echo -e "${PURPLE}"
74
- echo "╔══════════════════════════════════════════════════════════════╗"
75
- echo "β•‘ πŸ§ͺ DEMO PUBLISHER β•‘"
76
- echo "β•‘ (Modo de Prueba - Sin Cambios) β•‘"
77
- echo "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•"
78
- echo -e "${NC}"
79
-
80
- COMMIT_MESSAGE="Demo: MigraciΓ³n completa a Vite con mejoras de rendimiento"
81
- log "INFO" "Mensaje de commit: ${COMMIT_MESSAGE}"
82
-
83
- echo ""
84
- log "INFO" "Iniciando pipeline de publicaciΓ³n (DEMO)..."
85
-
86
- # PASO 1: Verificaciones Previas
87
- echo -e "\n${PURPLE}πŸ“‹ PASO 1: Verificaciones Previas${NC}"
88
- log "INFO" "Rama actual: main"
89
- log "SUCCESS" "Working directory limpio"
90
- log "SUCCESS" "ConexiΓ³n a internet OK"
91
- log "SUCCESS" "Verificaciones previas completadas"
92
-
93
- # PASO 2: Tests
94
- echo -e "\n${PURPLE}πŸ§ͺ PASO 2: Ejecutando Tests${NC}"
95
- log "INFO" "Ejecutando suite de tests..."
96
- show_spinner 25 "Ejecutando tests"
97
- log "SUCCESS" "Todos los tests pasaron (19 suites, 348 tests)"
98
-
99
- # PASO 3: Build
100
- echo -e "\n${PURPLE}πŸ”¨ PASO 3: Building Proyecto${NC}"
101
- log "SUCCESS" "Build anterior eliminado"
102
- log "INFO" "Iniciando build con Vite..."
103
- show_spinner 15 "Compilando con Vite"
104
- log "SUCCESS" "Build completado en 1.37s"
105
-
106
- echo -e "${CYAN}πŸ“¦ Archivos generados:${NC}"
107
- echo -e " index.css (1.4M)"
108
- echo -e " index.js (1.6M)"
109
- echo -e " index.modern.js (1.6M)"
110
- echo -e " index.umd.js (1.7M)"
111
-
112
- # PASO 4: VersiΓ³n
113
- echo -e "\n${PURPLE}πŸ“ˆ PASO 4: Incrementando VersiΓ³n${NC}"
114
- CURRENT_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.1.95")
115
- NEW_VERSION="0.1.96"
116
- log "INFO" "VersiΓ³n actual: v${CURRENT_VERSION}"
117
- log "SUCCESS" "Nueva versiΓ³n: v${NEW_VERSION}"
118
-
119
- # PASO 5: Git
120
- echo -e "\n${PURPLE}πŸ“€ PASO 5: Git Commit y Push${NC}"
121
- log "INFO" "AΓ±adiendo archivos al staging..."
122
- show_progress 20 "Preparando commit..."
123
- FULL_COMMIT_MESSAGE="v${NEW_VERSION}: ${COMMIT_MESSAGE}"
124
- log "INFO" "Creando commit: ${FULL_COMMIT_MESSAGE}"
125
- log "SUCCESS" "Commit creado (DEMO - no real)"
126
- log "SUCCESS" "Tag v${NEW_VERSION} creado (DEMO - no real)"
127
- show_spinner 20 "Subiendo cambios a GitHub"
128
- log "SUCCESS" "Push completado exitosamente (DEMO - no real)"
129
-
130
- # PASO 6: NPM
131
- echo -e "\n${PURPLE}πŸ“¦ PASO 6: Publicando a NPM${NC}"
132
- log "INFO" "Usuario NPM: demo-user"
133
- show_spinner 30 "Publicando a NPM Registry"
134
- log "SUCCESS" "Paquete publicado exitosamente (DEMO - no real)"
135
-
136
- # RESUMEN FINAL
137
- echo -e "\n${GREEN}"
138
- echo "╔══════════════════════════════════════════════════════════════╗"
139
- echo "β•‘ πŸŽ‰ DEMO COMPLETADO β•‘"
140
- echo "β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•"
141
- echo -e "${NC}"
142
-
143
- echo -e "${CYAN}πŸ“Š Resumen de la publicaciΓ³n (DEMO):${NC}"
144
- echo -e " ${GREEN}βœ“${NC} VersiΓ³n: v${CURRENT_VERSION} β†’ v${NEW_VERSION}"
145
- echo -e " ${GREEN}βœ“${NC} Commit: ${FULL_COMMIT_MESSAGE}"
146
- echo -e " ${GREEN}βœ“${NC} Rama: main"
147
- echo -e " ${GREEN}βœ“${NC} Usuario NPM: demo-user"
148
- echo -e " ${GREEN}βœ“${NC} Build time: 1.37s"
149
-
150
- echo -e "\n${CYAN}πŸ”— Enlaces ΓΊtiles:${NC}"
151
- echo -e " πŸ“¦ NPM: https://www.npmjs.com/package/ywana-core8"
152
- echo -e " πŸ™ GitHub: https://github.com/ywana/ywana-core8"
153
- echo -e " πŸ“‹ Tag: https://github.com/ywana/ywana-core8/releases/tag/v${NEW_VERSION}"
154
-
155
- echo -e "\n${CYAN}πŸ“₯ Para instalar la nueva versiΓ³n:${NC}"
156
- echo -e " ${YELLOW}npm install ywana-core8@${NEW_VERSION}${NC}"
157
-
158
- echo -e "\n${GREEN}πŸš€ Β‘Demo completado exitosamente!${NC}"
159
- echo -e "${PURPLE}Para usar el publisher real, ejecuta: ./publish.sh${NC}\n"
package/vite.config.js DELETED
@@ -1,86 +0,0 @@
1
- import { defineConfig } from 'vite'
2
- import react from '@vitejs/plugin-react'
3
- import { resolve } from 'path'
4
-
5
- export default defineConfig({
6
- plugins: [
7
- react({
8
- // Usar React.createElement como microbundle
9
- jsxRuntime: 'classic',
10
- // Incluir archivos .js que contengan JSX
11
- include: /\.(jsx|js|ts|tsx)$/
12
- })
13
- ],
14
-
15
- build: {
16
- lib: {
17
- entry: resolve(__dirname, 'src/index.js'),
18
- name: 'YwanaCore8',
19
- formats: ['es', 'cjs', 'umd'],
20
- fileName: (format) => {
21
- switch (format) {
22
- case 'es':
23
- return 'index.modern.js'
24
- case 'cjs':
25
- return 'index.js'
26
- case 'umd':
27
- return 'index.umd.js'
28
- default:
29
- return `index.${format}.js`
30
- }
31
- }
32
- },
33
-
34
- rollupOptions: {
35
- // Externalizar peer dependencies
36
- external: ['react', 'react-dom'],
37
- output: {
38
- globals: {
39
- react: 'React',
40
- 'react-dom': 'ReactDOM'
41
- },
42
- // Configurar nombres de archivos CSS
43
- assetFileNames: (assetInfo) => {
44
- if (assetInfo.name && assetInfo.name.endsWith('.css')) {
45
- return 'index.css'
46
- }
47
- return assetInfo.name
48
- }
49
- }
50
- },
51
-
52
- // No comprimir como microbundle --no-compress
53
- minify: false,
54
-
55
- // Generar sourcemaps
56
- sourcemap: true
57
- },
58
-
59
- // ConfiguraciΓ³n para desarrollo
60
- server: {
61
- port: 3000,
62
- open: false
63
- },
64
-
65
- // Configurar esbuild para JSX en archivos .js
66
- esbuild: {
67
- loader: 'jsx',
68
- include: /src\/.*\.js$/,
69
- exclude: []
70
- },
71
-
72
- // Resolver alias si es necesario
73
- resolve: {
74
- alias: {
75
- '@': resolve(__dirname, 'src')
76
- }
77
- },
78
-
79
- // ConfiguraciΓ³n para testing con Vitest
80
- test: {
81
- environment: 'jsdom',
82
- setupFiles: ['./src/setupTests.js'],
83
- globals: true,
84
- css: true
85
- }
86
- })
package/vitest.config.js DELETED
@@ -1,42 +0,0 @@
1
- import { defineConfig } from 'vitest/config'
2
- import react from '@vitejs/plugin-react'
3
- import { resolve } from 'path'
4
-
5
- export default defineConfig({
6
- plugins: [
7
- react({
8
- jsxRuntime: 'classic'
9
- })
10
- ],
11
-
12
- test: {
13
- environment: 'jsdom',
14
- setupFiles: ['./src/setupTests.js'],
15
- globals: true,
16
- css: true,
17
-
18
- // ConfiguraciΓ³n similar a Jest
19
- include: [
20
- 'src/**/__tests__/**/*.(js|jsx)',
21
- 'src/**/?(*.)(spec|test).(js|jsx)'
22
- ],
23
-
24
- coverage: {
25
- include: [
26
- 'src/**/*.(js|jsx)'
27
- ],
28
- exclude: [
29
- 'src/index.js',
30
- 'src/setupTests.js',
31
- 'src/**/*.test.(js|jsx)',
32
- 'src/**/*.spec.(js|jsx)'
33
- ]
34
- }
35
- },
36
-
37
- resolve: {
38
- alias: {
39
- '@': resolve(__dirname, 'src')
40
- }
41
- }
42
- })