From 2a368d1305949ec6426c7c7312c04224071ec2bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Berg=C3=A9?= Date: Tue, 19 Jul 2022 00:01:34 +0200 Subject: [PATCH] fix(package.json): fix exports (#745) --- packages/babel-plugin-add-jsx-attribute/package.json | 10 ++++++++-- .../babel-plugin-remove-jsx-attribute/package.json | 10 ++++++++-- .../package.json | 10 ++++++++-- .../package.json | 10 ++++++++-- packages/babel-plugin-svg-dynamic-title/package.json | 10 ++++++++-- packages/babel-plugin-svg-em-dimensions/package.json | 10 ++++++++-- .../package.json | 10 ++++++++-- .../babel-plugin-transform-svg-component/package.json | 10 ++++++++-- packages/babel-preset/package.json | 10 ++++++++-- packages/core/package.json | 11 ++++++++--- packages/hast-util-to-babel-ast/package.json | 10 ++++++++-- packages/plugin-jsx/package.json | 10 ++++++++-- packages/plugin-prettier/package.json | 10 ++++++++-- packages/plugin-svgo/package.json | 10 ++++++++-- packages/rollup/package.json | 10 ++++++++-- packages/webpack/package.json | 10 ++++++++-- 16 files changed, 128 insertions(+), 33 deletions(-) diff --git a/packages/babel-plugin-add-jsx-attribute/package.json b/packages/babel-plugin-add-jsx-attribute/package.json index 11d43b4a..0df7ed5a 100644 --- a/packages/babel-plugin-add-jsx-attribute/package.json +++ b/packages/babel-plugin-add-jsx-attribute/package.json @@ -3,8 +3,14 @@ "description": "Add JSX attribute", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-add-jsx-attribute", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-remove-jsx-attribute/package.json b/packages/babel-plugin-remove-jsx-attribute/package.json index 32807969..772712c4 100644 --- a/packages/babel-plugin-remove-jsx-attribute/package.json +++ b/packages/babel-plugin-remove-jsx-attribute/package.json @@ -3,8 +3,14 @@ "description": "Remove JSX attribute", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-remove-jsx-attribute", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-remove-jsx-empty-expression/package.json b/packages/babel-plugin-remove-jsx-empty-expression/package.json index 3be22d62..f3fb6f3d 100644 --- a/packages/babel-plugin-remove-jsx-empty-expression/package.json +++ b/packages/babel-plugin-remove-jsx-empty-expression/package.json @@ -3,8 +3,14 @@ "description": "Remove JSX empty expression", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-remove-jsx-empty-expression", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-replace-jsx-attribute-value/package.json b/packages/babel-plugin-replace-jsx-attribute-value/package.json index aac05942..8f2f3e59 100644 --- a/packages/babel-plugin-replace-jsx-attribute-value/package.json +++ b/packages/babel-plugin-replace-jsx-attribute-value/package.json @@ -3,8 +3,14 @@ "description": "Replace JSX attribute value", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-replace-jsx-attribute-value", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-svg-dynamic-title/package.json b/packages/babel-plugin-svg-dynamic-title/package.json index fedd42ce..b5fdf52a 100644 --- a/packages/babel-plugin-svg-dynamic-title/package.json +++ b/packages/babel-plugin-svg-dynamic-title/package.json @@ -3,8 +3,14 @@ "description": "Transform SVG by adding a dynamic title element", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-svg-dynamic-title", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-svg-em-dimensions/package.json b/packages/babel-plugin-svg-em-dimensions/package.json index 90d5cb90..7c4c14a1 100644 --- a/packages/babel-plugin-svg-em-dimensions/package.json +++ b/packages/babel-plugin-svg-em-dimensions/package.json @@ -3,8 +3,14 @@ "description": "Transform SVG to use em-based dimensions", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-svg-em-dimensions", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-transform-react-native-svg/package.json b/packages/babel-plugin-transform-react-native-svg/package.json index f2c667b6..70a296c4 100644 --- a/packages/babel-plugin-transform-react-native-svg/package.json +++ b/packages/babel-plugin-transform-react-native-svg/package.json @@ -3,8 +3,14 @@ "description": "Transform DOM elements into react-native-svg components", "version": "6.0.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-transform-react-native-svg", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-plugin-transform-svg-component/package.json b/packages/babel-plugin-transform-svg-component/package.json index 1d5a642a..3e9cb417 100644 --- a/packages/babel-plugin-transform-svg-component/package.json +++ b/packages/babel-plugin-transform-svg-component/package.json @@ -3,8 +3,14 @@ "description": "Transform SVG into component", "version": "6.2.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-plugin-transform-svg-component", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/babel-preset/package.json b/packages/babel-preset/package.json index 1f411089..0fad189c 100644 --- a/packages/babel-preset/package.json +++ b/packages/babel-preset/package.json @@ -3,8 +3,14 @@ "description": "SVGR preset that apply transformations from config", "version": "6.2.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/babel-preset", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/core/package.json b/packages/core/package.json index 55e141a1..4888b9af 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -3,8 +3,14 @@ "description": "Transform SVG into React Components.", "version": "6.2.1", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/core", "author": "Greg Bergé ", "publishConfig": { @@ -20,7 +26,6 @@ "engines": { "node": ">=10" }, - "types": "./dist/index.d.ts", "homepage": "https://react-svgr.com", "funding": { "type": "github", diff --git a/packages/hast-util-to-babel-ast/package.json b/packages/hast-util-to-babel-ast/package.json index 1e49b38f..7e093a75 100644 --- a/packages/hast-util-to-babel-ast/package.json +++ b/packages/hast-util-to-babel-ast/package.json @@ -3,8 +3,14 @@ "description": "Transform HAST to Babel AST (JSX)", "version": "6.2.1", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/hast-util-to-babel-ast", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/plugin-jsx/package.json b/packages/plugin-jsx/package.json index 9ffa14eb..b250511f 100644 --- a/packages/plugin-jsx/package.json +++ b/packages/plugin-jsx/package.json @@ -3,8 +3,14 @@ "description": "Transform SVG into JSX", "version": "6.2.1", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/plugin-jsx", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/plugin-prettier/package.json b/packages/plugin-prettier/package.json index c40e9678..c9a224d0 100644 --- a/packages/plugin-prettier/package.json +++ b/packages/plugin-prettier/package.json @@ -3,8 +3,14 @@ "description": "Format code using Prettier", "version": "6.1.2", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/plugin-prettier", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/plugin-svgo/package.json b/packages/plugin-svgo/package.json index d7dfc60f..871cdc87 100644 --- a/packages/plugin-svgo/package.json +++ b/packages/plugin-svgo/package.json @@ -3,8 +3,14 @@ "description": "Optimize SVG", "version": "6.2.0", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/plugin-svgo", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/rollup/package.json b/packages/rollup/package.json index b3cbb8a4..53b32363 100644 --- a/packages/rollup/package.json +++ b/packages/rollup/package.json @@ -3,8 +3,14 @@ "description": "SVGR Rollup plugin.", "version": "6.2.1", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/rollup", "author": "Greg Bergé ", "publishConfig": { diff --git a/packages/webpack/package.json b/packages/webpack/package.json index 008233ca..f9185e22 100644 --- a/packages/webpack/package.json +++ b/packages/webpack/package.json @@ -3,8 +3,14 @@ "description": "SVGR webpack loader.", "version": "6.2.1", "main": "./dist/index.js", - "exports": "./dist/index.js", - "typings": "./dist/index.d.ts", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "require": "./dist/index.js", + "types": "./dist/index.d.ts" + }, + "./package.json": "./package.json" + }, "repository": "https://github.com/gregberge/svgr/tree/master/packages/webpack", "author": "Greg Bergé ", "publishConfig": {