@skillswaveca/nova-shared-libraries 4.29.1 → 5.0.0

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.
@@ -1,7 +1,13 @@
1
1
  version: 2
2
2
  updates:
3
3
  - package-ecosystem: pnpm
4
- directory: "/"
4
+ directories:
5
+ - "/"
6
+ - "/packages/drivers"
7
+ - "/packages/nova-utils"
8
+ - "/packages/nova-router"
9
+ - "/packages/nova-model"
10
+ - "/packages/nova-middleware"
5
11
  schedule:
6
12
  interval: daily
7
13
  time: '12:10'
@@ -10,7 +16,6 @@ updates:
10
16
  rebase-strategy: disabled
11
17
  ignore:
12
18
  - dependency-name: "chai" # Version 5 and above have conflicts with eslint/babel/eslint-parser
13
- - package-ecosystem: pnpm
14
19
  groups:
15
20
  # Group name, this will be used in pull request titles and branch names
16
21
  all-dependencies:
@@ -15,7 +15,7 @@ jobs:
15
15
  run: git config --global url."https://github.com".insteadOf git://github.com
16
16
  - uses: actions/setup-node@v4
17
17
  with:
18
- node-version: 20
18
+ node-version: 22
19
19
  cache: 'pnpm'
20
20
 
21
21
  - name: Install deps
@@ -23,7 +23,7 @@ jobs:
23
23
  - name: Set up Node.js
24
24
  uses: actions/setup-node@v4
25
25
  with:
26
- node-version: 20
26
+ node-version: 22
27
27
  cache: 'pnpm'
28
28
  registry-url: 'https://registry.npmjs.org/'
29
29
 
package/README.md CHANGED
@@ -8,7 +8,7 @@ This repository contains a collection of shared libraries used across the Nova e
8
8
  ## Usage
9
9
  This package is published to npm. You can include it in your project by adding
10
10
  ```json
11
- "@skillswaveca/nova-shared-libraries": "^4.28.0",
11
+ "@skillswaveca/nova-shared-libraries": "^5.0.0",
12
12
  ```
13
13
  to your projects `package.json` or by running `npm install @skillswaveca/nova-shared-libraries`
14
14
 
@@ -34,6 +34,14 @@ While it is not necessary to generate docs yourself as the CI will do it for you
34
34
  pnpm run aggregate-docs
35
35
  ```
36
36
 
37
+ To view the generated documentation locally, run:
38
+
39
+ ```bash
40
+ pnpm run docs
41
+ ```
42
+
43
+ This will build the docs and start a local server (using sirv) at `http://localhost:8080` (or next available port).
44
+
37
45
  ## Testing
38
46
  You can run all tests by running
39
47
  ```bash
@@ -56,10 +64,13 @@ The basic steps are:
56
64
 
57
65
  ## Adding a library to the repository
58
66
  This repository contains a helper script for creating new libraries. You can run the following command to create a new library:
67
+
59
68
  ```bash
60
69
  pnpm run create-library
61
70
  ```
71
+
62
72
  After running the create-library script, you will be prompted to enter the name of the library you want to create and the description. The script will then create a new directory with the name you provided and will initialize a new package inside it.
73
+
63
74
  ```bash
64
75
  > nova-shared-libraries@1.0.0 create-library
65
76
  > node ./scripts/create-library.js
@@ -67,3 +78,79 @@ After running the create-library script, you will be prompted to enter the name
67
78
  Enter the package name: nova-model
68
79
  Enter the package description: A library for defining models in the nova ecosystem
