Skip to content

Commit fae48c8

Browse files
TroyAlfordTroy Alford
andauthoredNov 9, 2020
Fix TS definitions & peerDependencies (TroyAlford#162)
Co-authored-by: Troy Alford <[email protected]>
1 parent 491bfcd commit fae48c8

11 files changed

+108
-109
lines changed
 

‎.npmignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
**/.circleci
2+
**/.eslintrc
3+
**/.gitignore
24
**/.vscode
3-
**/test-coverage
45
**/jest
6+
**/jest.config.js
57
**/node_modules
68
**/test-coverage
7-
**/.eslintrc
8-
**/.gitignore
9-
**/jest.config.js
109
**/webpack.*.js
1110
**/yarn-error.log
1211

‎dist/cjs/react-jsx-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/cjs/react-jsx-parser.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/es5/react-jsx-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/es5/react-jsx-parser.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** This file exists solely to build the index.d.ts file */
2+
import JsxParser from './components/JsxParser';
3+
export type { TProps } from './components/JsxParser';
4+
export default JsxParser;

‎dist/umd/react-jsx-parser.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/umd/react-jsx-parser.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

Lines changed: 86 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,90 @@
11
{
22
"author": "Troy Alford",
3-
"contributors": [
3+
"bugs": "https://github.com/TroyAlford/react-jsx-parser/issues",
4+
"description": "A React component which can parse JSX and output rendered React Components",
5+
"files": [
6+
"dist/"
7+
],
8+
"keywords": [
9+
"react",
10+
"jsx"
11+
],
12+
"license": "MIT",
13+
"main": "dist/umd/react-jsx-parser.min.js",
14+
"types": "dist/index.d.ts",
15+
"name": "react-jsx-parser",
16+
"repository": "TroyAlford/react-jsx-parser",
17+
"version": "1.27.0",
18+
"dependencies": {
19+
"@types/jsdom": "^16.2.4",
20+
"acorn": "^8.0.4",
21+
"acorn-jsx": "^5.3.1",
22+
"core-js": "^3.6.5"
23+
},
24+
"devDependencies": {
25+
"@babel/core": "^7.12.3",
26+
"@babel/plugin-proposal-class-properties": "^7.12.1",
27+
"@babel/plugin-transform-typescript": "^7.12.1",
28+
"@babel/preset-env": "^7.12.1",
29+
"@babel/preset-react": "^7.12.1",
30+
"@babel/preset-typescript": "^7.12.1",
31+
"@babel/runtime-corejs3": "^7.12.1",
32+
"@types/acorn": "^4.0.5",
33+
"@types/enzyme": "^3.10.7",
34+
"@types/jest": "^26.0.14",
35+
"@types/react": "^16.9.53",
36+
"@types/react-dom": "^16.9.8",
37+
"@typescript-eslint/eslint-plugin": "^4.4.1",
38+
"@typescript-eslint/parser": "^4.4.1",
39+
"babel-core": "^7.0.0-bridge.0",
40+
"babel-jest": "^26.5.2",
41+
"babel-loader": "^8.1.0",
42+
"concurrently": "^5.3.0",
43+
"cross-env": "^7.0.2",
44+
"enzyme": "^3.11.0",
45+
"enzyme-adapter-react-16": "^1.15.5",
46+
"eslint": "^7.11.0",
47+
"eslint-config-airbnb": "^18.2.0",
48+
"eslint-plugin-import": "^2.22.1",
49+
"eslint-plugin-jsx-a11y": "^6.3.1",
50+
"eslint-plugin-react": "^7.21.4",
51+
"eslint-plugin-react-hooks": "^4.1.2",
52+
"jest": "^26.5.3",
53+
"jest-cli": "^26.5.3",
54+
"jest-environment-jsdom-fourteen": "^1.0.1",
55+
"mkdirp": "^1.0.4",
56+
"react": "^16",
57+
"react-dom": "^16",
58+
"source-map-explorer": "^2.5.0",
59+
"terser-webpack-plugin": "^5.0.0",
60+
"typescript": "^4.0.5",
61+
"webpack": "^5.1.3",
62+
"webpack-cli": "^4.0.0",
63+
"webpack-dev-server": "^3.11.0"
64+
},
65+
"peerDependencies": {
66+
"@types/react": ">=16",
67+
"@types/react-dom": ">=16",
68+
"react": ">=16",
69+
"react-dom": ">=16"
70+
},
71+
"resolutions": {
72+
"browserslist": "^4.14.5",
73+
"extend": "^3.0.2",
74+
"merge": "^1.2.1"
75+
},
76+
"scripts": {
77+
"build": "yarn types && cross-env NODE_ENV=production webpack",
78+
"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\"",
79+
"types": "tsc -p ./tsconfig.json -d --emitDeclarationOnly",
80+
"postversion": "git push origin HEAD && git push origin HEAD --tags",
81+
"prebuild": "mkdirp ./dist && rm -rf ./dist/*",
82+
"preversion": "yarn test",
83+
"sourcemap": "yarn build && source-map-explorer ./dist/es5/react-jsx-parser.min.js",
84+
"test": "yarn jest",
85+
"version": "yarn build && git add -A ./dist"
86+
},
87+
"contributors": [
488
{
589
"name": "akucheruk-vareger",
690
"url": "https://github.com/akucheruk-vareger"
@@ -97,98 +181,5 @@
97181
"name": "tschicke-brown",
98182
"url": "https://github.com/tschicke-brown"
99183
}
100-
],
101-
"bugs": "https://github.com/TroyAlford/react-jsx-parser/issues",
102-
"description": "A React component which can parse JSX and output rendered React Components",
103-
"files": [
104-
"dist/"
105-
],
106-
"keywords": [
107-
"react",
108-
"jsx"
109-
],
110-
"license": "MIT",
111-
"main": "dist/umd/react-jsx-parser.min.js",
112-
"types": "dist/index.d.ts",
113-
"name": "react-jsx-parser",
114-
"repository": "TroyAlford/react-jsx-parser",
115-
"version": "1.26.3",
116-
"dependencies": {
117-
"@types/jsdom": "^16.2.4",
118-
"acorn": "^8.0.4",
119-
"acorn-jsx": "^5.3.1",
120-
"core-js": "^3.6.5"
121-
},
122-
"devDependencies": {
123-
"@babel/core": "^7.12.3",
124-
"@babel/plugin-proposal-class-properties": "^7.12.1",
125-
"@babel/plugin-transform-typescript": "^7.12.1",
126-
"@babel/preset-env": "^7.12.1",
127-
"@babel/preset-react": "^7.12.1",
128-
"@babel/preset-typescript": "^7.12.1",
129-
"@babel/runtime-corejs3": "^7.12.1",
130-
"@types/acorn": "^4.0.5",
131-
"@types/enzyme": "^3.10.7",
132-
"@types/jest": "^26.0.14",
133-
"@types/react": "^16.9.53",
134-
"@types/react-dom": "^16.9.8",
135-
"@typescript-eslint/eslint-plugin": "^4.4.1",
136-
"@typescript-eslint/parser": "^4.4.1",
137-
"babel-core": "^7.0.0-bridge.0",
138-
"babel-jest": "^26.5.2",
139-
"babel-loader": "^8.1.0",
140-
"concurrently": "^5.3.0",
141-
"cross-env": "^7.0.2",
142-
"enzyme": "^3.11.0",
143-
"enzyme-adapter-react-16": "^1.15.5",
144-
"eslint": "^7.11.0",
145-
"eslint-config-airbnb": "^18.2.0",
146-
"eslint-plugin-import": "^2.22.1",
147-
"eslint-plugin-jsx-a11y": "^6.3.1",
148-
"eslint-plugin-react": "^7.21.4",
149-
"eslint-plugin-react-hooks": "^4.1.2",
150-
"jest": "^26.5.3",
151-
"jest-cli": "^26.5.3",
152-
"jest-environment-jsdom-fourteen": "^1.0.1",
153-
"mkdirp": "^1.0.4",
154-
"react": "^16",
155-
"react-dom": "^16",
156-
"source-map-explorer": "^2.5.0",
157-
"terser-webpack-plugin": "^5.0.0",
158-
"typescript": "^4.0.3",
159-
"webpack": "^5.1.3",
160-
"webpack-cli": "^4.0.0",
161-
"webpack-dev-server": "^3.11.0"
162-
},
163-
"peerDependencies": {
164-
"react": ">=16",
165-
"react-dom": ">=16"
166-
},
167-
"resolutions": {
168-
"browserslist": "^4.14.5",
169-
"extend": "^3.0.2",
170-
"merge": "^1.2.1"
171-
},
172-
"scripts": {
173-
"build": "yarn types && cross-env NODE_ENV=production webpack",
174-
"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\"",
175-
"types": "tsc -p ./tsconfig.json -d --emitDeclarationOnly",
176-
"postversion": "git push origin HEAD && git push origin HEAD --tags",
177-
"prebuild": "mkdirp ./dist && rm -rf ./dist/*",
178-
"preversion": "yarn test",
179-
"sourcemap": "yarn build && source-map-explorer ./dist/es5/react-jsx-parser.min.js",
180-
"test": "yarn jest",
181-
"version": "yarn build && git add -A ./dist"
182-
},
183-
"jest": {
184-
"collectCoverageFrom": [
185-
"source/**/*.js"
186-
],
187-
"setupFilesAfterEnv": [
188-
"<rootDir>setupTests.js"
189-
],
190-
"transform": {
191-
".js$": "babel-jest"
192-
}
193-
}
184+
]
194185
}

‎source/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** This file exists solely to build the index.d.ts file */
2+
import JsxParser from './components/JsxParser'
3+
4+
export type { TProps } from './components/JsxParser'
5+
export default JsxParser

‎yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9369,10 +9369,10 @@ typedarray-to-buffer@^3.1.5:
93699369
dependencies:
93709370
is-typedarray "^1.0.0"
93719371

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

93779377
typical@^5.0.0, typical@^5.2.0:
93789378
version "5.2.0"

0 commit comments

Comments
 (0)
Please sign in to comment.