Skip to content

Commit

Permalink
refactor!: switch to es2022 build (#3860)
Browse files Browse the repository at this point in the history
  • Loading branch information
hwbllmnn authored May 24, 2024
1 parent 610b221 commit bf138a9
Show file tree
Hide file tree
Showing 9 changed files with 224 additions and 176 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
373 changes: 210 additions & 163 deletions package-lock.json

Large diffs are not rendered by default.

21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,30 +40,30 @@
}
],
"main": "dist/index.js",
"type": "module",
"files": [
"dist"
],
"scripts": {
"build": "npm run test -- --coverage && npm run build:all",
"build:all": "npm run build:styleguide && npm run build:dist",
"build:declaration": "tsc --emitDeclarationOnly && rimraf --glob ./dist/**/*.spec.d.ts ./dist/**/*.spec.js",
"build:dist": "babel src --out-dir dist --copy-files --ignore spec.tsx,.md --extensions '.ts,.tsx' && npm run build:declaration",
"build:styleguide": "npm run clean:build && styleguidist build",
"build:dist": "tsc -p tsconfig.json && copyfiles -u 1 './src/**/*.less' dist",
"build:styleguide": "npm run clean:build && styleguidist --config styleguide.config.cjs build",
"clean": "rimraf ./build/* ./coverage/* ./dist/*",
"clean:build": "rimraf ./build/*",
"clean:dist": "rimraf ./dist/*",
"clean:test": "rimraf ./coverage/*",
"lint": "npm run lint:styleguide && npm run lint:src",
"lint:fix": "eslint -c .eslintrc.js --ext .tsx,.ts src/ --fix",
"lint:src": "eslint -c .eslintrc.js --ext .tsx,.ts src/",
"lint:styleguide": "eslint -c .eslintrc.styleguide.js src/",
"lint:styleguide-fix": "eslint -c .eslintrc.styleguide.js src/ --fix",
"lint:fix": "eslint -c .eslintrc.cjs --ext .tsx,.ts src/ --fix",
"lint:src": "eslint -c .eslintrc.cjs --ext .tsx,.ts src/",
"lint:styleguide": "eslint -c .eslintrc.styleguide.cjs src/",
"lint:styleguide-fix": "eslint -c .eslintrc.styleguide.cjs src/ --fix",
"prepare": "husky",
"pretest": "npm run typecheck && npm run lint",
"start:styleguide": "styleguidist server",
"test": "npm run test:jest",
"test:jest": "jest --maxWorkers=4 --coverage",
"test:watch": "jest --watchAll",
"test:jest": "jest --maxWorkers=4 --coverage -c jest.config.cjs",
"test:watch": "jest --watchAll -c jest.config.cjs",
"typecheck": "tsc --noEmit --project tsconfig.json"
},
"dependencies": {
Expand All @@ -74,7 +74,7 @@
"@fortawesome/free-solid-svg-icons": "^6.5.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@terrestris/base-util": "^1.1.0",
"@terrestris/ol-util": "^18.0.0",
"@terrestris/ol-util": ">=18",
"@terrestris/react-util": "^5.2.0",
"@types/geojson": "^7946.0.14",
"@types/lodash": "^4.17.1",
Expand Down Expand Up @@ -121,6 +121,7 @@
"chokidar": "^3.6.0",
"copy-to-clipboard": "^3.3.3",
"copy-webpack-plugin": "^12.0.2",
"copyfiles": "^2.4.1",
"css-loader": "^7.1.1",
"eslint": "^8.57.0",
"eslint-plugin-jest-dom": "^5.4.0",
Expand Down
2 changes: 1 addition & 1 deletion styleguide.config.js → styleguide.config.cjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const webpackCommonConf = require('./webpack.common.config.js');
const webpackCommonConf = require('./webpack.common.config.cjs');
const reactDogGenTypeScript = require('react-docgen-typescript');

module.exports = {
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"forceConsistentCasingInFileNames": true,
"jsx": "react",
"lib": ["es7", "dom", "esnext"],
"module": "commonjs",
"module": "ES2022",
"moduleResolution": "node",
"strict": true,
"noImplicitReturns": true,
Expand All @@ -18,7 +18,7 @@
"rootDir": "src",
"skipLibCheck": true,
"sourceMap": true,
"target": "es5",
"target": "ES2022",
"types": ["node", "jest", "@testing-library/jest-dom"]
},
"exclude": [
Expand Down
File renamed without changes.

0 comments on commit bf138a9

Please sign in to comment.