@monogrid/gainmap-js 2.0.4 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v2.0.3
2
+ * @monogrid/gainmap-js v2.0.5
3
3
  * With ❤️, by MONOGRID <hello@mono-grid.com>
4
4
  */
5
5
 
@@ -6540,8 +6540,8 @@
6540
6540
  let library;
6541
6541
  /**
6542
6542
  * Instances the WASM module and returns it, only one module will be created upon multiple calls.
6543
- * @category General
6544
- * @group General
6543
+ * @category WASM
6544
+ * @group WASM
6545
6545
  *
6546
6546
  * @returns
6547
6547
  */
@@ -6610,7 +6610,7 @@
6610
6610
  const lib = await getLibrary();
6611
6611
  const result = lib.extractJpegR(file, file.length);
6612
6612
  if (!result.success)
6613
- throw new Error(result.errorMessage);
6613
+ throw new Error(`${result.errorMessage}`);
6614
6614
  const parser = new DOMParser();
6615
6615
  const xmlDocument = parser.parseFromString(result.metadata, 'text/xml');
6616
6616
  const description = xmlDocument.getElementsByTagName('rdf:Description')[0];
@@ -6634,11 +6634,13 @@
6634
6634
  hdrCapacityMin: parseFloat(hdrCapacityMin),
6635
6635
  hdrCapacityMax: parseFloat(hdrCapacityMax)
6636
6636
  };
6637
- return Object.assign(Object.assign({}, result), {
6637
+ return {
6638
+ ...result,
6638
6639
  /**
6639
6640
  * Parsed metadata
6640
6641
  */
6641
- parsedMetadata });
6642
+ parsedMetadata
6643
+ };
6642
6644
  };
6643
6645
 
6644
6646
  /**
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @monogrid/gainmap-js v2.0.3
2
+ * @monogrid/gainmap-js v2.0.5
3
3
  * With ❤️, by MONOGRID <hello@mono-grid.com>
4
4
  */
5
5
 
6
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-n2Ng5lYw.js';
6
+ import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-iRbo2TdN.js';
7
7
 
8
8
  var lib$1;
9
9
  var hasRequiredLib$1;
@@ -474,6 +474,7 @@ var PromiseWorker$1 = /*@__PURE__*/getDefaultExportFromCjs(promiseWorkerTransfer
474
474
  * @returns
475
475
  */
476
476
  const getPromiseWorker = (worker) => {
477
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
477
478
  return new PromiseWorker$1(worker);
478
479
  };
479
480
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v2.0.3
2
+ * @monogrid/gainmap-js v2.0.5
3
3
  * With ❤️, by MONOGRID <hello@mono-grid.com>
4
4
  */
5
5
 
@@ -484,6 +484,7 @@
484
484
  * @returns
485
485
  */
486
486
  const getPromiseWorker = (worker) => {
487
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
487
488
  return new PromiseWorker$1(worker);
488
489
  };
489
490
  /**
package/dist/worker.js CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * @monogrid/gainmap-js v2.0.3
2
+ * @monogrid/gainmap-js v2.0.5
3
3
  * With ❤️, by MONOGRID <hello@mono-grid.com>
4
4
  */
5
5
 
6
- import { g as getDefaultExportFromCjs } from './_commonjsHelpers-n2Ng5lYw.js';
7
- import { c as compress } from './compress-RL9UE9ww.js';
6
+ import { g as getDefaultExportFromCjs } from './_commonjsHelpers-iRbo2TdN.js';
7
+ import { c as compress } from './compress-_4jEQonS.js';
8
8
 
9
9
  var isPromise$2 = {exports: {}};
10
10
 
@@ -111,8 +111,12 @@ var registerPromiseWorker$1 = /*@__PURE__*/getDefaultExportFromCjs(register);
111
111
  // @ts-expect-error untyped lib
112
112
  const _compress = async (message, withTransferList) => {
113
113
  const result = await compress(message.payload);
114
- return withTransferList(Object.assign(Object.assign({}, result), { source: message.payload.source instanceof ImageData ? message.payload.source.data : new Uint8ClampedArray(message.payload.source) }), [result.data.buffer, message.payload.source instanceof ImageData ? message.payload.source.data.buffer : message.payload.source.buffer]);
114
+ return withTransferList({
115
+ ...result,
116
+ source: message.payload.source instanceof ImageData ? message.payload.source.data : new Uint8ClampedArray(message.payload.source)
117
+ }, [result.data.buffer, message.payload.source instanceof ImageData ? message.payload.source.data.buffer : message.payload.source.buffer]);
115
118
  };
119
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
116
120
  registerPromiseWorker$1(async (message, withTransferList) => {
117
121
  switch (message.type) {
118
122
  // case 'encode-gainmap-buffers':
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @monogrid/gainmap-js v2.0.3
2
+ * @monogrid/gainmap-js v2.0.5
3
3
  * With ❤️, by MONOGRID <hello@mono-grid.com>
4
4
  */
5
5
 
@@ -132,7 +132,7 @@
132
132
  if (res)
133
133
  resolve(res);
134
134
  else
135
- reject('Failed to convert canvas to blob');
135
+ reject(new Error('Failed to convert canvas to blob'));
136
136
  }, mimeType, quality || 0.9);
137
137
  });
