oslllo-potrace 3.0.0 → 5.0.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oslllo-potrace",
3
- "version": "3.0.0",
3
+ "version": "5.0.0",
4
4
  "description": "A \"1:1 output\" JavaScript port of Potrace JS for NodeJS.",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -39,14 +39,14 @@
39
39
  },
40
40
  "homepage": "https://github.com/oslllo/potrace#readme",
41
41
  "dependencies": {
42
- "jimp": "^0.22.12"
42
+ "jimp": "^1.6.0"
43
43
  },
44
44
  "devDependencies": {
45
- "chai": "^4.3.6",
46
- "chai-as-promised": "^7.1.1",
47
- "fast-glob": "^3.2.11",
45
+ "chai": "^4.5.0",
46
+ "chai-as-promised": "^7.1.2",
47
+ "fast-glob": "^3.3.3",
48
48
  "fs-extra": "^10.1.0",
49
- "mocha": "^9.2.2",
49
+ "mocha": "^11.7.5",
50
50
  "svg2png-wasm-node-10": "^1.3.1"
51
51
  }
52
52
  }
package/src/loader.js CHANGED
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
 
3
- const jimp = require("jimp");
4
3
  const error = require("./error");
5
4
  const Bitmap = require("./types/Bitmap");
5
+ const { Jimp } = require('jimp').default || require('jimp');
6
6
 
7
7
  const Loader = function () {
8
8
  };
@@ -18,7 +18,7 @@ Loader.prototype = {
18
18
  );
19
19
  throw err;
20
20
  }
21
- return jimp.read(image);
21
+ return Jimp.read(image);
22
22
  },
