diff --git a/jest.config.cjs b/jest.config.cjs index 4709149..a009d6d 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -23,7 +23,7 @@ module.exports = { // collectCoverageFrom: undefined, // The directory where Jest should output its coverage files - coverageDirectory: "coverage", + coverageDirectory: 'coverage', // An array of regexp pattern strings used to skip coverage collection // coveragePathIgnorePatterns: [ @@ -137,7 +137,7 @@ module.exports = { // snapshotSerializers: [], // The test environment that will be used for testing - testEnvironment: "jsdom", + testEnvironment: 'jsdom', // Options that will be passed to the testEnvironment // testEnvironmentOptions: {}, @@ -192,6 +192,6 @@ module.exports = { // Whether to use watchman for file crawling // watchman: true, transformIgnorePatterns: [ - "node_modules/(?!(ol|pbf|@open-wc|chai-a11y-axe|lit-html|lit-element|node-fetch|fetch-blob|data-uri-to-buffer|formdata-polyfill|color-space|color-rgba|color-parse)/)", // <- exclude the OL lib - ] + 'node_modules/(?!(ol|pbf|@open-wc|chai-a11y-axe|lit-html|lit-element|node-fetch|fetch-blob|data-uri-to-buffer|formdata-polyfill|color-space|color-rgba|color-parse|rbush)/)', // <- exclude the OL lib + ], }; diff --git a/package-lock.json b/package-lock.json index 22b1162..3797da9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "jest-environment-jsdom": "29.7.0", "lit": "3.1.2", "node-fetch": "3.3.2", - "ol": "9.0.0", + "ol": "10.0.0", "ol-mapbox-style": "12.2.1", "pixelmatch": "^5.3.0", "pngjs": "^7.0.0", @@ -34,7 +34,7 @@ "vite": "5.1.4" }, "peerDependencies": { - "ol": "7 || 8 || 9" + "ol": "7 || 8 || 9 || 10" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -5020,9 +5020,9 @@ } }, "node_modules/earcut": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", - "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz", + "integrity": "sha512-41Fs7Q/PLq1SDbqjsgcY7GA42T0jvaCNGXgGtsNdvg+Yv8eIu06bxv4/PoREkZ9nMDNwnUSG9OFB9+yv8eKhDg==", "dev": true }, "node_modules/electron-to-chromium": { @@ -6401,26 +6401,6 @@ "node": ">=0.10.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -9113,17 +9093,17 @@ } }, "node_modules/ol": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/ol/-/ol-9.0.0.tgz", - "integrity": "sha512-+nYHZYbHrRUTDJ8ryxXPdDoAiaT6Zea02cocmGqsJXs4Oac1fYC9EbTIU2Y7803QcmG3u2MR88RxbksBvK+ZfQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ol/-/ol-10.0.0.tgz", + "integrity": "sha512-Gzfh61cQAxseCWL97VpGwbF91R2D69y3ABUewTl2H1Hjy6ipCtnoKshgO+n3WBrjsbsyS8QnkfmiJZNQGQNeOA==", "dev": true, "dependencies": { "color-rgba": "^3.0.0", "color-space": "^2.0.1", - "earcut": "^2.2.3", + "earcut": "^3.0.0", "geotiff": "^2.0.7", - "pbf": "3.2.1", - "rbush": "^3.0.1" + "pbf": "4.0.1", + "rbush": "^4.0.0" }, "funding": { "type": "opencollective", @@ -9332,12 +9312,11 @@ } }, "node_modules/pbf": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", - "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", + "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", "dev": true, "dependencies": { - "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" }, "bin": { @@ -9604,9 +9583,9 @@ "dev": true }, "node_modules/rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.0.tgz", + "integrity": "sha512-F5xw+166FYDZI6jEcz+sWEHL5/J+du3kQWkwqWrPKb6iVoLPZh+2KhTS4OoYqrw1v/RO1xQe6WsLwBvrUAlvXw==", "dev": true, "dependencies": { "quickselect": "^2.0.0" @@ -14591,9 +14570,9 @@ } }, "earcut": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.4.tgz", - "integrity": "sha512-/pjZsA1b4RPHbeWZQn66SWS8nZZWLQQ23oE3Eam7aroEFGEvwKAsJfZ9ytiEMycfzXWpca4FA9QIOehf7PocBQ==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.0.tgz", + "integrity": "sha512-41Fs7Q/PLq1SDbqjsgcY7GA42T0jvaCNGXgGtsNdvg+Yv8eIu06bxv4/PoREkZ9nMDNwnUSG9OFB9+yv8eKhDg==", "dev": true }, "electron-to-chromium": { @@ -15607,12 +15586,6 @@ "safer-buffer": ">= 2.1.2 < 3.0.0" } }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, "ignore": { "version": "5.2.4", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", @@ -17593,17 +17566,17 @@ } }, "ol": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/ol/-/ol-9.0.0.tgz", - "integrity": "sha512-+nYHZYbHrRUTDJ8ryxXPdDoAiaT6Zea02cocmGqsJXs4Oac1fYC9EbTIU2Y7803QcmG3u2MR88RxbksBvK+ZfQ==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/ol/-/ol-10.0.0.tgz", + "integrity": "sha512-Gzfh61cQAxseCWL97VpGwbF91R2D69y3ABUewTl2H1Hjy6ipCtnoKshgO+n3WBrjsbsyS8QnkfmiJZNQGQNeOA==", "dev": true, "requires": { "color-rgba": "^3.0.0", "color-space": "^2.0.1", - "earcut": "^2.2.3", + "earcut": "^3.0.0", "geotiff": "^2.0.7", - "pbf": "3.2.1", - "rbush": "^3.0.1" + "pbf": "4.0.1", + "rbush": "^4.0.0" } }, "ol-mapbox-style": { @@ -17756,12 +17729,11 @@ "dev": true }, "pbf": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.2.1.tgz", - "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.1.tgz", + "integrity": "sha512-SuLdBvS42z33m8ejRbInMapQe8n0D3vN/Xd5fmWM3tufNgRQFBpaW2YVJxQZV4iPNqb0vEFvssMEo5w9c6BTIA==", "dev": true, "requires": { - "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" } }, @@ -17931,9 +17903,9 @@ "dev": true }, "rbush": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/rbush/-/rbush-3.0.1.tgz", - "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/rbush/-/rbush-4.0.0.tgz", + "integrity": "sha512-F5xw+166FYDZI6jEcz+sWEHL5/J+du3kQWkwqWrPKb6iVoLPZh+2KhTS4OoYqrw1v/RO1xQe6WsLwBvrUAlvXw==", "dev": true, "requires": { "quickselect": "^2.0.0" diff --git a/package.json b/package.json index 48c5ad5..b5a20ff 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "test": "jest" }, "peerDependencies": { - "ol": "7 || 8 || 9" + "ol": "7 || 8 || 9 || 10" }, "devDependencies": { "@babel/preset-env": "7.24.0", @@ -41,7 +41,7 @@ "jest-environment-jsdom": "29.7.0", "lit": "3.1.2", "node-fetch": "3.3.2", - "ol": "9.0.0", + "ol": "10.0.0", "ol-mapbox-style": "12.2.1", "pixelmatch": "^5.3.0", "pngjs": "^7.0.0", diff --git a/src/demo/demo-app.ts b/src/demo/demo-app.ts index 6a86ea1..2b183f6 100644 --- a/src/demo/demo-app.ts +++ b/src/demo/demo-app.ts @@ -100,7 +100,7 @@ export class DemoApp extends LitElement { this.printExtentLayer = new VectorLayer({ // @ts-ignore 'name': 'printExtent', - source: new VectorSource({ + source: new VectorSource>({ features: [], }), });