Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4859302

Browse files
committedJan 13, 2025
Typescript incoming
1 parent 1126dbd commit 4859302

36 files changed

+5652
-303
lines changed
 

‎.babelrc

-7
This file was deleted.

‎.eslintignore

-2
This file was deleted.

‎.eslintrc.js

-33
This file was deleted.

‎.github/workflows/continuous-integration.yaml

+13-13
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- uses: actions/checkout@v4
9+
- uses: pnpm/action-setup@v4
910
- uses: actions/setup-node@v4
1011
with:
11-
node-version: '20'
12-
cache: 'yarn'
13-
- run: yarn install --frozen-lockfile
14-
- run: yarn run test
15-
- run: yarn run lint
16-
- run: yarn run tsc --noEmit
17-
- run: yarn run smoke cjs 19.0.0
18-
- run: yarn run smoke esm 19.0.0
19-
- run: yarn run smoke cjs latest
20-
- run: yarn run smoke esm latest
21-
- run: yarn run smoke cjs next
22-
- run: yarn run smoke esm next
23-
12+
node-version: '22'
13+
cache: 'pnpm'
14+
- run: pnpm install
15+
- run: pnpm run test
16+
# - run: pnpm run lint
17+
- run: pnpm run tsc --noEmit
18+
# - run: pnpm run smoke cjs 19.0.0
19+
# - run: pnpm run smoke esm 19.0.0
20+
# - run: pnpm run smoke cjs latest
21+
# - run: pnpm run smoke esm latest
22+
# - run: pnpm run smoke cjs next
23+
# - run: pnpm run smoke esm next

‎.prettierrc

+1-20
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,4 @@
11
{
2-
"parser": "babel-ts",
32
"singleQuote": true,
4-
"trailingComma": "es5",
5-
"overrides": [
6-
{
7-
"files": ".prettierrc",
8-
"options": { "parser": "json" }
9-
},
10-
{
11-
"files": ".babelrc",
12-
"options": { "parser": "json" }
13-
},
14-
{
15-
"files": "*.json",
16-
"options": { "parser": "json" }
17-
},
18-
{
19-
"files": "package.json",
20-
"options": { "printWidth": 999 }
21-
}
22-
]
3+
"trailingComma": "es5"
234
}

‎package.json

+23-58
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
"name": "react-element-to-jsx-string",
33
"version": "16.0.0",
44
"description": "Turn a ReactElement into the corresponding JSX string.",
5-
"packageManager": "yarn@1.22.22+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610",
65
"main": "dist/cjs/index.js",
76
"module": "dist/esm/index.js",
87
"browser": "dist/cjs/index.js",
98
"types": "index.d.ts",
109
"scripts": {
11-
"build": "rollup -c",
10+
"build": "tsup",
1211
"prebuild": "rm -rf dist/",
1312
"build:esm": "tsc --module esnext --outDir lib/esm",
1413
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
1514
"lint": "eslint --ext ts --ext tsx src/",
1615
"lint:fix": "yarn run lint -- --fix",
1716
"prettier:fix": "prettier --write \"**/*.{ts,tsx,js,json}\"",
18-
"test": "jest",
19-
"test:watch": "jest --watch",
17+
"test": "vitest",
2018
"release": "./release.sh",
2119
"smoke": "node tests/smoke/run"
2220
},
@@ -26,65 +24,32 @@
2624
},
2725
"license": "MIT",
2826
"repository": "algolia/react-element-to-jsx-string",
29-
"devDependencies": {
30-
"@babel/cli": "7.15.7",
31-
"@babel/core": "7.15.5",
32-
"@babel/preset-env": "7.15.6",
33-
"@babel/preset-react": "7.14.5",
34-
"@babel/preset-typescript": "^7.15.0",
35-
"@rollup/plugin-typescript": "^8.2.5",
36-
"@types/enzyme": "^3.10.9",
37-
"@types/enzyme-adapter-react-16": "^1.0.6",
38-
"@types/jest": "^27.0.2",
39-
"@types/react": "^17.0.26",
40-
"@types/react-is": "^17.0.2",
41-
"@typescript-eslint/eslint-plugin": "^4.29.3",
42-
"@typescript-eslint/parser": "^4.29.3",
43-
"babel-eslint": "10.1.0",
44-
"babel-jest": "27.2.4",
45-
"babel-register": "6.26.0",
46-
"conventional-changelog-cli": "2.2.2",
47-
"doctoc": "1.4.0",
48-
"enzyme": "3.11.0",
49-
"enzyme-adapter-react-16": "1.15.6",
50-
"eslint": "7.32.0",
51-
"eslint-config-airbnb": "^18.2.1",
52-
"eslint-config-airbnb-typescript": "^14.0.0",
53-
"eslint-config-algolia": "19.0.2",
54-
"eslint-config-prettier": "8.3.0",
55-
"eslint-plugin-import": "2.24.2",
56-
"eslint-plugin-jest": "24.5.0",
57-
"eslint-plugin-jsx-a11y": "6.4.1",
58-
"eslint-plugin-react": "7.26.1",
59-
"eslint-plugin-react-hooks": "4.2.0",
60-
"esm": "3.2.25",
61-
"expect": "27.2.4",
62-
"husky": "3.1.0",
63-
"jest": "27.5.1",
64-
"json": "10.0.0",
65-
"lint-staged": "10.5.4",
66-
"mversion": "2.0.1",
67-
"prettier": "2.4.1",
68-
"react": "16.14.0",
69-
"react-dom": "16.14.0",
70-
"react-test-renderer": "16.14.0",
71-
"rollup": "2.57.0",
72-
"rollup-plugin-babel": "4.4.0",
73-
"rollup-plugin-node-builtins": "2.1.2",
74-
"rollup-plugin-node-globals": "1.4.0",
75-
"rollup-plugin-node-resolve": "5.2.0",
76-
"rollup-plugin-sourcemaps": "0.6.3",
77-
"typescript": "4.4.3"
27+
"dependencies": {
28+
"@base2/pretty-print-object": "1.0.2"
7829
},
7930
"peerDependencies": {
8031
"react": "^19.0.0",
8132
"react-dom": "^19.0.0",
8233
"react-is": "^19.0.0"
8334
},
84-
"dependencies": {
85-
"@base2/pretty-print-object": "1.0.2"
86-
},
87-
"jest": {
88-
"setupFilesAfterEnv": ["<rootDir>tests/setupTests.ts"]
35+
"devDependencies": {
36+
"@testing-library/dom": "^10.4.0",
37+
"@testing-library/jest-dom": "^6.6.3",
38+
"@testing-library/react": "^16.1.0",
39+
"@types/react": "^19.0.6",
40+
"@types/react-dom": "^19.0.3",
41+
"@types/react-is": "^19.0.0",
42+
"conventional-changelog-cli": "2.1.1",
43+
"doctoc": "1.4.0",
44+
"esm": "3.2.25",
45+
"happy-dom": "^16.5.3",
46+
"mversion": "2.0.1",
47+
"prettier": "3.4.2",
48+
"react": "19.0.0",
49+
"react-dom": "19.0.0",
50+
"react-is": "19.0.0",
51+
"tsup": "^8.3.5",
52+
"typescript": "^5.7.3",
53+
"vitest": "^2.1.8"
8954
}
9055
}

0 commit comments

Comments
 (0)
Please sign in to comment.