Skip to content

Commit

Permalink
Fix TS definitions & peerDependencies (#162)
Browse files Browse the repository at this point in the history
Co-authored-by: Troy Alford <[email protected]>
  • Loading branch information
TroyAlford and Troy Alford authored Nov 9, 2020
1 parent 491bfcd commit fae48c8
Show file tree
Hide file tree
Showing 11 changed files with 108 additions and 109 deletions.
7 changes: 3 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
**/.circleci
**/.eslintrc
**/.gitignore
**/.vscode
**/test-coverage
**/jest
**/jest.config.js
**/node_modules
**/test-coverage
**/.eslintrc
**/.gitignore
**/jest.config.js
**/webpack.*.js
**/yarn-error.log

Expand Down
2 changes: 1 addition & 1 deletion dist/cjs/react-jsx-parser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/cjs/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/es5/react-jsx-parser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/es5/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/** This file exists solely to build the index.d.ts file */
import JsxParser from './components/JsxParser';
export type { TProps } from './components/JsxParser';
export default JsxParser;
2 changes: 1 addition & 1 deletion dist/umd/react-jsx-parser.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/umd/react-jsx-parser.min.js.map

Large diffs are not rendered by default.

181 changes: 86 additions & 95 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,90 @@
{
"author": "Troy Alford",
"contributors": [
"bugs": "https://github.com/TroyAlford/react-jsx-parser/issues",
"description": "A React component which can parse JSX and output rendered React Components",
"files": [
"dist/"
],
"keywords": [
"react",
"jsx"
],
"license": "MIT",
"main": "dist/umd/react-jsx-parser.min.js",
"types": "dist/index.d.ts",
"name": "react-jsx-parser",
"repository": "TroyAlford/react-jsx-parser",
"version": "1.27.0",
"dependencies": {
"@types/jsdom": "^16.2.4",
"acorn": "^8.0.4",
"acorn-jsx": "^5.3.1",
"core-js": "^3.6.5"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-transform-typescript": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@babel/runtime-corejs3": "^7.12.1",
"@types/acorn": "^4.0.5",
"@types/enzyme": "^3.10.7",
"@types/jest": "^26.0.14",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.5.2",
"babel-loader": "^8.1.0",
"concurrently": "^5.3.0",
"cross-env": "^7.0.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"eslint": "^7.11.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.1.2",
"jest": "^26.5.3",
"jest-cli": "^26.5.3",
"jest-environment-jsdom-fourteen": "^1.0.1",
"mkdirp": "^1.0.4",
"react": "^16",
"react-dom": "^16",
"source-map-explorer": "^2.5.0",
"terser-webpack-plugin": "^5.0.0",
"typescript": "^4.0.5",
"webpack": "^5.1.3",
"webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.0"
},
"peerDependencies": {
"@types/react": ">=16",
"@types/react-dom": ">=16",
"react": ">=16",
"react-dom": ">=16"
},
"resolutions": {
"browserslist": "^4.14.5",
"extend": "^3.0.2",
"merge": "^1.2.1"
},
"scripts": {
"build": "yarn types && cross-env NODE_ENV=production webpack",
"develop": "NODE_ENV=production concurrently -n build,ts,demo -c green,cyan,yellow \"yarn webpack --watch\" \"yarn types --watch\" \"yarn webpack serve --config ./webpack.demo.js\"",
"types": "tsc -p ./tsconfig.json -d --emitDeclarationOnly",
"postversion": "git push origin HEAD && git push origin HEAD --tags",
"prebuild": "mkdirp ./dist && rm -rf ./dist/*",
"preversion": "yarn test",
"sourcemap": "yarn build && source-map-explorer ./dist/es5/react-jsx-parser.min.js",
"test": "yarn jest",
"version": "yarn build && git add -A ./dist"
},
"contributors": [
{
"name": "akucheruk-vareger",
"url": "https://github.com/akucheruk-vareger"
Expand Down Expand Up @@ -97,98 +181,5 @@
"name": "tschicke-brown",
"url": "https://github.com/tschicke-brown"
}
],
"bugs": "https://github.com/TroyAlford/react-jsx-parser/issues",
"description": "A React component which can parse JSX and output rendered React Components",
"files": [
"dist/"
],
"keywords": [
"react",
"jsx"
],
"license": "MIT",
"main": "dist/umd/react-jsx-parser.min.js",
"types": "dist/index.d.ts",
"name": "react-jsx-parser",
"repository": "TroyAlford/react-jsx-parser",
"version": "1.26.3",
"dependencies": {
"@types/jsdom": "^16.2.4",
"acorn": "^8.0.4",
"acorn-jsx": "^5.3.1",
"core-js": "^3.6.5"
},
"devDependencies": {
"@babel/core": "^7.12.3",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-transform-typescript": "^7.12.1",
"@babel/preset-env": "^7.12.1",
"@babel/preset-react": "^7.12.1",
"@babel/preset-typescript": "^7.12.1",
"@babel/runtime-corejs3": "^7.12.1",
"@types/acorn": "^4.0.5",
"@types/enzyme": "^3.10.7",
"@types/jest": "^26.0.14",
"@types/react": "^16.9.53",
"@types/react-dom": "^16.9.8",
"@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^4.4.1",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^26.5.2",
"babel-loader": "^8.1.0",
"concurrently": "^5.3.0",
"cross-env": "^7.0.2",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"eslint": "^7.11.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-react": "^7.21.4",
"eslint-plugin-react-hooks": "^4.1.2",
"jest": "^26.5.3",
"jest-cli": "^26.5.3",
"jest-environment-jsdom-fourteen": "^1.0.1",
"mkdirp": "^1.0.4",
"react": "^16",
"react-dom": "^16",
"source-map-explorer": "^2.5.0",
"terser-webpack-plugin": "^5.0.0",
"typescript": "^4.0.3",
"webpack": "^5.1.3",
"webpack-cli": "^4.0.0",
"webpack-dev-server": "^3.11.0"
},
"peerDependencies": {
"react": ">=16",
"react-dom": ">=16"
},
"resolutions": {
"browserslist": "^4.14.5",
"extend": "^3.0.2",
"merge": "^1.2.1"
},
"scripts": {
"build": "yarn types && cross-env NODE_ENV=production webpack",
"develop": "NODE_ENV=production concurrently -n build,ts,demo -c green,cyan,yellow \"yarn webpack --watch\" \"yarn types --watch\" \"yarn webpack serve --config ./webpack.demo.js\"",
"types": "tsc -p ./tsconfig.json -d --emitDeclarationOnly",
"postversion": "git push origin HEAD && git push origin HEAD --tags",
"prebuild": "mkdirp ./dist && rm -rf ./dist/*",
"preversion": "yarn test",
"sourcemap": "yarn build && source-map-explorer ./dist/es5/react-jsx-parser.min.js",
"test": "yarn jest",
"version": "yarn build && git add -A ./dist"
},
"jest": {
"collectCoverageFrom": [
"source/**/*.js"
],
"setupFilesAfterEnv": [
"<rootDir>setupTests.js"
],
"transform": {
".js$": "babel-jest"
}
}
]
}
5 changes: 5 additions & 0 deletions source/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** This file exists solely to build the index.d.ts file */
import JsxParser from './components/JsxParser'

export type { TProps } from './components/JsxParser'
export default JsxParser
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9369,10 +9369,10 @@ typedarray-to-buffer@^3.1.5:
dependencies:
is-typedarray "^1.0.0"

typescript@^4.0.3:
version "4.0.3"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.0.3.tgz#153bbd468ef07725c1df9c77e8b453f8d36abba5"
integrity sha512-tEu6DGxGgRJPb/mVPIZ48e69xCn2yRmCgYmDugAVwmJ6o+0u1RI18eO7E7WBTLYLaEVVOhwQmcdhQHweux/WPg==
typescript@^4.0.5:
version "4.0.5"
resolved "https://registry.npmjs.org/typescript/-/typescript-4.0.5.tgz#ae9dddfd1069f1cb5beb3ef3b2170dd7c1332389"
integrity sha512-ywmr/VrTVCmNTJ6iV2LwIrfG1P+lv6luD8sUJs+2eI9NLGigaN+nUQc13iHqisq7bra9lnmUSYqbJvegraBOPQ==

typical@^5.0.0, typical@^5.2.0:
version "5.2.0"
Expand Down

0 comments on commit fae48c8

Please sign in to comment.