Skip to content

Commit 68f9096

Browse files
authored
Merge pull request #81 from hmcts/upgrades
Fix typescript definitions
2 parents b2e6e5c + 0cd6642 commit 68f9096

28 files changed

+5903
-9693
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ jobs:
88
build:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v3
11+
- uses: actions/checkout@v4
1212
- uses: actions/setup-node@v4
1313
with:
14-
node-version: '12.x'
14+
node-version: '22.x'
1515
registry-url: https://registry.npmjs.org/
1616
- run: npm ci
1717
- run: npm publish --access public

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9-
- uses: actions/checkout@v3
9+
- uses: actions/checkout@v4
1010
- name: Use Node.js
1111
uses: actions/setup-node@v4
1212
with:
13-
node-version: '12.x'
13+
node-version: '22.x'
1414
- run: npm ci
1515
- run: npm run build --if-present
1616
- run: npm test

CHANGELOG.MD

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 1.1.0
4+
5+
### Fixes
6+
- Fix an issue with TypeScript definitions not exporting the default type correctly
7+
8+
### Changes
9+
- Update dependencies to their latest versions
10+
- Switch from jest to vitest
11+
312
## 1.0.0
413
**WARNING: This releases includes breaking change.
514
You will need to follow the [setup guide](https://hmcts.github.io/cookie-manager/google-analytics-and-dynatrace-setup/index.html)

eslint.config.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
import js from '@eslint/js';
2+
import tsPlugin from '@typescript-eslint/eslint-plugin';
3+
import tsParser from '@typescript-eslint/parser';
4+
5+
export default [
6+
js.configs.recommended,
7+
{
8+
ignores: ['dist/**', 'node_modules/**', 'coverage/**', '*.config.js', 'eslint.config.js'],
9+
},
10+
{
11+
files: ['**/*.ts', '**/*.js'],
12+
languageOptions: {
13+
parser: tsParser,
14+
ecmaVersion: 'latest',
15+
sourceType: 'module',
16+
globals: {
17+
console: 'readonly',
18+
process: 'readonly',
19+
Buffer: 'readonly',
20+
__dirname: 'readonly',
21+
__filename: 'readonly',
22+
exports: 'writable',
23+
module: 'writable',
24+
require: 'readonly',
25+
global: 'readonly',
26+
window: 'readonly',
27+
document: 'readonly',
28+
navigator: 'readonly',
29+
location: 'readonly',
30+
HTMLElement: 'readonly',
31+
Element: 'readonly',
32+
Node: 'readonly',
33+
NodeList: 'readonly',
34+
Event: 'readonly',
35+
CustomEvent: 'readonly',
36+
MutationObserver: 'readonly',
37+
localStorage: 'readonly',
38+
sessionStorage: 'readonly'
39+
}
40+
},
41+
plugins: {
42+
'@typescript-eslint': tsPlugin
43+
},
44+
rules: {
45+
...tsPlugin.configs.recommended.rules,
46+
'indent': ['error', 4],
47+
'semi': ['error', 'always'],
48+
'no-trailing-spaces': ['error', { skipBlankLines: true }],
49+
'no-useless-constructor': 'off',
50+
'@typescript-eslint/no-useless-constructor': ['error'],
51+
'no-undef': 'off', // TypeScript handles this
52+
'@typescript-eslint/no-explicit-any': 'off',
53+
'@typescript-eslint/no-unused-vars': ['error', {
54+
argsIgnorePattern: '^_',
55+
varsIgnorePattern: '^_'
56+
}]
57+
}
58+
},
59+
{
60+
files: ['**/*.test.ts', '**/*.spec.ts'],
61+
languageOptions: {
62+
globals: {
63+
vi: 'readonly',
64+
describe: 'readonly',
65+
it: 'readonly',
66+
expect: 'readonly',
67+
beforeEach: 'readonly',
68+
afterEach: 'readonly',
69+
beforeAll: 'readonly',
70+
afterAll: 'readonly',
71+
test: 'readonly'
72+
}
73+
}
74+
}
75+
];

jest.config.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)