fastypest 1.4.107 → 1.4.108

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/README.es.md ADDED
@@ -0,0 +1,68 @@
1
+ <h1 align="center">FASTYPEST</h1>
2
+ <p align="center">
3
+ <img alt="Actividad de commits" src="https://img.shields.io/github/commit-activity/m/juanjoGonDev/fastypest"/>
4
+ <img alt="Último commit" src="https://img.shields.io/github/last-commit/juanjoGonDev/fastypest"/>
5
+ <a href="https://www.npmjs.com/fastypest" target="_blank"><img alt="Versión en GitHub" src="https://img.shields.io/github/package-json/v/juanjoGonDev/fastypest?logo=github&logoColor=fff&label=GitHub+package"></a>
6
+ <a href="https://www.npmjs.com/fastypest" target="_blank"><img alt="Versión en npm" src="https://img.shields.io/npm/v/fastypest?logo=npm&logoColor=fff&label=Paquete+NPM"></a>
7
+ <a href="https://www.npmjs.com/fastypest" target="_blank"><img alt="Versión peer typeorm" src="https://img.shields.io/github/package-json/dependency-version/juanjoGonDev/fastypest/peer/typeorm"></a>
8
+ <a href="https://www.npmjs.com/fastypest" target="_blank"><img src="https://img.shields.io/github/license/juanjoGonDev/fastypest" alt="Licencia del paquete" /></a>
9
+ <a href="https://www.npmjs.com/fastypest" target="_blank"><img src="https://img.shields.io/npm/dm/fastypest" alt="Descargas mensuales" /></a>
10
+ </p>
11
+ <p align="center">
12
+ <a href="https://buymeacoffee.com/juanjogondev" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Invítame a un café"></a>
13
+ </p>
14
+
15
+ [![en](https://img.shields.io/badge/lang-en-blue.svg)](./README.md)
16
+
17
+ Con esta librería puedes ejecutar tus tests sin tener que parar y restaurar la base de datos entre ellos.
18
+
19
+ Actualmente compatible con:
20
+
21
+ - <a href="https://www.npmjs.com/fastypest"><img alt="MySQL >= v5.7 supported" src="https://img.shields.io/badge/MySQL-%3E%3D5.7-informational"></a>
22
+ - <a href="https://www.npmjs.com/fastypest"><img alt="MariaDB >= v10.0 supported" src="https://img.shields.io/badge/MariaDB-%3E%3D10.0-yellowgreen"></a>
23
+ - <a href="https://www.npmjs.com/fastypest"><img alt="Postgres >= v9.0 supported" src="https://img.shields.io/badge/Postgres-%3E%3D9.0-green"></a>
24
+ - <a href="https://www.npmjs.com/fastypest"><img alt="cockroachDB >= v22.2.0 supported" src="https://img.shields.io/badge/CockroachDB-%3E%3D22.2.0-blue"></a>
25
+
26
+ Si necesitas soporte para otra base de datos, puedes solicitarlo [aquí](https://github.com/juanjoGonDev/fastypest/issues/new?assignees=juanjoGonDev&labels=enhancement&template=feature.yml).
27
+
28
+ Instalación:
29
+
30
+ ```
31
+ npm i -D fastypest
32
+ ```
33
+
34
+ Para usarlo, debes insertar todos los seeds antes de iniciar los tests, y antes de iniciar los tests, debes inicializarlo indicando la configuración de la conexión de typeorm. Debes ejecutar restoreData después de cada test, para que la base de datos se devuelva a su estado inicial.
35
+
36
+ Ejemplo de uso con Jest:
37
+
38
+ > **Nota**
39
+ > (Recomiendo usarlo en [setupFilesAfterEnv](https://jestjs.io/es-ES/docs/configuration#setupfilesafterenv-array)):
40
+
41
+ ```typescript
42
+ beforeAll(async () => {
43
+ fastypest = new Fastypest(connection);
44
+ await fastypest.init();
45
+ });
46
+
47
+ afterEach(async () => {
48
+ await fastypest.restoreData();
49
+ });
50
+ ```
51
+
52
+ ## ⚙️ Flujo de trabajo automatizado
53
+
54
+ Este proyecto usa un sistema CI/CD avanzado con GitHub Actions:
55
+
56
+ - 🤖 Los PR de Dependabot se aprueban automáticamente solo si son actualizaciones seguras (patch/minor o dependencias de desarrollo)
57
+ - 🔁 Se lanza una nueva versión automáticamente cada 3 commits usando un contador
58
+ - 📦 Cuando toca publicar, se crea un pull request automáticamente con el cambio de versión
59
+ - 👤 El PR se asigna al mantenedor y se aprueba automáticamente (si se cumplen las condiciones)
60
+ - ✅ Todos los tests deben pasar antes de hacer merge
61
+ - 🚀 Al fusionarse, la nueva versión se publica automáticamente en NPM
62
+ - 🧪 Antes de publicar, se realiza una prueba de instalación completa para asegurar la integridad del paquete
63
+
64
+ Este sistema garantiza entregas fiables, frecuentes y sin fricción, manteniendo siempre el control sobre los cambios críticos
65
+
66
+ ## Historial de Estrellas
67
+
68
+ [![Star History Chart](https://api.star-history.com/svg?repos=juanjoGonDev/fastypest&type=Date)](https://www.star-history.com/#juanjoGonDev/fastypest&Date)
package/README.md CHANGED
@@ -10,9 +10,11 @@
10
10
  <a href="https://www.npmjs.com/fastypest" target="_blank"><img src="https://img.shields.io/npm/dm/fastypest" alt="NPM Downloads" /></a>
11
11
  </p>
12
12
  <p align=center>
13
- <a href="https://buymeacoffee.com/juanjogondev" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
13
+ <a href="https://buymeacoffee.com/juanjogondev" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee"></a>
14
14
  </p>
15
15
 
16
+ [![es](https://img.shields.io/badge/lang-es-yellow.svg)](./README.es.md)
17
+
16
18
  With this library, you can run your test suites without having to stop and restore the database in between them.
17
19
 
18
20
  Currently compatible with:
@@ -48,6 +50,20 @@ afterEach(async () => {
48
50
  });
49
51
  ```
50
52
 
53
+ ## ⚙️ Automated Workflow
54
+
55
+ This project leverages a sophisticated CI/CD setup using GitHub Actions:
56
+
57
+ - 🤖 Dependabot PRs are auto-approved **only for safe updates** (patch/minor or dev-only major updates)
58
+ - 🔁 A new release is triggered automatically every 3 commits using a commit counter system
59
+ - 📦 When it's time to release, a pull request is automatically created to bump the version
60
+ - 👤 The release PR is assigned to the maintainer and auto-approved (if conditions are met)
61
+ - ✅ All checks must pass before the PR is merged
62
+ - 🚀 After merge, the new version is automatically published to NPM
63
+ - 🧪 Before publishing, a full build and installation test is executed to ensure package integrity
64
+
65
+ This automation ensures high-quality, low-friction delivery while keeping full control over critical updates.
66
+
51
67
  ## Star History
52
68
 
53
69
  [![Star History Chart](https://api.star-history.com/svg?repos=juanjoGonDev/fastypest&type=Date)](https://www.star-history.com/#juanjoGonDev/fastypest&Date)
package/SECURITY.md ADDED
@@ -0,0 +1,27 @@
1
+ # 🔐 Security Policy
2
+
3
+ ## 📦 Supported Versions
4
+
5
+ This project is currently in early development. Only the latest version is eligible for security updates.
6
+
7
+ | Version | Supported |
8
+ | ------- | --------- |
9
+ | Latest | ✅ Yes |
10
+ | Others | ❌ No |
11
+
12
+ ## 🛡️ Reporting a Vulnerability
13
+
14
+ Please **do not open public issues** for security vulnerabilities.
15
+
16
+ Instead, report them **privately** so we can address them responsibly:
17
+
18
+ - 📧 Email: fastypest-security.stem832@slmail.me
19
+ - ⏱ Response time: usually within **72 hours**
20
+
21
+ Include:
22
+
23
+ - A clear description
24
+ - Steps to reproduce (if possible)
25
+ - Impact and potential fixes
26
+
27
+ We will confirm receipt, investigate, and work on a resolution. You’ll be credited in the changelog unless you prefer otherwise.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastypest",
3
- "version": "1.4.107",
3
+ "version": "1.4.108",
4
4
  "description": "Restores the database automatically after each test. Allows serial execution of tests without having to delete and restore the database having to stop the application",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -50,21 +50,21 @@
50
50
  },
51
51
  "homepage": "https://github.com/juanjoGonDev/fastypest#readme",
52
52
  "devDependencies": {
53
- "@eslint/js": "^9.27.0",
53
+ "@eslint/js": "^9.28.0",
54
54
  "@swc-node/jest": "^1.8.13",
55
55
  "@swc/cli": "^0.7.7",
56
56
  "@swc/core": "^1.11.29",
57
57
  "@swc/helpers": "^0.5.17",
58
58
  "@types/jest": "^29.5.14",
59
- "@types/node": "^22.15.24",
59
+ "@types/node": "^22.15.29",
60
60
  "@typescript-eslint/eslint-plugin": "^8.33.0",
61
61
  "@typescript-eslint/parser": "^8.33.0",
62
62
  "cpy-cli": "^5.0.0",
63
- "eslint": "^9.27.0",
63
+ "eslint": "^9.28.0",
64
64
  "eslint-config-standard-with-typescript": "^43.0.1",
65
65
  "eslint-plugin-import": "^2.31.0",
66
66
  "eslint-plugin-n": "^17.18.0",
67
- "eslint-plugin-prettier": "^5.4.0",
67
+ "eslint-plugin-prettier": "^5.4.1",
68
68
  "eslint-plugin-promise": "^7.2.1",
69
69
  "execa": "^9.6.0",
70
70
  "globals": "^16.2.0",