react-diff-viewer-continued 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-diff-viewer-continued",
3
- "version": "4.0.0",
3
+ "version": "4.0.2",
4
4
  "private": false,
5
5
  "description": "Continuation of a simple and beautiful text diff viewer component made with diff and React",
6
6
  "keywords": [
@@ -19,76 +19,46 @@
19
19
  "Pranesh Ravi<praneshpranesh@gmail.com>",
20
20
  "Bart Riepe <bart@serial-experiments.com>"
21
21
  ],
22
- "main": "lib/index",
23
- "typings": "lib/index",
22
+ "main": "lib/cjs/src/index",
23
+ "module": "lib/esm/src/index",
24
+ "typings": "lib/cjs/src/index",
24
25
  "scripts": {
25
- "build": "tsc --outDir lib/",
26
- "build:examples": "webpack --progress",
27
- "build:watch": "tsc --outDir lib/ -w",
26
+ "build": "tsc --project tsconfig.json && tsc --project tsconfig.esm.json",
27
+ "build:examples": "vite build examples",
28
28
  "publish:examples": "NODE_ENV=production pnpm run build:examples && gh-pages -d examples/dist -r $GITHUB_REPO_URL",
29
29
  "publish:examples:local": "NODE_ENV=production pnpm run build:examples && gh-pages -d examples/dist",
30
- "start:examples": "webpack-dev-server --open --hot",
31
- "test": "jest ./test/**",
32
- "test:watch": "jest",
33
- "lint": "eslint src/ test/",
34
- "lint:fix": "eslint --fix src/ test/",
30
+ "start:examples": "vite examples",
31
+ "test": "vitest",
32
+ "lint": "biome lint src/ test/",
33
+ "lint:fix": "biome lint --apply-unsafe src/ test/",
35
34
  "prettier": "prettier --write ."
36
35
  },
37
36
  "dependencies": {
38
37
  "@emotion/css": "^11.11.2",
39
38
  "classnames": "^2.3.2",
40
- "diff": "^5.1.0",
41
- "memoize-one": "^6.0.0",
42
- "prop-types": "^15.8.1"
39
+ "diff": "^5.2.0",
40
+ "memoize-one": "^6.0.0"
43
41
  },
44
42
  "devDependencies": {
45
- "@babel/core": "^7.23.2",
46
- "@babel/preset-env": "^7.23.2",
47
- "@babel/preset-react": "^7.22.15",
48
- "@babel/preset-typescript": "^7.23.2",
43
+ "@biomejs/biome": "^1.5.3",
49
44
  "@semantic-release/changelog": "6.0.1",
50
45
  "@semantic-release/git": "10.0.1",
51
46
  "@testing-library/react": "^13.4.0",
52
47
  "@types/diff": "^5.0.6",
53
- "@types/expect": "^1.20.4",
54
- "@types/memoize-one": "^4.1.1",
55
- "@types/mocha": "^5.2.7",
56
- "@types/node": "^12.20.55",
57
- "@types/prop-types": "15.7.5",
58
- "@types/react": "^16.14.49",
59
- "@types/react-dom": "^16.9.20",
60
- "@types/webpack": "^4.41.34",
61
- "@typescript-eslint/eslint-plugin": "^5.62.0",
62
- "@typescript-eslint/parser": "^5.62.0",
63
- "css-loader": "^6.8.1",
64
- "eslint": "^8.51.0",
65
- "eslint-config-airbnb": "^19.0.4",
66
- "eslint-plugin-import": "^2.28.1",
67
- "eslint-plugin-jsx-a11y": "^6.7.1",
68
- "eslint-plugin-react": "^7.33.2",
69
- "eslint-plugin-react-hooks": "^4.6.0",
70
- "expect": "^28.1.3",
71
- "file-loader": "^6.2.0",
48
+ "@types/memoize-one": "^5.1.2",
49
+ "@types/node": "^20.11.17",
50
+ "@types/react": "^18.2.55",
51
+ "@types/react-dom": "^18.2.19",
72
52
  "gh-pages": "^4.0.0",
73
- "html-webpack-plugin": "^5.5.3",
74
- "jest": "^28.1.3",
75
- "jest-environment-jsdom": "^28.1.3",
76
- "mini-css-extract-plugin": "^2.7.6",
77
- "mocha": "^10.2.0",
78
- "prettier": "^2.8.8",
79
- "raw-loader": "^4.0.2",
53
+ "happy-dom": "^13.3.8",
80
54
  "react": "^18.2.0",
81
55
  "react-dom": "^18.2.0",
82
- "sass": "^1.69.3",
83
- "sass-loader": "^13.3.2",
56
+ "sass": "^1.70.0",
84
57
  "semantic-release": "^19.0.5",
85
- "spy": "^1.0.0",
86
- "ts-loader": "^9.5.0",
87
58
  "ts-node": "^10.9.1",
88
59
  "typescript": "^5.2.2",
89
- "webpack": "^5.89.0",
90
- "webpack-cli": "^4.10.0",
91
- "webpack-dev-server": "^4.15.1"
60
+ "vite": "^5.1.1",
61
+ "vitest": "^1.2.2"
92
62
  },
