Skip to content

Commit 005801b

Browse files
github-actions[bot]renovate[bot]pixelasticHaroenv
authored
fix: update dependencies (typescript, jest, eslint) (#1075)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Tim Carry <[email protected]> Co-authored-by: Haroen Viaene <[email protected]>
1 parent 927db82 commit 005801b

21 files changed

+7590
-6343
lines changed

.eslintrc

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

.eslintrc.js

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/* eslint-disable import/no-commonjs */
2+
3+
/**
4+
* @type {import('eslint').Linter.Config}
5+
*/
6+
const config = {
7+
extends: ['algolia', 'algolia/jest'],
8+
rules: {
9+
'no-continue': 'off',
10+
'valid-jsdoc': 'off',
11+
'require-await': 'off',
12+
},
13+
overrides: [
14+
{
15+
files: ['**/*.ts'],
16+
extends: ['algolia/typescript'],
17+
parser: '@typescript-eslint/parser',
18+
parserOptions: {
19+
sourceType: 'module',
20+
project: './tsconfig.json',
21+
},
22+
rules: {
23+
'consistent-return': 'off',
24+
'no-dupe-class-members': 'off',
25+
'import/extensions': [
26+
'error',
27+
{
28+
ignorePackages: true,
29+
pattern: {
30+
js: 'always',
31+
ts: 'never',
32+
},
33+
},
34+
],
35+
},
36+
},
37+
],
38+
};
39+
40+
module.exports = config;

elastic-apm-node.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable import/no-commonjs, @typescript-eslint/no-var-requires */
1+
/* eslint-disable import/no-commonjs */
22
module.exports = {
33
active: true,
44
serviceName: 'jsdelivr-npm-search',

jest.config.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
// eslint-disable-next-line import/no-commonjs
22
module.exports = {
33
transform: {
4-
'^.+\\.[jt]sx?$': 'ts-jest',
4+
'^.+\\.[jt]sx?$': [
5+
'ts-jest',
6+
{
7+
diagnostics: false,
8+
tsconfig: `tsconfig.json`,
9+
},
10+
],
511
},
612
testMatch: ['<rootDir>/src/**/*.test.[jt]s'],
713
// By default, ignore the slow and flaky tests testing external APIs. Those
814
// will be run specifically with `yarn run test:api-control`
915
testPathIgnorePatterns: ['api-control'],
10-
globals: {
11-
'ts-jest': {
12-
diagnostics: false,
13-
tsconfig: `tsconfig.json`,
14-
},
15-
},
1616

1717
testEnvironment: 'node',
1818
modulePaths: ['src'],
19+
20+
snapshotFormat: {
21+
escapeString: true,
22+
printBasicPrototype: true,
23+
},
1924
};

package.json

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,47 +42,47 @@
4242
"nano": "^10.1.2",
4343
"nice-package": "3.1.2",
4444
"numeral": "2.0.6",
45-
"object-sizeof": "1.6.3",
45+
"object-sizeof": "2.6.3",
4646
"p-queue": "6.6.2",
4747
"promise-rat-race": "1.5.1",
4848
"throttled-queue": "^2.1.4",
49-
"traverse": "0.6.6",
49+
"traverse": "0.6.7",
5050
"truncate-utf8-bytes": "1.0.2"
5151
},
5252
"devDependencies": {
53-
"@semantic-release/changelog": "6.0.1",
53+
"@semantic-release/changelog": "6.0.3",
5454
"@semantic-release/git": "10.0.1",
55-
"@types/escape-html": "1.0.2",
56-
"@types/hosted-git-info": "3.0.2",
57-
"@types/jest": "28.1.7",
55+
"@types/escape-html": "1.0.3",
56+
"@types/hosted-git-info": "3.0.4",
57+
"@types/jest": "28.1.8",
5858
"@types/lodash": "4.14.184",
59-
"@types/ms": "0.7.31",
59+
"@types/ms": "0.7.33",
6060
"@types/numeral": "2.0.2",
61-
"@types/traverse": "0.6.32",
61+
"@types/traverse": "0.6.34",
6262
"@types/truncate-utf8-bytes": "1.0.0",
63-
"@typescript-eslint/eslint-plugin": "5.33.1",
64-
"@typescript-eslint/parser": "5.33.1",
63+
"@typescript-eslint/eslint-plugin": "6.9.0",
64+
"@typescript-eslint/parser": "6.9.0",
6565
"dotenv": "16.0.1",
6666
"eslint": "8.22.0",
67-
"eslint-config-algolia": "20.0.0",
67+
"eslint-config-algolia": "22.0.0",
6868
"eslint-config-prettier": "8.5.0",
6969
"eslint-plugin-eslint-comments": "3.2.0",
7070
"eslint-plugin-import": "2.26.0",
7171
"eslint-plugin-jasmine": "4.1.3",
7272
"eslint-plugin-jest": "26.8.2",
73-
"eslint-plugin-jsdoc": "39.3.6",
74-
"eslint-plugin-prettier": "4.2.1",
73+
"eslint-plugin-jsdoc": "46.8.2",
74+
"eslint-plugin-prettier": "5.0.1",
7575
"eslint-plugin-react": "7.30.1",
7676
"husky": "8.0.1",
77-
"jest": "28.1.3",
77+
"jest": "29.7.0",
7878
"lint-staged": "13.0.3",
7979
"pre-commit": "1.2.2",
80-
"prettier": "2.7.1",
80+
"prettier": "3.0.3",
8181
"renovate-config-algolia": "2.1.10",
82-
"semantic-release": "19.0.3",
83-
"ts-jest": "28.0.8",
82+
"semantic-release": "22.0.5",
83+
"ts-jest": "29.1.1",
8484
"ts-node": "10.9.1",
85-
"typescript": "4.7.4",
85+
"typescript": "5.2.2",
8686
"validator": "13.7.0"
8787
},
8888
"engines": {

scripts/publish-check.js

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

scripts/publish-check.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
2+
/* eslint-disable no-console */
3+
/* eslint-disable no-process-exit */
4+
5+
import { Writable } from 'node:stream';
6+
7+
import semanticRelease from 'semantic-release';
8+
9+
console.log('Analyzing commits since last version...');
10+
11+
const stream = new Writable({
12+
write(_chunk, _encoding, callback) {
13+
setImmediate(callback);
14+
},
15+
});
16+
17+
// Execute semantic-release with only the commit-analyzer step, to see if
18+
// a new release is needed
19+
const { nextRelease } = await semanticRelease(
20+
{
21+
dryRun: true,
22+
plugins: ['@semantic-release/commit-analyzer'],
23+
verifyConditions: [],
24+
analyzeCommits: ['@semantic-release/commit-analyzer'],
25+
verifyRelease: [],
26+
generateNotes: [],
27+
prepare: [],
28+
publish: [],
29+
addChannel: [],
30+
success: [],
31+
fail: [],
32+
},
33+
// Redirect output to new streams, to make the script silent
34+
{
35+
stdout: stream,
36+
stderr: stream,
37+
}
38+
);
39+
40+
// Exit with 0 if a new version must be released, 1 if nothing to do
41+
if (nextRelease?.version) {
42+
console.log(
43+
`Commits analyzed warrant a release of version ${nextRelease.version}`
44+
);
45+
process.exit(0);
46+
}
47+
console.log('No new version to publish');
48+
process.exit(1);
49+
File renamed without changes.

0 commit comments

Comments
 (0)