Skip to content

Commit 6fdd1f5

Browse files
authored
Upgrade dependencies (#2224)
* Common types for web hooks * Upgraded dexie deps * Upgraded deps on libs * All libs deduped across all packages * Downgraded QUnit and fixed so that tests works again in "dexie" package. * Pinned qunit version across all packages in the repo * Fixed import assert to import with * Fix compile issues in dexie-cloud-addon after upgrading deps * Fix CI tests for dexie-react-hooks
1 parent 5610fa2 commit 6fdd1f5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3162
-3830
lines changed

addons/Dexie.Observable/package.json

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
],
5656
"dexie-observable": [
5757
"# Build UMD module",
58-
"tsc --allowJs -t es5 -m es2015 --outDir tools/tmp/es5/src/ --sourceMap src/Dexie.Observable.js [--watch 'Compilation complete.']",
59-
"rollup -c tools/build-configs/rollup.config.js",
58+
"tsc --allowJs -t es5 -m es2015 --outDir tools/tmp/es5/src/ --sourceMap --skipLibCheck src/Dexie.Observable.js [--watch 'Compilation complete.']",
59+
"rollup -c tools/build-configs/rollup.config.mjs",
6060
"node tools/replaceVersionAndDate.js dist/dexie-observable.js",
6161
"# eslint ",
6262
"eslint src --cache"
@@ -72,8 +72,8 @@
7272
],
7373
"test": [
7474
"# Build the unit tests (integration tests need no build)",
75-
"tsc --allowJs --moduleResolution node --lib es2018,dom -t es5 -m es2015 --outDir tools/tmp/es5/test --rootDir ../.. --sourceMap test/unit/unit-tests-all.js [--watch 'Compilation complete.']",
76-
"rollup -c tools/build-configs/rollup.tests.config.js"
75+
"tsc --allowJs --moduleResolution node --lib es2018,dom -t es5 -m es2015 --outDir tools/tmp/es5/test --rootDir ../.. --sourceMap --skipLibCheck test/unit/unit-tests-all.js [--watch 'Compilation complete.']",
76+
"rollup -c tools/build-configs/rollup.tests.config.mjs"
7777
],
7878
"test-typings": [
7979
"tsc -p test/typings/"
@@ -88,8 +88,10 @@
8888
"dexie": "workspace:^",
8989
"eslint": "^7.27.0",
9090
"just-build": "^0.9.24",
91-
"qunit": "^2.9.2",
91+
"qunit": "2.10.0",
92+
"qunitjs": "1.23.1",
9293
"typescript": "^5.3.3",
93-
"uglify-js": "^3.5.6"
94+
"uglify-js": "^3.5.6",
95+
"undici-types": "^6.21.0"
9496
}
9597
}

addons/Dexie.Observable/tools/build-configs/rollup.config.js renamed to addons/Dexie.Observable/tools/build-configs/rollup.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import sourcemaps from 'rollup-plugin-sourcemaps';
22
import {readFileSync} from 'fs';
33
import path from 'path';
4+
import { fileURLToPath } from 'url';
45