138
138
  };
@@ -193,8 +193,12 @@
193
193
  // @ts-expect-error untyped lib
194
194
  const _compress = async (message, withTransferList) => {
195
195
  const result = await compress(message.payload);
196
- return withTransferList(Object.assign(Object.assign({}, result), { source: message.payload.source instanceof ImageData ? message.payload.source.data : new Uint8ClampedArray(message.payload.source) }), [result.data.buffer, message.payload.source instanceof ImageData ? message.payload.source.data.buffer : message.payload.source.buffer]);
196
+ return withTransferList({
197
+ ...result,
198
+ source: message.payload.source instanceof ImageData ? message.payload.source.data : new Uint8ClampedArray(message.payload.source)
199
+ }, [result.data.buffer, message.payload.source instanceof ImageData ? message.payload.source.data.buffer : message.payload.source.buffer]);
197
200
  };
201
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-call
198
202
  registerPromiseWorker$1(async (message, withTransferList) => {
199
203
  switch (message.type) {
200
204
  // case 'encode-gainmap-buffers':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monogrid/gainmap-js",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "A Javascript (TypeScript) Port of Adobe Gainmap Technology for storing HDR Images using an SDR Image + a gain map",
5
5
  "homepage": "https://github.com/MONOGRID/gainmap-js#readme",
6
6
  "repository": {
@@ -80,20 +80,20 @@
80
80
  "test": "jest",
81
81
  "pretest": "npm run build",
82
82
  "check": "concurrently -c auto npm:check:*",
83
- "check:typecheck-src": "tsc --noEmit",
83
+ "check:typecheck-src": "tsc -p src",
84
84
  "check:eslint-src": "eslint \"src/**/*.ts\"",
85
- "check:typecheck-examples": "tsc --noEmit -p examples",
86
- "check:eslint-examples": "eslint \"examples/**/*.ts\"",
87
- "check:typecheck-tests": "tsc --noEmit --skipLibCheck -p tests",
88
- "check:eslint-tests": "eslint \"tests/**/*.ts\"",
85
+ "check:typecheck-examples": "tsc -p examples",
86
+ "check:eslint-examples": "eslint \"examples/**/*.{ts,html}\"",
87
+ "check:typecheck-tests": "tsc -p tests",
88
+ "check:eslint-tests": "eslint \"tests/**/*.{ts,html}\"",
89
89
  "ci:test": "JEST_JUNIT_OUTPUT_DIR=reports jest --ci --reporters=default --reporters=jest-junit",
90
90
  "ci:check": "concurrently npm:ci:check:*",
91
- "ci:check:typecheck-src": "tsc --pretty false --noEmit > reports/typecheck.log",
91
+ "ci:check:typecheck-src": "tsc --pretty false > reports/typecheck.log",
92
92
  "ci:check:eslint-src": "eslint --format json --output-file reports/eslint-src.json \"src/**/*.ts\"",
93
- "ci:check:typecheck-examples": "tsc --pretty false --noEmit -p examples > reports/typecheck-examples.log",
94
- "ci:check:eslint-examples": "eslint --format json --output-file reports/eslint-examples.json \"examples/**/*.ts\"",
95
- "ci:check:typecheck-tests": "tsc --pretty false --noEmit --skipLibCheck -p tests > reports/typecheck-tests.log",
96
- "ci:check:eslint-tests": "eslint --format json --output-file reports/eslint-tests.json \"tests/**/*.ts\""
93
+ "ci:check:typecheck-examples": "tsc --pretty false -p examples > reports/typecheck-examples.log",
94
+ "ci:check:eslint-examples": "eslint --format json --output-file reports/eslint-examples.json \"examples/**/*.{ts,html}\"",
95
+ "ci:check:typecheck-tests": "tsc --pretty false -p tests > reports/typecheck-tests.log",
96
+ "ci:check:eslint-tests": "eslint --format json --output-file reports/eslint-tests.json \"tests/**/*.{ts,html}\""
97
97
  },
98
98
  "peerDependencies": {
99
99
  "three": ">= 0.157.0 < 0.159.0"
@@ -116,14 +116,17 @@
116
116
  "@types/jest": "^29.5.8",
117
117
  "@types/node": "^20.9.0",
118
118
  "@types/three": "^0.158.2",
119
- "@typescript-eslint/eslint-plugin": "^6.10.0",
120
- "@typescript-eslint/parser": "^6.10.0",
119
+ "@typescript-eslint/eslint-plugin": "^6.11.0",
120
+ "@typescript-eslint/parser": "^6.11.0",
121
121
  "babel-jest": "^29.7.0",
122
122
  "concurrently": "^8.2.2",
123
123
  "conventional-changelog-conventionalcommits": "^7.0.2",
124
124
  "cz-conventional-changelog": "^3.3.0",
125
- "eslint": "^8.53.0",
125
+ "eslint": "^8.54.0",
126
+ "eslint-config-mdcs": "^5.0.0",
126
127
  "eslint-config-standard": "^17.0.0",
128
+ "eslint-plugin-compat": "^4.2.0",
129
+ "eslint-plugin-html": "^7.1.0",
127
130
  "eslint-plugin-import": "^2.29.0",
128
131
  "eslint-plugin-jest-extended": "^2.0.0",
129
132
  "eslint-plugin-n": "^16.3.1",
@@ -135,16 +138,19 @@
135
138
  "jest-environment-jsdom": "^29.7.0",
136
139
  "jest-extended": "^4.0.2",
137
140
  "jest-junit": "^16.0.0",
138
- "puppeteer": "^21.5.1",
139
- "rollup": "^4.3.0",
141
+ "puppeteer": "^21.5.2",
142
+ "rollup": "^4.5.0",
140
143
  "rollup-plugin-copy": "^3.5.0",
141
144
  "rollup-plugin-license": "^3.2.0",
142
- "semantic-release": "^22.0.7",
145
+ "semantic-release": "^22.0.8",
143
146
  "three": "^0.158.0",
144
147
  "ts-jest": "^29.1.1",
145
148
  "typedoc": "^0.25.3",
146
149
  "typedoc-github-wiki-theme": "^1.1.0",
147
150
  "typedoc-plugin-markdown": "^3.17.1",
148
151
  "typescript": "^5.2.2"
149
- }
152
+ },
153
+ "browserslist": [
154
+ "> 1%, not dead, not ie 11, not op_mini all"
155
+ ]
150
156
  }