69
80
  ```
81
+
82
+ ## Release Process
83
+
84
+ This repository uses [semantic-release](https://github.com/semantic-release/semantic-release) to automate versioning and releases. When you merge to `main`, the release workflow automatically:
85
+
86
+ - Analyzes commit messages to determine the version bump
87
+ - Generates CHANGELOG.md
88
+ - Creates a GitHub release
89
+ - Publishes to npm
90
+
91
+ ### Commit Message Format
92
+
93
+ Use [Conventional Commits](https://www.conventionalcommits.org/) format to trigger the correct version bump:
94
+
95
+ #### Patch Release (x.x.X) - Bug Fixes
96
+
97
+ ```bash
98
+ git commit -m "fix: correct logging output format"
99
+ git commit -m "fix(drivers): handle null response from API"
100
+ ```
101
+
102
+ #### Minor Release (x.X.0) - New Features
103
+
104
+ ```bash
105
+ git commit -m "feat: add new authentication method"
106
+ git commit -m "feat(router): support custom middleware validation"
107
+ ```
108
+
109
+ #### Major Release (X.0.0) - Breaking Changes
110
+
111
+ Use `BREAKING CHANGE:` in the commit body or footer:
112
+
113
+ ```bash
114
+ git commit -m "feat!: update to ESLint 9
115
+
116
+ BREAKING CHANGE: Migrated to ESLint 9 flat config format.
117
+ Projects using this library will need to update their ESLint configuration."
118
+ ```
119
+
120
+ Or use the `!` suffix on the type:
121
+
122
+ ```bash
123
+ git commit -m "feat!: remove deprecated API methods"
124
+ git commit -m "refactor!: change logger interface"
125
+ ```
126
+
127
+ #### Other Commit Types (No Release)
128
+
129
+ These don't trigger a release:
130
+
131
+ ```bash
132
+ git commit -m "chore: update dependencies"
133
+ git commit -m "docs: fix typo in README"
134
+ git commit -m "style: format code"
135
+ git commit -m "test: add unit tests for driver"
136
+ git commit -m "refactor: simplify config logic"
137
+ git commit -m "ci: update GitHub Actions workflow"
138
+ ```
139
+
140
+ ### Skipping CI/Release
141
+
142
+ To skip the release workflow entirely:
143
+
144
+ ```bash
145
+ git commit -m "chore: update dev dependencies [skip ci]"
146
+ ```
147
+
148
+ ### Manual Release
149
+
150
+ If you need to create a release manually:
151
+
152
+ 1. Update version in all `package.json` files
153
+ 2. Update CHANGELOG.md
154
+ 3. Commit with `[skip ci]`
155
+ 4. Create [GitHub release](https://github.com/SkillsWave/nova-shared-libraries/releases/new)
156
+ 5. Publish to npm: `pnpm -r publish --access public`
@@ -1,31 +1,31 @@
1
1
  export const packageInfo = [
2
2
  {
3
3
  "name": "@skillswaveca/nova-utils",
4
- "version": "4.29.0",
4
+ "version": "5.0.0",
5
5
  "description": "A collection of random utils used in nova repos",
6
6
  "docsPath": "./nova-utils/index.html"
7
7
  },
8
8
  {
9
9
  "name": "@skillswaveca/nova-router",
10
- "version": "4.29.0",
10
+ "version": "5.0.0",
11
11
  "description": "An extended Koa router that enables better validation",
12
12
  "docsPath": "./nova-router/index.html"
13
13
  },
14
14
  {
15
15
  "name": "@skillswaveca/nova-model",
16
- "version": "4.29.0",
16
+ "version": "5.0.0",
17
17
  "description": "Nova model stuff",
18
18
  "docsPath": "./nova-model/index.html"
19
19
  },
20
20
  {
21
21
  "name": "@skillswaveca/nova-middleware",
22
- "version": "4.29.0",
22
+ "version": "5.0.0",
23
23
  "description": "A collection of middleware used by nova projects",
24
24
  "docsPath": "./nova-middleware/index.html"
25
25
  },
26
26
  {
27
27
  "name": "@skillswaveca/nova-drivers",
28
- "version": "4.29.0",
28
+ "version": "5.0.0",
29
29
  "description": "Some helper drivers for AWS services",
30
30
  "docsPath": "./drivers/index.html"
31
31
  }
@@ -0,0 +1,59 @@
1
+ import { nodeConfig } from 'eslint-config-brightspace';
2
+ import importPlugin from 'eslint-plugin-import';
3
+ import globals from 'globals';
4
+
5
+ export default [
6
+ // Ignore patterns (replaces .eslintignore)
7
+ {
8
+ ignores: ['docs/**', 'node_modules/**', 'coverage/**'],
9
+ },
10
+
11
+ // Extend brightspace node config
12
+ ...nodeConfig,
13
+
14
+ // Custom rules and overrides
15
+ {
16
+ files: ['**/*.js'],
17
+ plugins: {
18
+ import: importPlugin,
19
+ },
20
+ languageOptions: {
21
+ ecmaVersion: 2020,
22
+ sourceType: 'module',
23
+ globals: {
24
+ ...globals.node,
25
+ ...globals.es2020,
26
+ },
27
+ },
28
+ rules: {
29
+ 'no-await-in-loop': 'error',
30
+ // Override brightspace's tab-based indentation with spaces
31
+ 'indent': ['error', 2, { SwitchCase: 1 }],
32
+ '@stylistic/indent': ['error', 2, { SwitchCase: 1 }],
33
+ 'comma-dangle': [
34
+ 'error',
35
+ {
36
+ arrays: 'always-multiline',
37
+ exports: 'never',
38
+ functions: 'never',
39
+ imports: 'never',
40
+ objects: 'always-multiline',
41
+ },
42
+ ],
43
+ 'import/extensions': ['error', 'ignorePackages'],
44
+ },
45
+ },
46
+
47
+ // Test files specific overrides
48
+ {
49
+ files: ['**/*.test.js'],
50
+ languageOptions: {
51
+ globals: {
52
+ ...globals.mocha,
53
+ },
54
+ },
55
+ rules: {
56
+ 'import/no-extraneous-dependencies': 'off',
57
+ },
58
+ },
59
+ ];
package/package.json CHANGED
@@ -3,62 +3,63 @@
3
3
  "name": "@skillswaveca/nova-shared-libraries",
4
4
  "description": "A monorepo of shared libraries for Nova projects.",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "license": "MIT",
9
9
  "keywords": [],
10
10
  "author": "SkillsWave",
11
11
  "dependencies": {
12
- "@aws-sdk/client-lambda": "3.873.0",
13
- "@aws-sdk/client-dynamodb": "^3.682.0",
14
- "@aws-sdk/client-secrets-manager": "^3.682.0",
15
- "@aws-sdk/client-sqs": "^3.682.0",
16
- "@aws-sdk/client-ssm": "^3.682.0",
17
- "@aws-sdk/lib-dynamodb": "^3.682.0",
18
- "@hubspot/api-client": "^13.0.0",
19
- "@koa/router": "^13.1.0",
20
- "aws-xray-sdk-core": "^3.6.0",
12
+ "@aws-sdk/client-dynamodb": "^3.930.0",
13
+ "@aws-sdk/client-lambda": "^3.930.0",
14
+ "@aws-sdk/client-secrets-manager": "^3.930.0",
15
+ "@aws-sdk/client-sqs": "^3.930.0",
16
+ "@aws-sdk/client-ssm": "^3.930.0",
17
+ "@aws-sdk/lib-dynamodb": "^3.930.0",
18
+ "@hubspot/api-client": "^13.4.0",
19
+ "@koa/router": "^14.0.0",
20
+ "aws-xray-sdk-core": "^3.11.0",
21
21
  "jsonwebtoken": "^9.0.2",
22
- "jwk-to-pem": "^2.0.5",
23
- "lit": "^3.1.3",
22
+ "jwk-to-pem": "^2.0.7",
23
+ "lit": "^3.3.1",
24
24
  "lodash.chunk": "^4.2.0",
25
25
  "node-fetch": "^3.3.2",
26
- "pino": "^9.1.0",
27
- "simple-oauth2": "^5.0.0",
28
- "uuid": "^9.0.1",
29
- "yn": "^5.0.0",
30
- "yup": "^1.4.0"
26
+ "pino": "^10.1.0",
27
+ "simple-oauth2": "^5.1.0",
28
+ "uuid": "^13.0.0",
29
+ "yn": "^5.1.0",
30
+ "yup": "^1.7.1"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@alpha-lambda/eslint-config": "^2.0.0",
34
- "@babel/eslint-parser": "^7.24.5",
35
- "@brightspace-ui/core": "^2.189.0",
34
+ "@babel/eslint-parser": "^7.28.5",
35
+ "@brightspace-ui/core": "^3.176.6",
36
36
  "@open-wc/rollup-plugin-html": "^1.2.5",
37
- "@rollup/plugin-node-resolve": "^15.2.3",
37
+ "@rollup/plugin-node-resolve": "^16.0.3",
38
38
  "@semantic-release/changelog": "^6.0.3",
39
- "@semantic-release/commit-analyzer": "^12.0.0",
39
+ "@semantic-release/commit-analyzer": "^13.0.1",
40
40
  "@semantic-release/git": "^10.0.1",
41
- "@semantic-release/npm": "^12.0.1",
42
- "@semantic-release/release-notes-generator": "^13.0.0",
43
- "@typescript-eslint/parser": "^7.9.0",
41
+ "@semantic-release/npm": "^13.1.1",
42
+ "@semantic-release/release-notes-generator": "^14.1.0",
43
+ "@typescript-eslint/parser": "^8.46.4",
44
44
  "chai": "^4.4.1",
45
45
  "documentation": "^14.0.3",
46
- "eslint": "^8.57.0",
47
- "eslint-config-brightspace": "^1.1.1",
48
- "eslint-plugin-jsdoc": "^48.2.5",
49
- "eslint-plugin-mocha": "^10.4.3",
50
- "glob": "^10.3.15",
51
- "live-server": "^1.2.2",
52
- "mocha": "^10.4.0",
53
- "rollup": "^4.17.2",
54
- "semantic-release": "^23.1.1",
55
- "sinon": "^17.0.2",
56
- "sinon-chai": "^3.7.0",
57
- "stylelint": "^16.5.0"
46
+ "eslint": "^9.39.1",
47
+ "eslint-config-brightspace": "^2.11.0",
48
+ "eslint-plugin-jsdoc": "^61.2.0",
49
+ "eslint-plugin-mocha": "^11.2.0",
50
+ "glob": "^11.0.3",
51
+ "globals": "^16.5.0",
52
+ "mocha": "^11.7.5",
53
+ "rollup": "^4.53.2",
54
+ "semantic-release": "^25.0.2",
55
+ "sinon": "^21.0.0",
56
+ "sinon-chai": "^4.0.1",
57
+ "sirv-cli": "^3.0.1",
58
+ "stylelint": "^16.25.0"
58
59
  },
59
60
  "scripts": {
60
61
  "release": "pnpm run bump-version && pnpm run create-index",
61
- "docs": "pnpm run aggregate-docs && npx live-server docs/drivers",
62
+ "docs": "pnpm run aggregate-docs && npx sirv docs/drivers --dev --single",
62
63
  "bump-version": "node scripts/bump-version.js",
63
64
  "create-index": "node scripts/create-index.js",
64
65
  "create-library": "node ./scripts/create-library.js",
@@ -3,7 +3,7 @@
3
3
  "name": "@skillswaveca/nova-drivers",
4
4
  "description": "Some helper drivers for AWS services",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "pre-release": "pnpm run create-index",
@@ -14,23 +14,23 @@
14
14
  "author": "SkillsWave",
15
15
  "license": "UNLICENSED",
16
16
  "devDependencies": {
17
- "chai": "^5.1.0",
18
- "eslint": "^9.0.0",
19
- "mocha": "^10.4.0",
17
+ "chai": "^4.4.1",
18
+ "eslint": "^9.39.1",
19
+ "mocha": "^11.7.5",
20
20
  "sinon": "^21.0.0",
21
- "sinon-chai": "^4.0.0"
21
+ "sinon-chai": "^4.0.1"
22
22
  },
23
23
  "dependencies": {
24
- "@aws-sdk/client-lambda": "3.873.0",
25
- "@aws-sdk/client-dynamodb": "^3.572.0",
26
- "@aws-sdk/client-secrets-manager": "^3.572.0",
27
- "@aws-sdk/client-sqs": "^3.572.0",
28
- "@aws-sdk/lib-dynamodb": "^3.572.0",
29
- "@hubspot/api-client": "^13.0.0",
30
- "aws-xray-sdk-core": "^3.6.0",
24
+ "@aws-sdk/client-lambda": "^3.930.0",
25
+ "@aws-sdk/client-dynamodb": "^3.930.0",
26
+ "@aws-sdk/client-secrets-manager": "^3.930.0",
27
+ "@aws-sdk/client-sqs": "^3.930.0",
28
+ "@aws-sdk/lib-dynamodb": "^3.930.0",
29
+ "@hubspot/api-client": "^13.4.0",
30
+ "aws-xray-sdk-core": "^3.11.0",
31
31
  "lodash.chunk": "^4.2.0",
32
- "node-fetch": "^3.1.0",
33
- "pino": "^9.0.0",
34
- "simple-oauth2": "^5.0.0"
32
+ "node-fetch": "^3.3.2",
33
+ "pino": "^10.1.0",
34
+ "simple-oauth2": "^5.1.0"
35
35
  }
36
36
  }
@@ -3,7 +3,7 @@
3
3
  "name": "@skillswaveca/nova-middleware",
4
4
  "description": "A collection of middleware used by nova projects",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "pre-release": "pnpm run create-index",
@@ -16,6 +16,6 @@
16
16
  "devDependencies": {},
17
17
  "dependencies": {
18
18
  "jsonwebtoken": "^9.0.2",
19
- "jwk-to-pem": "^2.0.5"
19
+ "jwk-to-pem": "^2.0.7"
20
20
  }
21
21
  }
@@ -3,7 +3,7 @@
3
3
  "name": "@skillswaveca/nova-model",
4
4
  "description": "Nova model stuff",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "pre-release": "pnpm run create-index",
@@ -3,7 +3,7 @@
3
3
  "name": "@skillswaveca/nova-router",
4
4
  "description": "An extended Koa router that enables better validation",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "pre-release": "pnpm run create-index",
@@ -3,7 +3,7 @@
3
3
  "name": "@skillswaveca/nova-utils",
4
4
  "description": "A collection of random utils used in nova repos",
5
5
  "repository": "https://github.com/SkillsWave/nova-shared-libraries",
6
- "version": "4.29.1",
6
+ "version": "5.0.0",
7
7
  "main": "index.js",
8
8
  "scripts": {
9
9
  "pre-release": "pnpm run create-index",
@@ -15,6 +15,6 @@
15
15
  "license": "UNLICENSED",
16
16
  "devDependencies": {},
17
17
  "dependencies": {
18
- "yup": "^1.4.0"
18
+ "yup": "^1.7.1"
19
19
  }
20
20
  }
package/.eslintignore DELETED
@@ -1 +0,0 @@
1
- docs/