diff --git a/@types/ol/Observable.d.ts b/@types/ol/Observable.d.ts index e713c85b..0ba7a5ba 100644 --- a/@types/ol/Observable.d.ts +++ b/@types/ol/Observable.d.ts @@ -5,12 +5,12 @@ import Target from './events/Target'; export type EventTypes = 'change' | 'error'; export default class Observable extends Target { constructor(); - protected onceInternal(type: string | string[], listener: (p0: any) => void | boolean): EventsKey | EventsKey[]; - protected onInternal(type: string | string[], listener: (p0: any) => void | boolean): EventsKey | EventsKey[]; + protected onceInternal(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; + protected onInternal(type: string | string[], listener: (p0: any) => any): EventsKey | EventsKey[]; /** * Unlisten for a certain type of event. */ - protected unInternal(type: string | string[], listener: (p0: any) => void | boolean): void; + protected unInternal(type: string | string[], listener: (p0: any) => any): void; /** * Increases the revision counter and dispatches a 'change' event. */ diff --git a/@types/ol/PluggableMap.d.ts b/@types/ol/PluggableMap.d.ts index 9b2ac0d1..57811c29 100644 --- a/@types/ol/PluggableMap.d.ts +++ b/@types/ol/PluggableMap.d.ts @@ -291,7 +291,7 @@ export default class PluggableMap extends BaseObject { /** * Set the target element to render this map into. */ - setTarget(target: HTMLElement | string | undefined): void; + setTarget(target?: HTMLElement | string): void; /** * Set the view for this map. */ diff --git a/@types/ol/source/VectorEventType.d.ts b/@types/ol/source/VectorEventType.d.ts index b6a174c9..6aa3356c 100644 --- a/@types/ol/source/VectorEventType.d.ts +++ b/@types/ol/source/VectorEventType.d.ts @@ -1,5 +1,6 @@ export type VectorSourceEventTypes = | 'addfeature' + | 'changefeature' | 'clear' | 'removefeature' | 'featuresloadstart' diff --git a/@types/ol/style/RegularShape.d.ts b/@types/ol/style/RegularShape.d.ts index f9bef700..cec6e4f0 100644 --- a/@types/ol/style/RegularShape.d.ts +++ b/@types/ol/style/RegularShape.d.ts @@ -26,7 +26,6 @@ export interface RenderOptions { strokeStyle?: ColorLike; strokeWidth: number; size: number; - lineCap: CanvasLineCap; lineDash: number[]; lineDashOffset: number; lineJoin: CanvasLineJoin; diff --git a/CHANGELOG.md b/CHANGELOG.md index 13e68bfd..a763f182 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ ## Changelog +- **v3.6.1** + - Updated to OpenLayers v6.6.1 - **v3.6.0** - Updated to OpenLayers v6.6.0 - **v3.5.4** diff --git a/package.json b/package.json index 9599d6f9..1942ed77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@hanreev/types-ol", - "version": "3.6.1", + "version": "3.6.2", "description": "OpenLayers 6+ TypeScript definition", "author": "Rifa'i M. Hanif ", "repository": { @@ -36,10 +36,10 @@ "test": "webpack --progress --color" }, "dependencies": { - "@types/arcgis-rest-api": "^10.4.4", - "@types/geojson": "^7946.0.7", + "@types/arcgis-rest-api": "^10.4.5", + "@types/geojson": "^7946.0.8", "@types/pbf": "^3.0.2", - "@types/topojson-specification": "^1.0.1" + "@types/topojson-specification": "^1.0.2" }, "devDependencies": { "@definitelytyped/definitions-parser": "0.0.85", @@ -48,7 +48,7 @@ "@types/fs-extra": "^9.0.11", "@types/glob": "^7.1.1", "@types/marked": "^2.0.3", - "@types/node": "^16.3.1", + "@types/node": "^16.3.2", "@types/proj4": "^2.5.0", "@types/rbush": "^3.0.0", "@typescript-eslint/eslint-plugin": "^4.28.3", @@ -61,8 +61,8 @@ "jsdoc": "^3.6.7", "jsdoc-plugin-typescript": "2.0.6", "no-emit-webpack-plugin": "^4.0.1", - "node-html-parser": "^4.0.0", - "ol": "^6.6.0", + "node-html-parser": "^4.1.0", + "ol": "^6.6.1", "pinst": "^2.1.6", "prettier": "latest", "pretty-quick": "latest", diff --git a/patches/ol-Observable.patch b/patches/ol-Observable.patch index c444065f..2f9bebe5 100644 --- a/patches/ol-Observable.patch +++ b/patches/ol-Observable.patch @@ -1,12 +1,12 @@ diff --git a/src/ol/Observable.js b/src/ol/Observable.js -index 0ece19881..9cb17ab48 100644 +index 47d3d7b25..9baf411d1 100644 --- a/src/ol/Observable.js +++ b/src/ol/Observable.js @@ -146,7 +146,7 @@ class Observable extends EventTarget { * Listen for a certain type of event. * @function * @param {string|Array} type The event type or array of event types. -- * @param {function((Event|import("./events/Event").default)): (void|boolean)} listener The listener function. +- * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @param {import("./events.js").ListenerFunction} listener The listener function. * @return {import("./events.js").EventsKey|Array} Unique key for the listener. If * called with an array of event types as the first argument, the return @@ -15,7 +15,7 @@ index 0ece19881..9cb17ab48 100644 * Listen once for a certain type of event. * @function * @param {string|Array} type The event type or array of event types. -- * @param {function((Event|import("./events/Event").default)): (void|boolean)} listener The listener function. +- * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @param {import("./events.js").ListenerFunction} listener The listener function. * @return {import("./events.js").EventsKey|Array} Unique key for the listener. If * called with an array of event types as the first argument, the return @@ -24,7 +24,7 @@ index 0ece19881..9cb17ab48 100644 * Unlisten for a certain type of event. * @function * @param {string|Array} type The event type or array of event types. -- * @param {function((Event|import("./events/Event").default)): (void|boolean)} listener The listener function. +- * @param {function((Event|import("./events/Event").default)): ?} listener The listener function. + * @param {import("./events.js").ListenerFunction} listener The listener function. * @api */ diff --git a/scripts/applyPatches.js b/scripts/applyPatches.js index c439a209..d496d373 100644 --- a/scripts/applyPatches.js +++ b/scripts/applyPatches.js @@ -4,7 +4,7 @@ const glob = require('glob'); const childProcess = require('child_process'); const BASE_DIR = process.cwd(); -const OL_VERSION = 'v6.6.0'; +const OL_VERSION = 'v6.6.1'; const jsdocConfigPath = path.resolve(BASE_DIR, 'jsdoc', 'conf.json'); const jsdocConfig = require(jsdocConfigPath); diff --git a/scripts/prepareNpm.js b/scripts/prepareNpm.js index 2a0bd997..4876d168 100644 --- a/scripts/prepareNpm.js +++ b/scripts/prepareNpm.js @@ -37,4 +37,17 @@ childProcess.execSync('yarn test', { stdio: 'ignore' }); console.log('# Emitting definitions to output directory'); fs.copySync(srcPath, destPath); +// Add package.json +console.log('# Copying package.json'); +const packageJsonPath = path.resolve(BASE_DIR, 'package.json'); +const packageJsonDestPath = path.join(destPath, 'package.json'); + +const src = require(packageJsonPath); +delete src.scripts; +delete src.devDependencies; +delete src.files; +delete src.husky; + +fs.writeFileSync(packageJsonDestPath, JSON.stringify(src, null, 4)); + console.log('# DONE'); diff --git a/yarn.lock b/yarn.lock index c250b5c5..15f7b36f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -385,7 +385,7 @@ lodash "4.17.21" prettier "2.2.1" -"@types/arcgis-rest-api@^10.4.4": +"@types/arcgis-rest-api@^10.4.5": version "10.4.5" resolved "https://registry.yarnpkg.com/@types/arcgis-rest-api/-/arcgis-rest-api-10.4.5.tgz#35a1d6b1b39bb530b36799d679576cbc1f35cc2e" integrity sha512-MhpTj3aaURIFhK6pBRF50yCHW5TpbeuC1E81juovfNesSOshsQnCzludhpBhIr2pNzplTBlfzrT7RKiLZ5F3Tw== @@ -418,7 +418,7 @@ dependencies: "@types/node" "*" -"@types/geojson@*", "@types/geojson@^7946.0.7": +"@types/geojson@*", "@types/geojson@^7946.0.8": version "7946.0.8" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca" integrity sha512-1rkryxURpr6aWP7R786/UQOkJ3PcpQiWkAXBmdWc7ryFWqN6a4xfK7BtjXvFBKO9LjQ+MWQSWxYeZX1OApnArA== @@ -451,7 +451,7 @@ resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== -"@types/node@*", "@types/node@^16.3.1": +"@types/node@*": version "16.3.1" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.1.tgz#24691fa2b0c3ec8c0d34bfcfd495edac5593ebb4" integrity sha512-N87VuQi7HEeRJkhzovao/JviiqKjDKMVKxKMfUvSKw+MbkbW8R0nA3fi/MQhhlxV2fQ+2ReM+/Nt4efdrJx3zA== @@ -461,6 +461,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.5.tgz#b59daf6a7ffa461b5648456ca59050ba8e40ed54" integrity sha512-bjqH2cX/O33jXT/UmReo2pM7DIJREPMnarixbQ57DOOzzFaI6D2+IcwaJQaJpv0M1E9TIhPCYVxrkcityLjlqA== +"@types/node@^16.3.2": + version "16.3.2" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.3.2.tgz#655432817f83b51ac869c2d51dd8305fb8342e16" + integrity sha512-jJs9ErFLP403I+hMLGnqDRWT0RYKSvArxuBVh2veudHV7ifEC1WAmjJADacZ7mRbA2nWgHtn8xyECMAot0SkAw== + "@types/parsimmon@^1.10.1": version "1.10.6" resolved "https://registry.yarnpkg.com/@types/parsimmon/-/parsimmon-1.10.6.tgz#8fcf95990514d2a7624aa5f630c13bf2427f9cdd" @@ -481,7 +486,7 @@ resolved "https://registry.yarnpkg.com/@types/rbush/-/rbush-3.0.0.tgz#b6887d99b159e87ae23cd14eceff34f139842aa6" integrity sha512-W3ue/GYWXBOpkRm0VSoifrP3HV0Ni47aVJWvXyWMcbtpBy/l/K/smBRiJ+fI8f7shXRjZBiux+iJzYbh7VmcZg== -"@types/topojson-specification@^1.0.1": +"@types/topojson-specification@^1.0.2": version "1.0.2" resolved "https://registry.yarnpkg.com/@types/topojson-specification/-/topojson-specification-1.0.2.tgz#e20df2c5a611e31f51d606473dbaccc1d90461c8" integrity sha512-SGc1NdX9g3UGDp6S+p+uyG+Z8CehS51sUJ9bejA25Xgn2kkAguILk6J9nxXK+0M/mbTBN7ypMA7+4HVLNMJ8ag== @@ -2491,10 +2496,10 @@ no-emit-webpack-plugin@^4.0.1: dependencies: schema-utils "^3.0.0" -node-html-parser@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-4.0.0.tgz#95e4fec010c48425821d5659eaf39e27b0781b6d" - integrity sha512-vuOcp3u4GrfYOcqe+FpUffQKnfVBq781MbtFEcTR6fJYnYRE2qUPdDaDk7TGdq6H9r2B3TbyU6K9Rah6/C7qvg== +node-html-parser@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/node-html-parser/-/node-html-parser-4.1.0.tgz#9c23130609e203030113255c519ff2d3fbbfc439" + integrity sha512-sqSaqyrg1mqsRTl0r0h4UVAHBoW605rSpanOz0Yr7NzERl0fJ1eh6CRoZFcIXEIyzD3QJfGqsIMP+kzkViTiAA== dependencies: css-select "^4.1.3" he "1.2.0" @@ -2611,10 +2616,10 @@ ol-mapbox-style@^6.4.1: mapbox-to-css-font "^2.4.0" webfont-matcher "^1.1.0" -ol@^6.6.0: - version "6.6.0" - resolved "https://registry.yarnpkg.com/ol/-/ol-6.6.0.tgz#04c93dda422b22b4b0a9374bf86602bfb60401cd" - integrity sha512-4kJM5JKNRlOJnF2ndIoD4qpFmnoYQ8n+Q2qj6u6q63O4yDIrGHombea2OGrrlDPn1kLlKdCPLce8Vams1VIqow== +ol@^6.6.1: + version "6.6.1" + resolved "https://registry.yarnpkg.com/ol/-/ol-6.6.1.tgz#eba3b2bd5c2f6d4f24f4ddcb713523bd3a13234f" + integrity sha512-QHNth7ty7UAPi5oEL5N5rJB/cgdFGAAzigYEM8LTUKCq/StTOTWDf2fFrom3wQVmsr1etf6i6hTBowtY/LiGgg== dependencies: ol-mapbox-style "^6.4.1" pbf "3.2.1"