Skip to content

Commit 2ca0abc

Browse files
authored
Merge pull request #416 from wearemothership/package-update
Upgrade packages:
2 parents a66f5fe + 3a5d630 commit 2ca0abc

33 files changed

+538
-386
lines changed

.eslintrc.json

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

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
run: npm install
2020

2121
- name: Pack
22-
run: npm run pack
22+
run: npm run build
2323

2424
- name: Publish
2525
run: |

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ dist
33
.vscode
44
examples
55

6+
#yarn
7+
.yarn
8+
yarn.lock
9+
610
# dependencies
711
/node_modules
812
package-lock.json

.husky/pre-commit

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
11
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
42
npm run pre:commit

.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

eslint.config.js

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
import react from "eslint-plugin-react";
2+
import tseslint, { configs as tseslintConfigs } from "typescript-eslint";
3+
import globals from "globals";
4+
import js from "@eslint/js";
5+
import reactHooks from "eslint-plugin-react-hooks";
6+
import reactRefresh from "eslint-plugin-react-refresh";
7+
import pluginImport from "eslint-plugin-import";
8+
import pluginJsxA11y from "eslint-plugin-jsx-a11y";
9+
import pluginPromise from "eslint-plugin-promise";
10+
11+
export default tseslint.config(
12+
{ ignores: ["jest.config.ts", "scripts", "dist", "vite.config.js"] },
13+
pluginJsxA11y.flatConfigs.recommended,
14+
pluginPromise.configs["flat/recommended"],
15+
pluginImport.flatConfigs.recommended,
16+
{
17+
extends: [js.configs.recommended, ...tseslintConfigs.recommended],
18+
plugins: {
19+
"react-hooks": reactHooks,
20+
"react-refresh": reactRefresh,
21+
react,
22+
},
23+
files: ["**/*.{ts,tsx}"],
24+
languageOptions: {
25+
globals: {
26+
...globals.browser,
27+
React: "readonly",
28+
},
29+
ecmaVersion: "latest",
30+
sourceType: "module",
31+
},
32+
33+
settings: {
34+
react: {
35+
version: "detect",
36+
},
37+
},
38+
39+
rules: {
40+
...reactHooks.configs.recommended.rules,
41+
"linebreak-style": ["error", "unix"],
42+
43+
quotes: [
44+
"error",
45+
"double",
46+
{
47+
allowTemplateLiterals: true,
48+
},
49+
],
50+
51+
semi: ["error", "always"],
52+
"@typescript-eslint/no-non-null-assertion": 0,
53+
"no-useless-catch": 0,
54+
"@typescript-eslint/no-explicit-any": 0,
55+
"@typescript-eslint/no-non-null-asserted-optional-chain": 0,
56+
"no-case-declarations": 0,
57+
"@typescript-eslint/no-empty-interface": 0,
58+
"@typescript-eslint/no-empty-function": 0,
59+
"@typescript-eslint/no-empty-object-type": [
60+
"error",
61+
{ allowInterfaces: "with-single-extends" },
62+
],
63+
},
64+
},
65+
{
66+
// Checks importing of different files
67+
settings: {
68+
"import/parsers": {
69+
"@typescript-eslint/parser": [".ts", ".tsx"],
70+
},
71+
"import/resolver": {
72+
typescript: {
73+
alwaysTryTypes: true,
74+
project: "./",
75+
},
76+
},
77+
},
78+
}
79+
);

public/index.html renamed to index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
<html lang="en" dir="ltr">
33
<head>
44
<meta charset="utf-8" />
5-
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
5+
<link rel="icon" href="/favicon.ico" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<meta name="theme-color" content="#000000" />
88
<meta name="description" content="Web site created using create-react-app" />
9-
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
9+
<link rel="apple-touch-icon" href="/logo192.png" />
1010
<!--
1111
manifest.json provides metadata used when your web app is installed on a
1212
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
1313
-->
14-
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
14+
<link rel="manifest" href="/manifest.json" />
1515
<!--
16-
Notice the use of %PUBLIC_URL% in the tags above.
16+
Notice the use of in the tags above.
1717
It will be replaced with the URL of the `public` folder during the build.
1818
Only files inside the `public` folder can be referenced from the HTML.
1919
20-
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
20+
Unlike "/favicon.ico" or "favicon.ico", "/favicon.ico" will
2121
work correctly both with client-side routing and a non-root public URL.
2222
Learn how to configure a non-root public URL by running `npm run build`.
2323
-->
@@ -36,5 +36,6 @@
3636
To begin the development, run `npm start` or `yarn start`.
3737
To create a production bundle, use `npm run build` or `yarn build`.
3838
-->
39+
<script type="module" src="/src/index.tsx"></script>
3940
</body>
4041
</html>

