Skip to content

Commit

Permalink
#23: Upgrade dependencies (#24)
Browse files Browse the repository at this point in the history
This also enables test coverage and Sonar scanner for the build.

Co-authored-by: Torsten Kilias <[email protected]>
  • Loading branch information
kaklakariada and tkilias authored Sep 4, 2023
1 parent 3ed16c6 commit 70c737c
Show file tree
Hide file tree
Showing 16 changed files with 1,891 additions and 7,444 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,18 @@ jobs:
fail-fast: true
matrix:
target: ['lint:ci', 'test:dom', 'test:node', 'itest:dom', 'itest:node', 'build']
env:
DEFAULT_TARGET: 'test:node'
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: 'npm'
- run: npm ci
- run: npm run ${{ matrix.target }}
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: ${{ matrix.target == env.DEFAULT_TARGET }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
5 changes: 3 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [14, 16, 18]
node: ['16', '18', '20']
name: Node ${{ matrix.node }} integration test
steps:
- uses: actions/checkout@v3
- name: Setup node
- name: Setup node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- run: npm ci
- run: npm run itest:dom
4 changes: 2 additions & 2 deletions .github/workflows/project-keeper-verify.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .github/workflows/project-keeper.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,5 @@ pom.xml.versionsBackup
*.orig
*.old
*.md.html
*.flattened-pom.xml
*.flattened-pom.xml
/.scannerwork/
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
"editor.formatOnSave": true,
"[typescript]": {
"editor.tabSize": 2
},
"[json]": {
"editor.tabSize": 2
}
}
2 changes: 1 addition & 1 deletion dependencies.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions doc/changes/changelog.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 41 additions & 0 deletions doc/changes/changes_0.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Exasol Driver ts 0.1.2, released 2023-09-04

Code name: Upgrade Dependencies on Top of 0.1.1

## Summary

This release fixes vulnerability CVE-2023-26136 in dependency `tough-cookie`.

## Features

* #23: Upgraded dependencies to fix vulnerabilities

## Dependency Updates

### Compile Dependency Updates

* Updated `jsrsasign:^10.6.1` to `^10.8.6`

### Development Dependency Updates

* Updated `eslint-plugin-n:^15.6.1` to `^16.0.2`
* Updated `testcontainers:^9.1.3` to `9.1.3`
* Updated `eslint-config-prettier:^8.6.0` to `^9.0.0`
* Updated `jest-environment-jsdom:^29.4.3` to `^29.6.4`
* Updated `@types/ws:^8.5.4` to `^8.5.5`
* Updated `@rollup/plugin-typescript:^11.0.0` to `^11.1.3`
* Updated `@typescript-eslint/eslint-plugin:^5.53.0` to `^6.5.0`
* Updated `jest:^29.4.3` to `^29.6.4`
* Updated `prettier:^2.8.4` to `^3.0.2`
* Updated `rollup:^3.17.2` to `^3.28.1`
* Updated `eslint:^8.34.0` to `^8.48.0`
* Updated `@typescript-eslint/parser:^5.53.0` to `^6.5.0`
* Updated `eslint-config-standard-with-typescript:^34.0.0` to `^39.0.0`
* Updated `ts-jest:^29.0.5` to `^29.1.1`
* Updated `eslint-plugin-import:^2.27.5` to `^2.28.1`
* Updated `@types/jest:^29.4.0` to `^29.5.4`
* Updated `@types/jsrsasign:^10.5.5` to `^10.5.8`
* Updated `eslint-plugin-jest:^27.2.1` to `^27.2.3`
* Updated `typescript:^4.9.5` to `^5.2.2`
* Updated `ws:^8.12.1` to `^8.13.0`
* Updated `tslib:^2.5.0` to `^2.6.2`
22 changes: 11 additions & 11 deletions doc/developer_guide/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ npm run lint:ci // No autofix enabled
### Unit tests

```bash
npm run test // Runs both test in parallel
npm run test:dom
npm run test:node
npm run test # Runs both test in parallel
npm run test:dom
npm run test:node
```

### Integration tests

```bash
npm run itest // Runs both test in parallel
npm run itest:dom
npm run itest:node
npm run itest # Runs both test in parallel
npm run itest:dom
npm run itest:node
```

#### MacOS
Expand All @@ -38,17 +38,17 @@ export DOCKER_HOST=unix:///Users/$(whoami)/Library/Containers/com.docker.docker/

### Testing your changes locally before publishing

You can use `npm install <directory of this project>` to install the driver locally in your other node test projects.
Don't forget to (re)build the driver using `npm run build` to see your changes reflected.
You can use `npm install <directory of this project>` to install the driver locally in your other node test projects.
Don't forget to (re)build the driver using `npm run build` to see your changes reflected.
In case of unexplainable errors in your tests it might help to remove the entire `/dist` folder before rebuilding.

### Release Process

- Run release droid + project-keeper to create a github release draft as you usually would.
- Upon publishing the draft release on github the release workflow for npm will be triggered.
- Run project-keeper and release-droid to create a GitHub release draft as you usually would.
- Upon publishing the draft release on github the release workflow for npm will be triggered.

#### More info on the release workflow.

- The npm token is kept in a secret, then set as an environment variable in the release.yml workflow.
- The npm token is kept in a secret, then set as an environment variable in the `release.yml` workflow.
- The added `.npmrc` file contains a setting that enables reading out this environment variable while publishing.
- For a scoped release you need to explicitly specify that you wish to release a public release using `publish --access public`.
4 changes: 2 additions & 2 deletions integration-test/testcases/basic.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { GenericContainer, StartedTestContainer, Wait } from 'testcontainers';
import { RandomUuid } from 'testcontainers/dist/uuid';
import { ExasolDriver, websocketFactory } from '../../src/lib/sql-client';
import { RandomUuid } from 'testcontainers/dist/uuid';

export const basicTests = (name: string, factory: websocketFactory) =>
describe(name, () => {
Expand All @@ -11,7 +11,7 @@ export const basicTests = (name: string, factory: websocketFactory) =>
let schemaName = '';

beforeAll(async () => {
container = await new GenericContainer('exasol/docker-db:7.1.21')
container = await new GenericContainer('exasol/docker-db:7.1.22')
.withExposedPorts(8563, 2580)
.withPrivilegedMode()
.withDefaultLogDriver()
Expand Down
2 changes: 1 addition & 1 deletion jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ const config: Config = {
transformIgnorePatterns: ['node_modules/(?!.*.mjs$)'],
preset: './jest.preset.js',
moduleFileExtensions: ['ts', 'js', 'html'],
coverageDirectory: './coverage/exasol-driver',
coverageDirectory: './coverage',
};

export default config;
Loading

0 comments on commit 70c737c

Please sign in to comment.