93
63
  "peerDependencies": {
94
64
  "react": "^15.3.0 || ^16.0.0 || ^17.0.0 || ^18.0.0",
@@ -0,0 +1,11 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "module": "esnext",
5
+ "target": "esnext",
6
+ "outDir": "lib/esm",
7
+ "declaration": false
8
+ },
9
+ "include": ["src/", "examples/"],
10
+ "exclude": ["node_modules"]
11
+ }
package/tsconfig.json CHANGED
@@ -6,11 +6,15 @@
6
6
  "moduleResolution": "node",
7
7
  "noImplicitAny": true,
8
8
  "esModuleInterop": true,
9
+ "isolatedModules": true,
10
+ "resolveJsonModule": true,
11
+ "skipLibCheck": true,
9
12
  "target": "es2015",
10
13
  "declaration": true,
11
14
  "downlevelIteration": true,
12
15
  "lib": ["es2017", "dom"],
13
- "types": ["jest", "node"]
16
+ "types": ["node"],
17
+ "outDir": "lib/cjs"
14
18
  },
15
19
  "include": ["src/", "examples/"],
16
20
  "exclude": ["node_modules"]
@@ -0,0 +1,5 @@
1
+ import { defineConfig } from 'vitest/config'
2
+
3
+ export default defineConfig({
4
+ environment: 'jsdom'
5
+ })
package/.eslintrc DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": ["airbnb-base", "plugin:@typescript-eslint/recommended"],
3
- "rules": {
4
- "@typescript-eslint/indent": ["error", 2],
5
- "arrow-body-style": "off",
6
- "import/extensions": "off"
7
- },
8
- "env": {
9
- "mocha": true,
10
- "node": true,
11
- "browser": true
12
- }
13
- }
@@ -1,25 +0,0 @@
1
- name: Test
2
- on:
3
- push:
4
- pull_request:
5
-
6
- jobs:
7
- release:
8
- name: Unit tests
9
- runs-on: ubuntu-latest
10
- steps:
11
- - name: Checkout
12
- uses: actions/checkout@v3
13
- with:
14
- fetch-depth: 0
15
- - name: Setup Node.js
16
- uses: actions/setup-node@v3
17
- with:
18
- node-version: 'lts/*'
19
- - uses: pnpm/action-setup@v2.2.4
20
- with:
21
- version: latest
22
- - name: Install dependencies
23
- run: pnpm i
24
- - name: Run unit tests
25
- run: pnpm run test
package/.prettierrc DELETED
@@ -1,4 +0,0 @@
1
- {
2
- "singleQuote": true,
3
- "trailingComma": "all"
4
- }
package/jest.config.js DELETED
@@ -1,5 +0,0 @@
1
- const config = {
2
- testEnvironment: 'jsdom',
3
- };
4
-
5
- module.exports = config;
package/webpack.config.js DELETED
@@ -1,60 +0,0 @@
1
- const path = require('path');
2
- const HtmlWebpackPlugin = require('html-webpack-plugin');
3
- const Css = require('mini-css-extract-plugin');
4
-
5
- module.exports = {
6
- entry: {
7
- main: './examples/src/index.tsx',
8
- },
9
- mode: process.env.NODE_ENV === 'production' ? 'production' : 'development',
10
- resolve: {
11
- extensions: ['.jsx', '.tsx', '.ts', '.scss', '.css', '.js'],
12
- },
13
- output: {
14
- path: path.resolve(__dirname, 'examples/dist'),
15
- filename: '[name].js',
16
- },
17
- devServer: {
18
- static: {
19
- directory: path.resolve(__dirname, 'examples/dist'),
20
- },
21
- port: 8000,
22
- hot: true,
23
- },
24
- module: {
25
- rules: [
26
- {
27
- test: /\.tsx?$/,
28
- use: [
29
- {
30
- loader: 'ts-loader',
31
- options: {
32
- configFile: 'tsconfig.json',
33
- },
34
- },
35
- ],
36
- exclude: /node_modules/,
37
- },
38
- {
39
- test: /\.s?css$/,
40
- use: [Css.loader, 'css-loader', 'sass-loader'],
41
- },
42
- {
43
- test: /\.xml|.rjs|.java/,
44
- use: 'raw-loader',
45
- },
46
- {
47
- test: /\.svg|.png/,
48
- use: 'file-loader',
49
- },
50
- ],
51
- },
52
- plugins: [
53
- new HtmlWebpackPlugin({
54
- template: './examples/src/index.ejs',
55
- }),
56
- new Css({
57
- filename: 'main.css',
58
- }),
59
- ],
60
- };