jest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default {
126126
// setupFiles: [],
127127

128128
// A list of paths to modules that run some code to configure or set up the testing framework before each test
129-
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"],
129+
// setupFilesAfterEnv: [],
130130

131131
// The number of seconds after which a test is considered as slow and reported as such in the results.
132132
// slowTestThreshold: 5,

jest.setup.js

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

package.json

Lines changed: 64 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
{
22
"name": "@aldabil/react-scheduler",
3-
"version": "2.9.5",
3+
"version": "3.0.0",
44
"description": "React scheduler component based on Material-UI & date-fns",
55
"files": [
66
"*"
77
],
8+
"type": "module",
89
"scripts": {
9-
"start": "react-scripts start",
10-
"webpack": "webpack",
11-
"pack": "rm -rf dist && npm run webpack && npm run post:pack",
12-
"local:pack": "npm run pack && cd dist && npm pack && mv *.tgz ../",
13-
"post:pack": "node ./scripts/post-pack.js",
10+
"start": "vite serve",
11+
"build": "vite build --mode production",
12+
"postbuild": "node ./scripts/post-pack.js",
13+
"local:pack": "npm run build && cd dist && npm pack && mv *.tgz ../",
1414
"format": "prettier --check \"**/*.{js,jsx,ts,tsx,json}\"",
1515
"format:write": "prettier --write \"**/*.{js,jsx,ts,tsx,json}\"",
1616
"lint": "npm run types && eslint .",
@@ -22,6 +22,15 @@
2222
"test:watch": "jest --watch",
2323
"test:ci": "jest --ci"
2424
},
25+
"exports": {
26+
".": {
27+
"import": "./dist/index.js",
28+
"require": "./dist/index.umd.cjs"
29+
},
30+
"./types": {
31+
"import": "./dist/types.d.ts"
32+
}
33+
},
2534
"lint-staged": {
2635
"**/*.{ts,js,tsx,jsx}": [
2736
"npm run lint"
@@ -42,48 +51,62 @@
4251
],
4352
"author": "Aldabil",
4453
"license": "MIT",
45-
"homepage": "",
4654
"bugs": {
4755
"url": "https://github.com/aldabil21/react-scheduler/issues"
4856
},
4957
"devDependencies": {
50-
"@emotion/react": "^11.10.4",
51-
"@emotion/styled": "^11.10.4",
52-
"@mui/icons-material": "^5.10.6",
53-
"@mui/material": "^5.10.8",
54-
"@mui/x-date-pickers": "^6.19.0",
55-
"@testing-library/jest-dom": "^5.16.5",
56-
"@testing-library/react": "^13.4.0",
57-
"@testing-library/user-event": "^14.4.3",
58-
"@types/jest": "^27.0.2",
59-
"@types/react-dom": "^18.0.6",
60-
"@typescript-eslint/eslint-plugin": "^5.39.0",
61-
"@typescript-eslint/parser": "^5.39.0",
62-
"date-fns": "^3.2.0",
63-
"eslint": "^8.24.0",
64-
"eslint-plugin-react": "^7.31.8",
65-
"husky": "^8.0.0",
66-
"jest": "^29.1.2",
67-
"jest-environment-jsdom": "^29.1.2",
68-
"lint-staged": "^13.0.3",
69-
"prettier": "^2.7.1",
70-
"react": "^18.2.0",
71-
"react-dom": "^18.2.0",
72-
"react-scripts": "^5.0.1",
58+
"@emotion/react": "^11.14.0",
59+
"@emotion/styled": "^11.14.0",
60+
"@eslint/compat": "^1.2.6",
61+
"@eslint/eslintrc": "^3.2.0",
62+
"@eslint/js": "^9.20.0",
63+
"@mui/icons-material": ">=6.4.5",
64+
"@mui/material": ">=6.4.5",
65+
"@mui/x-date-pickers": ">=7.27.0",
66+
"@testing-library/dom": "^10.4.0",
67+
"@testing-library/jest-dom": "^6.6.3",
68+
"@testing-library/react": "^16.2.0",
69+
"@testing-library/user-event": "^14.6.1",
70+
"@types/jest": "^29.5.14",
71+
"@types/react": "^19.0.10",
72+
"@types/react-dom": "^19.0.4",
73+
"@typescript-eslint/parser": "^8.24.1",
74+
"@vitejs/plugin-react": "^4.3.4",
75+
"date-fns": ">=4.1.0",
76+
"eslint": "^9.20.1",
77+
"eslint-import-resolver-typescript": "^3.8.3",
78+
"eslint-plugin-import": "^2.31.0",
79+
"eslint-plugin-jsx-a11y": "^6.10.2",
80+
"eslint-plugin-promise": "^7.2.1",
81+
"eslint-plugin-react": "^7.37.4",
82+
"eslint-plugin-react-hooks": "^5.1.0",
83+
"eslint-plugin-react-refresh": "^0.4.19",
84+
"globals": "^16.0.0",
85+
"husky": "^9.1.7",
86+
"jest": "^29.7.0",
87+
"jest-environment-jsdom": "^29.7.0",
88+
"lint-staged": "^15.4.3",
89+
"prettier": "^3.5.1",
90+
"react": ">=19.0.0",
91+
"react-dom": "^19.0.0",
7392
"rrule": "^2.8.1",
74-
"ts-jest": "^29.0.3",
75-
"ts-loader": "^9.4.1",
76-
"ts-node": "^10.9.1",
77-
"typescript": "^4.8.4",
78-
"webpack-cli": "^4.7.0",
79-
"webpack-node-externals": "^3.0.0"
93+
"ts-jest": "^29.2.5",
94+
"ts-node": "^10.9.2",
95+
"typescript": "^5.7.3",
96+
"typescript-eslint": "^8.24.1",
97+
"vite": "^6.1.1",
98+
"vite-plugin-checker": "^0.9.0",
99+
"vite-plugin-dts": "^4.5.0",
100+
"vite-plugin-svgr": "^4.3.0",
101+
"vite-tsconfig-paths": "^5.1.4"
80102
},
81103
"peerDependencies": {
82-
"@mui/icons-material": ">=5.0.0",
83-
"@mui/material": ">=5.0.0",
84-
"@mui/x-date-pickers": ">=6.19.0",
85-
"date-fns": ">=3.2.0",
86-
"react": ">=17.0.0",
104+
"@mui/icons-material": ">=6.0.0",
105+
"@mui/material": ">=6.0.0",
106+
"@mui/x-date-pickers": ">=7.0.0",
107+
"date-fns": ">=4.0.0",
108+
"react": ">=18.0.0",
109+
"react-dom": ">=18.0.0",
87110
"rrule": ">=2.8.1"
88111
},
89112
"peerDependenciesMeta": {

0 commit comments

Comments
 (0)