Skip to content

Commit

Permalink
updated to ol v6.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hanreev committed Jul 15, 2021
1 parent ba7737f commit cf00216
Show file tree
Hide file tree
Showing 10 changed files with 49 additions and 29 deletions.
6 changes: 3 additions & 3 deletions @types/ol/Observable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
2 changes: 1 addition & 1 deletion @types/ol/PluggableMap.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down
1 change: 1 addition & 0 deletions @types/ol/source/VectorEventType.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export type VectorSourceEventTypes =
| 'addfeature'
| 'changefeature'
| 'clear'
| 'removefeature'
| 'featuresloadstart'
Expand Down
1 change: 0 additions & 1 deletion @types/ol/style/RegularShape.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ export interface RenderOptions {
strokeStyle?: ColorLike;
strokeWidth: number;
size: number;
lineCap: CanvasLineCap;
lineDash: number[];
lineDashOffset: number;
lineJoin: CanvasLineJoin;
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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**
Expand Down
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -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 <[email protected]>",
"repository": {
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions patches/ol-Observable.patch
Original file line number Diff line number Diff line change
@@ -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<string>} 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<import("./events.js").EventsKey>} Unique key for the listener. If
* called with an array of event types as the first argument, the return
Expand All @@ -15,7 +15,7 @@ index 0ece19881..9cb17ab48 100644
* Listen once for a certain type of event.
* @function
* @param {string|Array<string>} 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<import("./events.js").EventsKey>} Unique key for the listener. If
* called with an array of event types as the first argument, the return
Expand All @@ -24,7 +24,7 @@ index 0ece19881..9cb17ab48 100644
* Unlisten for a certain type of event.
* @function
* @param {string|Array<string>} 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
*/
Expand Down
2 changes: 1 addition & 1 deletion scripts/applyPatches.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
13 changes: 13 additions & 0 deletions scripts/prepareNpm.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
29 changes: 17 additions & 12 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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==
Expand Down Expand Up @@ -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==
Expand Down Expand Up @@ -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==
Expand All @@ -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"
Expand All @@ -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==
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit cf00216

Please sign in to comment.