Skip to content

Commit

Permalink
fix(core): update dependencies to include Typescript 5.x and Node 20.x (
Browse files Browse the repository at this point in the history
#3)

* chore(core): 🔧 update dependencies and test
* chore(core): 🍱 update folders
* ci(ci): 💚 fix CI configuration for test
* chore(ci): 💚 try to fix ts-jest compilation problems
* chore(ci): 💚 try to fix ci issue with test
* chore(ci): 💚 try to fix ci problem
* ci(ci): 💚 fix ci tests
  • Loading branch information
cjimenezsaiz authored May 27, 2023
1 parent b0bc3f9 commit 7b97c9b
Show file tree
Hide file tree
Showing 42 changed files with 192 additions and 12,461 deletions.
2 changes: 1 addition & 1 deletion .config/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variables:
value: 'mdf-js-api'
## Node version
- name: nodeVersion
value: '18'
value: '20'
## Releases Wiki page
- name: artifactWikiFileName
value: '@mdf.js%2Djs-%2D-API'
Expand Down
38 changes: 19 additions & 19 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
# Resumen
# Summary

- [ ] Bug fix (arregla un fallo sin afectar a las funcionalidades actuales)
- [ ] Nueva funcionalidad (añade un funcionalidad sin afectar a las actuales)
- [ ] Cambio importante (añade o modifica una funcionalidad que afecta a las funcionalidades actuales)
- [ ] Bug fix (corrects a fault without impacting current features)
- [ ] New feature (adds a new functionality without affecting the existing ones)
- [ ] Major change (adds or modifies a feature that impacts existing functionalities)

_Describa el problema específico que se está solucionando, solo un resumen servirá si hay un enlace al elemento de trabajo que aborda este cambio._
Provide a description of the specific problem that is being solved. A summary would suffice if there is a link to the work item addressing this change.

## Que ha cambiado?
## What has changed?

_Resuma el cambio realizado, p.ej.: añadido nuevo template para npm, modificado nombre descriptivo de fase ..._
Summarize the change made, e.g., added new npm template, modified descriptive phase name ...

### Areas afectadas
### Affected Areas

_Especifique las áreas específicas que se han visto afectados por este cambio. p.ej. proceso de publicación de alarms, estrategia de calculo de datapoints ..._
Specify the particular areas that have been impacted by this change. e.g., alarm publication process, datapoint calculation strategy ...

### Areas no afectadas
### Unaffected Areas

_Enumere las áreas que normalmente se podría suponer que se han cambiado pero que no lo son en este caso. El objetivo es ahorrar tiempo al revisor y al evaluador._
List the areas that one might assume have been changed but have not been in this instance. The aim is to save time for the reviewer and evaluator.

### Checklist de autor antes de realizar la publicación
### Author's Checklist Before Publication

- [ ] He comprobado que la modificación funciona correctamente.
- [ ] La modificación sigue los [estándares](https://devopmytra.visualstudio.com/NetinSystems/_wiki/wikis/NetinSystems.wiki/1381/Netin-Systems-DevOps) marcados por el grupo de DevOps de Netin Systems.
- [ ] La modificaciones no incluyen claves, tokens o información confidencial en la pipeline.
- [ ] Se han realizado los test unitarios correspondientes para cubrir el nuevo código y/o eliminado los test que ya no son necesarios.
- [ ] I have verified that the modification works correctly.
- [ ] The modification adheres to the [standards](https://devopmytra.visualstudio.com/NetinSystems/_wiki/wikis/NetinSystems.wiki/1381/Netin-Systems-DevOps) set by the Netin Systems DevOps group.
- [ ] The modifications do not include keys, tokens, or confidential information in the pipeline.
- [ ] Corresponding unit tests have been conducted to cover the new code and/or the tests that are no longer necessary have been removed.

### Comprobación de la modificación
### Verification of Modification

_Describa las pruebas que ha realizado como parte de este cambio. Anótelo aquí para el revisor y el evaluador._
_Aporte el enlace a pipeline ejecutada de forma exitosa._
Describe the tests you have performed as part of this change. Note it here for the reviewer and the evaluator.
Provide the link to the successfully executed pipeline.
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.8.0
v20.2.0
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# **@mdf.js**

[![Node Version](https://img.shields.io/static/v1?style=flat&logo=node.js&logoColor=green&label=node&message=%3E=16%20||%2018&color=blue)](https://nodejs.org/en/)
[![Typescript Version](https://img.shields.io/static/v1?style=flat&logo=typescript&label=Typescript&message=4.8&color=blue)](https://www.typescriptlang.org/)
[![Node Version](https://img.shields.io/static/v1?style=flat&logo=node.js&logoColor=green&label=node&message=%3E=20&color=blue)](https://nodejs.org/en/)
[![Typescript Version](https://img.shields.io/static/v1?style=flat&logo=typescript&label=Typescript&message=5.0&color=blue)](https://www.typescriptlang.org/)
[![Known Vulnerabilities](https://img.shields.io/static/v1?style=flat&logo=snyk&label=Vulnerabilities&message=0&color=300A98F)](https://snyk.io/package/npm/snyk)
[![Build Status](https://devopmytra.visualstudio.com/MytraManagementSystem/_apis/build/status%2FMytra%20Development%20Framework%20-%20mds.js?branchName=master)](https://devopmytra.visualstudio.com/MytraManagementSystem/_build/latest?definitionId=429&branchName=master)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fmytracontrol%2Fmdf.js%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/mytracontrol/mdf.js/master)

<!-- markdownlint-disable MD033 MD041 -->
<p align="center">
Expand All @@ -13,7 +15,6 @@

<h1 style="text-align:center;margin-bottom:0">Mytra Development Framework - @mdf.js </h1>
<h5 style="text-align:center;margin-top:0">Typescript framework for core application development</h5>

<!-- markdownlint-enable MD033 -->

___
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,34 +29,34 @@
"@stryker-mutator/jest-runner": "^6.4.2",
"@stryker-mutator/typescript-checker": "^6.4.2",
"@types/jest": "29.5.1",
"@types/node": "18.11.17",
"@typescript-eslint/eslint-plugin": "5.59.5",
"@typescript-eslint/parser": "5.59.5",
"@types/node": "20.2.4",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"cross-env": "^7.0.3",
"dependency-cruiser": "^12.12.2",
"eslint": "~8.40.0",
"dependency-cruiser": "^13.0.2",
"eslint": "~8.41.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-tsdoc": "^0.2.17",
"glob": "^10.2.3",
"jest": "29.3.1",
"jest-environment-jsdom": "29.3.1",
"jest-html-reporter": "^3.7.0",
"jest-junit": "^14.0.1",
"glob": "^10.2.6",
"jest": "29.5.0",
"jest-environment-jsdom": "29.5.0",
"jest-html-reporter": "^3.10.0",
"jest-junit": "^16.0.0",
"jest-slow-test-reporter": "^1.0.0",
"lerna": "^6.6.2",
"license-checker": "^25.0.1",
"npm-check": "^6.0.1",
"prettier": "^2.8.8",
"rimraf": "^5.0.0",
"snyk": "^1.1155.0",
"snyk-to-html": "^2.3.4",
"rimraf": "^5.0.1",
"snyk": "^1.1167.0",
"snyk-to-html": "^2.3.7",
"sort-package-json": "^2.4.1",
"ts-jest": "29.0.3",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"turbo": "^1.9.4",
"turbo": "^1.9.9",
"typedoc": "0.24.7",
"typescript": "4"
"typescript": "5.0.4"
}
}
4 changes: 2 additions & 2 deletions packages/api/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
"express": "^4.18.2",
"joi": "^17.9.2",
"lodash": "^4.17.21",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@mdf.js/repo-config": "*",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.1"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/crash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"test": "jest --detectOpenHandles --config ./jest.config.js"
},
"dependencies": {
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/doorkeeper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"ajv-formats": "^2.1.1",
"ajv-keywords": "^5.1.0",
"jsonpointer": "^5.0.0",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/firehose/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"@mdf.js/metrics-registry": "*",
"@mdf.js/utils": "*",
"lodash": "^4.17.21",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@mdf.js/observability": "*",
"@mdf.js/repo-config": "*",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.1"
},
"engines": {
Expand Down
8 changes: 7 additions & 1 deletion packages/api/firehose/src/Engine/Engine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Health, Jobs } from '@mdf.js/core';
import { Crash, Multi } from '@mdf.js/crash';
import { DebugLogger, LoggerInstance, SetContext } from '@mdf.js/logger';
import { get, merge } from 'lodash';
import { Transform } from 'stream';
import { Readable, Transform } from 'stream';
import { v4 } from 'uuid';
import { EngineOptions } from '../types';

Expand All @@ -33,6 +33,12 @@ export declare interface Engine {
on(event: 'close', listener: () => void): this;
/** Emitted on every state change */
on(event: 'status', listener: (providerState: Health.Status) => void): this;
/** Emitted when the stream is finished */
on(event: 'finish', listener: () => void): this;
/** Emitted when the stream is piped with a readable stream */
on(event: 'pipe', listener: (source: Readable) => void): this;
/** Emitted when the stream is piped with a readable stream */
on(event: 'unpipe', listener: (source: Readable) => void): this;
}

export class Engine<
Expand Down
4 changes: 2 additions & 2 deletions packages/api/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
"debug": "^4.3.4",
"fluent-logger": "^3.4.1",
"joi": "^17.9.2",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0",
"winston": "^3.8.2"
},
"devDependencies": {
"@mdf.js/repo-config": "*",
"@types/debug": "^4.1.7",
"@types/debug": "^4.1.8",
"@types/uuid": "^9.0.1"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/middlewares/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"lodash": "^4.17.21",
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
Expand All @@ -56,7 +56,7 @@
"@types/express-rate-limit": "^6.0.0",
"@types/http-errors": "^2.0.1",
"@types/jsonwebtoken": "^9.0.2",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/morgan": "^1.9.4",
"@types/multer": "^1.4.7",
"@types/supertest": "^2.0.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/middlewares/src/bodyParser/bodyParser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ describe('#Middleware #bodyParser', () => {
.then(response => {
expect(response.body.code).toEqual('SyntaxError');
expect(response.body.title).toEqual('Bad Request');
expect(response.body.detail).toEqual('Unexpected token o in JSON at position 0');
expect(response.body.detail).toContain('Unexpected token');
})
.catch(error => {
throw error;
Expand Down
4 changes: 2 additions & 2 deletions packages/api/openc2-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
"@types/express": "^4.17.17",
"express": "^4.18.2",
"lodash": "^4.17.21",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@mdf.js/middlewares": "*",
"@mdf.js/repo-config": "*",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.1",
"supertest": "^6.3.2"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/api/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
"dependencies": {
"@mdf.js/crash": "*",
"lodash": "^4.17.21",
"tslib": "^2.5.0",
"tslib": "^2.5.2",
"uuid": "^9.0.0"
},
"devDependencies": {
"@mdf.js/repo-config": "*",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.1"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/components/app-wrapper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"devDependencies": {
"@mdf.js/repo-config": "*",
"@types/lodash": "^4.14.194",
"@types/lodash": "^4.14.195",
"@types/uuid": "^9.0.1"
},
"engines": {
Expand Down
1 change: 1 addition & 0 deletions packages/components/app-wrapper/src/AppWrapper.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ describe('#AppWrapper class', () => {
wrapper.register([new ResourceMock('twoResource'), new ResourceMock('threeResource')]);
const health = wrapper.observability.healthRegistry.health;
const checks = health.checks as Health.Checks;
//
expect(health).toEqual({
name: 'test',
description: 'test',
Expand Down
Loading

0 comments on commit 7b97c9b

Please sign in to comment.