@atlaspack/optimizer-svgo 2.14.5-canary.138 → 2.14.5-canary.139

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.
@@ -0,0 +1,3 @@
1
+ import { Optimizer } from '@atlaspack/plugin';
2
+ declare const _default: Optimizer<unknown, unknown>;
3
+ export default _default;
@@ -35,6 +35,7 @@ function svgo() {
35
35
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
36
36
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
37
37
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
+ // @ts-expect-error TS7016
38
39
  var _default = exports.default = new (_plugin().Optimizer)({
39
40
  async loadConfig({
40
41
  config
@@ -66,6 +67,7 @@ var _default = exports.default = new (_plugin().Optimizer)({
66
67
  }
67
68
  }
68
69
  }],
70
+ // @ts-expect-error TS2698
69
71
  ...config
70
72
  });
71
73
  if (result.error != null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/optimizer-svgo",
3
- "version": "2.14.5-canary.138+eda07caaf",
3
+ "version": "2.14.5-canary.139+d2fd84977",
4
4
  "license": "(MIT OR Apache-2.0)",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -9,17 +9,21 @@
9
9
  "type": "git",
10
10
  "url": "https://github.com/atlassian-labs/atlaspack.git"
11
11
  },
12
- "main": "lib/SVGOOptimizer.js",
13
- "source": "src/SVGOOptimizer.js",
12
+ "main": "./lib/SVGOOptimizer.js",
13
+ "source": "./src/SVGOOptimizer.ts",
14
+ "types": "./lib/SVGOOptimizer.d.ts",
14
15
  "engines": {
15
16
  "node": ">= 16.0.0"
16
17
  },
17
18
  "dependencies": {
18
- "@atlaspack/diagnostic": "2.14.1-canary.206+eda07caaf",
19
- "@atlaspack/plugin": "2.14.5-canary.138+eda07caaf",
20
- "@atlaspack/utils": "2.14.5-canary.138+eda07caaf",
19
+ "@atlaspack/diagnostic": "2.14.1-canary.207+d2fd84977",
20
+ "@atlaspack/plugin": "2.14.5-canary.139+d2fd84977",
21
+ "@atlaspack/utils": "2.14.5-canary.139+d2fd84977",
21
22
  "svgo": "^2.4.0"
22
23
  },
23
24
  "type": "commonjs",
24
- "gitHead": "eda07caafd2ebb814bbdbfd0ec12fa63124e213f"
25
- }
25
+ "scripts": {
26
+ "check-ts": "tsc --emitDeclarationOnly --rootDir src"
27
+ },
28
+ "gitHead": "d2fd849770fe6305e9c694bd97b1bd905abd9d94"
29
+ }
@@ -1,12 +1,11 @@
1
- // @flow
2
-
3
1
  import {Optimizer} from '@atlaspack/plugin';
4
2
  import ThrowableDiagnostic from '@atlaspack/diagnostic';
5
3
  import {blobToString} from '@atlaspack/utils';
6
4
 
5
+ // @ts-expect-error TS7016
7
6
  import * as svgo from 'svgo';
8
7
 
9
- export default (new Optimizer({
8
+ export default new Optimizer({
10
9
  async loadConfig({config}) {
11
10
  let configFile = await config.getConfig([
12
11
  'svgo.config.js',
@@ -39,6 +38,7 @@ export default (new Optimizer({
39
38
  },
40
39
  },
41
40
  ],
41
+ // @ts-expect-error TS2698
42
42
  ...config,
43
43
  });
44
44
 
@@ -52,4 +52,4 @@ export default (new Optimizer({
52
52
 
53
53
  return {contents: result.data};
54
54
  },
55
- }): Optimizer<mixed, mixed>);
55
+ }) as Optimizer<unknown, unknown>;
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../../tsconfig.json",
3
+ "include": ["src"]
4
+ }