5-
const version = require(path.resolve(__dirname, '../../package.json')).version;
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const packageJson = JSON.parse(readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8'));
9+
const version = packageJson.version;
610

711
export default {
812
input: 'tools/tmp/es5/src/Dexie.Observable.js',

addons/Dexie.Observable/tools/build-configs/rollup.tests.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sourcemaps from 'rollup-plugin-sourcemaps';
2-
import commonjs from 'rollup-plugin-commonjs';
3-
import nodeResolve from 'rollup-plugin-node-resolve';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
44

55
const ERRORS_TO_IGNORE = [
66
"THIS_IS_UNDEFINED"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import sourcemaps from 'rollup-plugin-sourcemaps';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
4+
5+
const ERRORS_TO_IGNORE = [
6+
"THIS_IS_UNDEFINED"
7+
];
8+
9+
export default {
10+
input: 'tools/tmp/es5/test/addons/Dexie.Observable/test/unit/unit-tests-all.js',
11+
output: {
12+
file: 'test/unit/bundle.js',
13+
format: 'umd',
14+
globals: {dexie: "Dexie", "dexie-observable": "Dexie.Observable", QUnit: "QUnit"},
15+
sourcemap: true,
16+
name: 'dexieTests'
17+
},
18+
external: ['dexie', 'dexie-observable', 'QUnit'],
19+
plugins: [
20+
sourcemaps(),
21+
nodeResolve({browser: true}),
22+
commonjs()
23+
],
24+
onwarn ({loc, frame, code, message}) {
25+
if (ERRORS_TO_IGNORE.includes(code)) return;
26+
if ( loc ) {
27+
console.warn( `${loc.file} (${loc.line}:${loc.column}) ${message}` );
28+
if ( frame ) console.warn( frame );
29+
} else {
30+
console.warn(`${code} ${message}`);
31+
}
32+
}
33+
};

addons/Dexie.Observable/tools/build-configs/rollup.tests.unit.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sourcemaps from 'rollup-plugin-sourcemaps';
2-
import commonjs from 'rollup-plugin-commonjs';
3-
import nodeResolve from 'rollup-plugin-node-resolve';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
44

55
const ERRORS_TO_IGNORE = [
66
"THIS_IS_UNDEFINED"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import sourcemaps from 'rollup-plugin-sourcemaps';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
4+
5+
const ERRORS_TO_IGNORE = [
6+
"THIS_IS_UNDEFINED"
7+
];
8+
9+
export default {
10+
input: 'tools/tmp/es5/test/addons/Dexie.Observable/test/unit/unit-tests-all.js',
11+
output: {
12+
file: 'test/unit/bundle.js',
13+
format: 'umd',
14+
globals: {dexie: "Dexie", "dexie-observable": "Dexie.Observable", QUnit: "QUnit"},
15+
sourcemap: true,
16+
name: 'dexieTests'
17+
},
18+
external: ['dexie', 'dexie-observable', 'QUnit'],
19+
plugins: [
20+
sourcemaps(),
21+
nodeResolve({browser: true}),
22+
commonjs()
23+
],
24+
onwarn ({loc, frame, code, message}) {
25+
if (ERRORS_TO_IGNORE.includes(code)) return;
26+
if ( loc ) {
27+
console.warn( `${loc.file} (${loc.line}:${loc.column}) ${message}` );
28+
if ( frame ) console.warn( frame );
29+
} else {
30+
console.warn(`${code} ${message}`);
31+
}
32+
}
33+
};

addons/Dexie.Syncable/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
"dexie-syncable": [
5656
"# Build UMD module and the tests (two bundles)",
5757
"tsc --allowJs --moduleResolution node --lib es2020,dom -t es5 -m es2015 --outDir tools/tmp/es5 --rootDir ../.. --sourceMap src/Dexie.Syncable.js test/unit/unit-tests-all.js [--watch 'Compilation complete.']",
58-
"rollup -c tools/build-configs/rollup.config.js",
59-
"rollup -c tools/build-configs/rollup.tests.config.js",
58+
"rollup -c tools/build-configs/rollup.config.mjs",
59+
"rollup -c tools/build-configs/rollup.tests.config.mjs",
6060
"node tools/replaceVersionAndDate.js dist/dexie-syncable.js",
6161
"node tools/replaceVersionAndDate.js test/unit/bundle.js",
6262
"# eslint ",
@@ -82,7 +82,8 @@
8282
"dexie-observable": "workspace:^",
8383
"eslint": "^5.16.0",
8484
"just-build": "^0.9.24",
85-
"qunit": "^2.9.2",
85+
"qunit": "2.10.0",
86+
"qunitjs": "1.23.1",
8687
"typescript": "^5.3.3",
8788
"uglify-js": "^3.5.6"
8889
}

addons/Dexie.Syncable/tools/build-configs/rollup.config.js renamed to addons/Dexie.Syncable/tools/build-configs/rollup.config.mjs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import sourcemaps from 'rollup-plugin-sourcemaps';
22
import {readFileSync} from 'fs';
33
import path from 'path';
4+
import { fileURLToPath } from 'url';
45

5-
const version = require(path.resolve(__dirname, '../../package.json')).version;
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const packageJson = JSON.parse(readFileSync(path.resolve(__dirname, '../../package.json'), 'utf-8'));
9+
const version = packageJson.version;
610

711
export default {
812
input: 'tools/tmp/es5/addons/Dexie.Syncable/src/Dexie.Syncable.js',

addons/Dexie.Syncable/tools/build-configs/rollup.tests.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import sourcemaps from 'rollup-plugin-sourcemaps';
2-
import commonjs from 'rollup-plugin-commonjs';
3-
import nodeResolve from 'rollup-plugin-node-resolve';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
44

55
const ERRORS_TO_IGNORE = [
66
"THIS_IS_UNDEFINED"
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import sourcemaps from 'rollup-plugin-sourcemaps';
2+
import commonjs from '@rollup/plugin-commonjs';
3+
import nodeResolve from '@rollup/plugin-node-resolve';
4+
5+
const ERRORS_TO_IGNORE = [
6+
"THIS_IS_UNDEFINED"
7+
];
8+
9+
export default {
10+
input: 'tools/tmp/es5/addons/Dexie.Syncable/test/unit/unit-tests-all.js',
11+
output: [{
12+
file: 'test/unit/bundle.js',
13+
format: 'umd',
14+
name: 'dexieSyncableTests',
15+
globals: {dexie: "Dexie", "dexie-observable": "Dexie.Observable", QUnit: "QUnit"},
16+
}],
17+
external: ['dexie', 'dexie-observable', 'QUnit'],
18+
plugins: [
19+
sourcemaps(),
20+
nodeResolve({browser: true}),
21+
commonjs()
22+
],
23+
onwarn ({loc, frame, code, message}) {
24+
if (ERRORS_TO_IGNORE.includes(code)) return;
25+
if ( loc ) {
26+
console.warn( `${loc.file} (${loc.line}:${loc.column}) ${message}` );
27+
if ( frame ) console.warn( frame );
28+
} else {
29+
console.warn(`${code} ${message}`);
30+
}
31+
}
32+
};

0 commit comments

Comments
 (0)