23
23
  bitmap: function (image, info) {
24
24
  var {
package/CHANGELOG.md DELETED
@@ -1,199 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [3.0.0](https://github.com/oslllo/potrace/compare/v2.0.1...v3.0.0) (2024-07-21)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * fix security vulnerabilities ([cd9eee2](https://github.com/oslllo/potrace/commit/cd9eee2b38bc0aaca0dda4abb422ba5304acdc3d))
14
-
15
- ### [2.0.1](https://www.github.com/oslllo/potrace/compare/v2.0.0...v2.0.1) (2022-07-16)
16
-
17
-
18
- ### Miscellaneous Chores
19
-
20
- * release 2.0.1 ([5eb34e2](https://www.github.com/oslllo/potrace/commit/5eb34e201a74668698ea4b27251afec5fb69e215))
21
-
22
- ## [2.0.0](https://www.github.com/oslllo/potrace/compare/v1.2.0...v2.0.0) (2021-12-31)
23
-
24
-
25
- ### Features
26
-
27
- * **deps:** Simplify dependencies, remove canvas/jsdom ([c013c58](https://www.github.com/oslllo/potrace/commit/c013c58e0fc11c1757fbcf3089e6b42d647fb6af))
28
-
29
-
30
- ### Bug Fixes
31
-
32
- * **deps:** use svg2png-wasm-node-10 for compatibility ([655fe37](https://www.github.com/oslllo/potrace/commit/655fe37a80bc61b62ea0a21c4346dba353154842))
33
- * **example:** add white background ([f3b3980](https://www.github.com/oslllo/potrace/commit/f3b3980298ffed0fcc6a9e4186ac7e6a2cb0627b))
34
-
35
-
36
- ### Miscellaneous Chores
37
-
38
- * release 2.0.0 ([6575466](https://www.github.com/oslllo/potrace/commit/6575466f0f4aeeaedb8302684c0d14903d26f350))
39
-
40
- ## [1.2.0](https://www.github.com/oslllo/potrace/compare/v1.1.4...v1.2.0) (2021-12-30)
41
-
42
-
43
- ### Features
44
-
45
- * **potrace:** new Promise() is not needed with async function ([1adad10](https://www.github.com/oslllo/potrace/commit/1adad10ec6c0b6d19598d47faa36e64a574a756c))
46
-
47
-
48
- ### Bug Fixes
49
-
50
- * **src:** remove unused vars ([a00c02a](https://www.github.com/oslllo/potrace/commit/a00c02a982472ea78dd74fd20c6402e093775002))
51
- * unhandled rejection in Loader.image() ([5edf4a7](https://www.github.com/oslllo/potrace/commit/5edf4a79ed971160578003dd9c236c0ac9accf98))
52
- * unhandled rejection in Loader.image() ([0c3843f](https://www.github.com/oslllo/potrace/commit/0c3843f078a64570043f5a046844197c86a943af))
53
-
54
- ### [1.1.4](https://www.github.com/oslllo/potrace/compare/v1.1.3...v1.1.4) (2021-09-05)
55
-
56
-
57
- ### Bug Fixes
58
-
59
- * vulnerabilities ([e3fc7cb](https://www.github.com/oslllo/potrace/commit/e3fc7cbb39c892e08b39dc90c8ce7b869bf29ce2))
60
-
61
- ### [1.1.3](https://www.github.com/oslllo/potrace/compare/v1.1.2...v1.1.3) (2021-05-06)
62
-
63
-
64
- ### Miscellaneous Chores
65
-
66
- * update dependencies
67
- * release 1.1.3 ([f7784aa](https://www.github.com/oslllo/potrace/commit/f7784aae62f0132377d5f91ee6be38b63d82ddef))
68
-
69
- ## [1.1.2] - 2021/3/31
70
-
71
- ### Security
72
-
73
- - Updated dependences.
74
-
75
- ## [1.1.1] - 2020/12/12
76
-
77
- ### Fixed
78
-
79
- - Fixed vulnerabilities.
80
-
81
- ## [1.1.0] - 2020/9/10
82
-
83
- ### Fixed
84
-
85
- - Added missing package `jimp` needed on runtime.
86
-
87
- ## [1.0.1] - 2020/9/10
88
-
89
- ### Changed
90
-
91
- - Remove tests from npm `package` to help reduce unpacked `package` size.
92
-
93
- ## [1.0.0] - 2020/9/10
94
-
95
- ### Changed
96
-
97
- - Changed `potrace.trace(file, options)` **_=>_** `Potrace(file, options).trace()`.
98
- - Changed `new potrace.Potrace()` **_=>_** `Potrace(file, options)`,
99
- > The `new` declaration for `Potrace` is no more required.
100
- - Refactored codebase.
101
- - Updated tests.
102
- - Moved tests from `jest` to `mocha`.
103
- - Removed unused dependencies.
104
-
105
- ### Fixed
106
-
107
- - Fixed base64 image throwing an error with `jsdom@16.4.0`. See [Travic CI - Build 722428515](https://travis-ci.org/github/oslllo/potrace/builds/722428515)
108
-
109
- ### Security
110
-
111
- - Updated dependences.
112
-
113
- ## [0.0.10] - 2020/7/10
114
-
115
- ### Security
116
-
117
- - Updated dependences.
118
-
119
- ## [0.0.9] - 2020/5/16
120
-
121
- ### Changed
122
-
123
- - Removed unused dependences.
124
-
125
- ### Security
126
-
127
- - Addressed advisory https://www.npmjs.com/advisories/1500.
128
-
129
- ## [0.0.8] - 2020/5/14
130
-
131
- ### Changed
132
-
133
- - Reduced npm package size.
134
-
135
- ## [0.0.7] - 2020/5/12
136
-
137
- ### Fixed
138
-
139
- - Fixed typo in `core.js`.
140
-
141
- ### Added
142
-
143
- - Added badge links to `README.md`.
144
- - Added new tags to `package.json`.
145
-
146
- ### Changed
147
-
148
- - Updated `README.md` content.
149
-
150
- ## [0.0.6] - 2020/5/6
151
-
152
- ### Changed
153
-
154
- - `potrace.Potrace.getSVG()` default size can now be set in parameters.
155
- - Cleaned up tests and code.
156
- - Updated README.md.
157
-
158
- ### Added
159
-
160
- - Added example tests.
161
-
162
- ## [0.0.5] - 2020/4/29
163
-
164
- ### Changed
165
-
166
- - Updated `package.json` description to match repo.
167
-
168
- ## [0.0.4] - 2020/4/29
169
-
170
- ### Fixed
171
-
172
- - Fixed issue with `potrace.trace()` not being able to set parameters.
173
-
174
- ### Changed
175
-
176
- - Refactored tests.
177
- - Updated README.md.
178
-
179
- ### Added
180
-
181
- - Added new tests.
182
-
183
- ## [0.0.3] - 2020/4/29
184
-
185
- ### Changed
186
-
187
- - Updated README.md.
188
-
189
- ## [0.0.2] - 2020/4/28
190
-
191
- ### Changed
192
-
193
- - Updated README.md.
194
-
195
- ## [0.0.1] - 2020/4/28
196
-
197
- ### Added
198
-
199
- - Added everything, initial release.