Skip to content

Commit fe44a8d

Browse files
committed
Typescript incoming
1 parent db91521 commit fe44a8d

37 files changed

+5745
-10087
lines changed

.babelrc

Lines changed: 0 additions & 7 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/continuous-integration.yaml

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,23 @@ jobs:
55
name: Continuous Integration
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
9-
- uses: actions/setup-node@v2-beta
8+
- uses: actions/checkout@v4
9+
- uses: pnpm/action-setup@v4
10+
- uses: actions/setup-node@v4
1011
with:
11-
node-version: '14'
12-
- name: Get yarn cache directory path
13-
id: yarn-cache-dir-path
14-
run: echo "::set-output name=dir::$(yarn cache dir)"
15-
- uses: actions/cache@v2
16-
id: yarn-cache
17-
with:
18-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
19-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
20-
restore-keys: |
21-
${{ runner.os }}-yarn-
22-
- run: yarn install --frozen-lockfile
23-
- run: yarn run test
24-
- run: yarn run lint
25-
- run: yarn run tsc --noEmit
26-
- run: yarn run smoke cjs 15.6.2
27-
- run: yarn run smoke esm 15.6.2
28-
- run: yarn run smoke cjs 16.7.0
29-
- run: yarn run smoke esm 16.7.0
30-
- run: yarn run smoke cjs 17.0.1
31-
- run: yarn run smoke esm 17.0.1
32-
- run: yarn run smoke cjs latest
33-
- run: yarn run smoke esm latest
34-
- run: yarn run smoke cjs next
35-
- run: yarn run smoke esm next
36-
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 15.6.2
19+
# - run: pnpm run smoke esm 15.6.2
20+
# - run: pnpm run smoke cjs 16.7.0
21+
# - run: pnpm run smoke esm 16.7.0
22+
# - run: pnpm run smoke cjs 17.0.1
23+
# - run: pnpm run smoke esm 17.0.1
24+
# - run: pnpm run smoke cjs latest
25+
# - run: pnpm run smoke esm latest
26+
# - run: pnpm run smoke cjs next
27+
# - run: pnpm run smoke esm next

.prettierrc

Lines changed: 1 addition & 20 deletions
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

Lines changed: 24 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@
77
"browser": "dist/cjs/index.js",
88
"types": "index.d.ts",
99
"scripts": {
10-
"build": "rollup -c",
10+
"build": "tsup",
1111
"prebuild": "rm -rf dist/",
1212
"build:esm": "tsc --module esnext --outDir lib/esm",
1313
"build:cjs": "tsc --module commonjs --outDir lib/cjs",
1414
"lint": "eslint --ext ts --ext tsx src/",
1515
"lint:fix": "yarn run lint -- --fix",
1616
"prettier:fix": "prettier --write \"**/*.{ts,tsx,js,json}\"",
17-
"test": "jest",
18-
"test:watch": "jest --watch",
17+
"test": "vitest",
1918
"release": "./release.sh",
2019
"smoke": "node tests/smoke/run"
2120
},
@@ -25,66 +24,32 @@
2524
},
2625
"license": "MIT",
2726
"repository": "algolia/react-element-to-jsx-string",
27+
"dependencies": {
28+
"@base2/pretty-print-object": "1.0.1"
29+
},
30+
"peerDependencies": {
31+
"react": "^19.0.0",
32+
"react-dom": "^19.0.0",
33+
"react-is": "^19.0.0"
34+
},
2835
"devDependencies": {
29-
"@babel/cli": "7.15.7",
30-
"@babel/core": "7.15.5",
31-
"@babel/preset-env": "7.15.6",
32-
"@babel/preset-react": "7.14.5",
33-
"@babel/preset-typescript": "^7.15.0",
34-
"@rollup/plugin-typescript": "^8.2.5",
35-
"@types/enzyme": "^3.10.9",
36-
"@types/enzyme-adapter-react-16": "^1.0.6",
37-
"@types/jest": "^27.0.2",
38-
"@types/react": "^17.0.26",
39-
"@types/react-is": "^17.0.2",
40-
"@typescript-eslint/eslint-plugin": "^4.29.3",
41-
"@typescript-eslint/parser": "^4.29.3",
42-
"babel-eslint": "10.1.0",
43-
"babel-jest": "27.2.4",
44-
"babel-register": "6.26.0",
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",
4542
"conventional-changelog-cli": "2.1.1",
4643
"doctoc": "1.4.0",
47-
"enzyme": "3.11.0",
48-
"enzyme-adapter-react-16": "1.15.6",
49-
"eslint": "7.32.0",
50-
"eslint-config-airbnb": "^18.2.1",
51-
"eslint-config-airbnb-typescript": "^14.0.0",
52-
"eslint-config-algolia": "19.0.2",
53-
"eslint-config-prettier": "8.3.0",
54-
"eslint-plugin-import": "2.24.2",
55-
"eslint-plugin-jest": "24.5.0",
56-
"eslint-plugin-jsx-a11y": "6.4.1",
57-
"eslint-plugin-react": "7.26.1",
58-
"eslint-plugin-react-hooks": "4.2.0",
5944
"esm": "3.2.25",
60-
"expect": "27.2.4",
61-
"husky": "3.1.0",
62-
"jest": "27.2.4",
63-
"json": "10.0.0",
64-
"lint-staged": "10.5.4",
45+
"happy-dom": "^16.5.3",
6546
"mversion": "2.0.1",
66-
"prettier": "2.4.1",
67-
"react": "16.14.0",
68-
"react-dom": "16.14.0",
69-
"react-test-renderer": "16.14.0",
70-
"rollup": "2.57.0",
71-
"rollup-plugin-babel": "4.4.0",
72-
"rollup-plugin-node-builtins": "2.1.2",
73-
"rollup-plugin-node-globals": "1.4.0",
74-
"rollup-plugin-node-resolve": "5.2.0",
75-
"rollup-plugin-sourcemaps": "0.6.3",
76-
"typescript": "4.4.3"
77-
},
78-
"peerDependencies": {
79-
"react": "^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1",
80-
"react-dom": "^0.14.8 || ^15.0.1 || ^16.0.0 || ^17.0.1"
81-
},
82-
"dependencies": {
83-
"@base2/pretty-print-object": "1.0.1",
84-
"is-plain-object": "5.0.0",
85-
"react-is": "17.0.2"
86-
},
87-
"jest": {
88-
"setupFilesAfterEnv": ["<rootDir>tests/setupTests.ts"]
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)