Skip to content

Commit 6dad8c2

Browse files
committed
chore: upgrade majors - rollup, rimraf, typescript
1 parent 4c25edf commit 6dad8c2

6 files changed

+913
-754
lines changed

package.json

+15-14
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
"version": "5.26.3",
44
"description": "react tooltip component",
55
"scripts": {
6-
"dev-rollup": "node ./prebuild.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.js --watch",
7-
"build": "node ./prebuild.js --env=production && npm run types && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.prod.js && npm run test",
6+
"dev-rollup": "node ./prebuild.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.mjs --watch",
7+
"build": "node ./prebuild.js --env=production && npm run types && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.prod.mjs && npm run test",
88
"dev": "node ./prebuild.js --env=development && node ./esbuild.config.dev.mjs",
99
"build-esbuild": "node ./prebuild.js --env=production && node ./esbuild.config.prod.mjs",
10-
"types": "node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.types.js",
10+
"types": "node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.types.mjs",
1111
"eslint": "eslint --ext=js --ext=jsx --ext=ts --ext=tsx --fix ./src",
1212
"stylelint": "stylelint \"src/**/*.css\"",
1313
"prettier": "prettier --config ./.prettierrc.json --write \"src/**/*{.js,.jsx,.ts,.tsx,.css}\"",
@@ -18,6 +18,7 @@
1818
"postbuild": "npm run types && npm run bundlesize",
1919
"prepublishOnly": "npm run build"
2020
},
21+
"type": "module",
2122
"types": "dist/react-tooltip.d.ts",
2223
"license": "MIT",
2324
"private": false,
@@ -48,10 +49,10 @@
4849
},
4950
"homepage": "https://github.com/ReactTooltip/react-tooltip#readme",
5051
"devDependencies": {
51-
"@rollup/plugin-commonjs": "22.0.2",
52-
"@rollup/plugin-node-resolve": "14.1.0",
53-
"@rollup/plugin-replace": "4.0.0",
54-
"@rollup/plugin-typescript": "8.5.0",
52+
"@rollup/plugin-commonjs": "25.0.7",
53+
"@rollup/plugin-node-resolve": "15.2.3",
54+
"@rollup/plugin-replace": "5.0.5",
55+
"@rollup/plugin-typescript": "11.1.6",
5556
"@testing-library/jest-dom": "^5.16.5",
5657
"@testing-library/react": "12.1.5",
5758
"@testing-library/user-event": "14.5.2",
@@ -62,8 +63,8 @@
6263
"@types/react": "18.2.17",
6364
"@types/react-dom": "18.2.22",
6465
"@types/react-test-renderer": "18.0.7",
65-
"@typescript-eslint/eslint-plugin": "5.54.0",
66-
"@typescript-eslint/parser": "5.54.0",
66+
"@typescript-eslint/eslint-plugin": "7.3.1",
67+
"@typescript-eslint/parser": "7.3.1",
6768
"bundlesize": "0.18.2",
6869
"css-loader": "6.10.0",
6970
"esbuild": "0.20.2",
@@ -86,13 +87,13 @@
8687
"process": "^0.11.10",
8788
"react": "16.14.0",
8889
"react-dom": "16.14.0",
89-
"rimraf": "^3.0.2",
90-
"rollup": "2.79.1",
90+
"rimraf": "5.0.5",
91+
"rollup": "4.13.0",
9192
"rollup-plugin-analyzer": "^4.0.0",
9293
"rollup-plugin-browsersync": "^1.3.3",
9394
"rollup-plugin-copy": "3.5.0",
94-
"rollup-plugin-dts": "5.2.0",
95-
"rollup-plugin-filesize": "^9.1.1",
95+
"rollup-plugin-dts": "6.1.0",
96+
"rollup-plugin-filesize": "10.0.0",
9697
"rollup-plugin-html-scaffold": "^0.2.0",
9798
"rollup-plugin-postcss": "^4.0.1",
9899
"rollup-plugin-progress": "^1.1.2",
@@ -105,7 +106,7 @@
105106
"stylelint-config-standard": "^22.0.0",
106107
"ts-jest": "29.1.2",
107108
"ts-node": "10.9.2",
108-
"typescript": "4.9.5"
109+
"typescript": "5.4.2"
109110
},
110111
"peerDependencies": {
111112
"react": ">=16.14.0",

prebuild.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const fs = require('fs') // eslint-disable-line @typescript-eslint/no-var-requires
2-
const rimraf = require('rimraf') // eslint-disable-line @typescript-eslint/no-var-requires
1+
import fs from 'fs'
2+
import { rimraf } from 'rimraf'
33

44
const args = process.argv.slice(2)
55
const parameters = args.reduce((acc, arg) => {
@@ -25,7 +25,7 @@ log(`Building for env: ${parameters.env}`)
2525

2626
// check if directory exists
2727
if (fs.existsSync(dir)) {
28-
rimraf(dir, () => {
28+
rimraf(dir).then(() => {
2929
fs.mkdirSync(dir)
3030
})
3131
} else {
File renamed without changes.

rollup.config.prod.js rollup.config.prod.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import ts from '@rollup/plugin-typescript'
88
import { terser } from 'rollup-plugin-terser'
99
import typescript from 'typescript'
1010
import replaceBeforeSaveFile from './rollup-plugins/replace-before-save-file.js'
11-
import * as pkg from './package.json'
11+
import pkg from './package.json' assert { type: 'json' }
1212

1313
const input = ['src/index.tsx']
1414

File renamed without changes.

0 commit comments

Comments
 (0)