Skip to content

Commit

Permalink
chore: fix deps for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ilfa committed Jan 26, 2024
1 parent dcd800c commit 2206d67
Show file tree
Hide file tree
Showing 11 changed files with 1,027 additions and 2,028 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
module.exports = {
ignorePatterns: ['dist/', 'build/'],
extends: [
'next/core-web-vitals',
'@fingerprintjs/eslint-config-dx-team',
Expand Down
14 changes: 3 additions & 11 deletions examples/create-react-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,13 @@
"private": true,
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react": "workspace:*",
"@testing-library/jest-dom": "^5.14.1",
"@testing-library/react": "^12.0.0",
"@testing-library/react-hooks": "^7.0.2",
"@testing-library/user-event": "^13.2.1",
"@types/jest": "^27.0.1",
"@types/node": "^16.7.13",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"react-router-dom": "^6.2.1",
"react-scripts": "5.0.1",
"typescript": "^4.4.2"
"react-scripts": "5.0.1"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
"react-dom": "*",
"typescript": "*"
},
"scripts": {
"start": "PORT=3001 DISABLE_ESLINT_PLUGIN=true react-scripts start",
Expand Down
3 changes: 0 additions & 3 deletions examples/next-appDir/next.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
experimental: {
appDir: true,
},
}

module.exports = nextConfig
14 changes: 6 additions & 8 deletions examples/next-appDir/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,14 @@
},
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react": "workspace:*",
"next": "13.1.6"
"next": "14.1.0"
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
},
"devDependencies": {
"@types/node": "18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"typescript": "4.9.5"
"react-dom": "*",
"@types/node": "*",
"@types/react": "*",
"@types/react-dom": "*",
"typescript": "*"
}
}
12 changes: 5 additions & 7 deletions examples/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
},
"peerDependencies": {
"react": "*",
"react-dom": "*"
},
"devDependencies": {
"@types/node": "18.11.18",
"@types/react": "^18.0.27",
"@types/react-dom": "^18.0.10",
"typescript": "4.9.5"
"react-dom": "*",
"@types/node": "*",
"@types/react": "*",
"@types/react-dom": "*",
"typescript": "*"
}
}
45 changes: 12 additions & 33 deletions examples/preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,42 +9,21 @@
"dev": "preact watch --no-sw",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'"
},
"eslintConfig": {
"parser": "@typescript-eslint/parser",
"extends": [
"preact",
"plugin:@typescript-eslint/recommended"
],
"ignorePatterns": [
"build/"
]
},
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react": "workspace:*",
"preact": "^10.3.1",
"preact-render-to-string": "^5.1.4"
"preact": "10.19.3",
"preact-render-to-string": "^6.3.1"
},
"devDependencies": {
"@types/enzyme": "^3.10.5",
"@types/jest": "^26.0.8",
"@typescript-eslint/eslint-plugin": "^2.25.0",
"@typescript-eslint/parser": "^2.25.0",
"dotenv": "^16.0.1",
"enzyme": "^3.11.0",
"enzyme-adapter-preact-pure": "^3.1.0",
"eslint": "^6.8.0",
"eslint-config-preact": "^1.1.1",
"jest": "^27.2.5",
"jest-preset-preact": "^4.0.2",
"preact-cli": "^3.0.0",
"sirv-cli": "^1.0.0-next.3",
"typescript": "^4.5.2"
"peerDependencies": {
"@typescript-eslint/eslint-plugin": "*",
"@typescript-eslint/parser": "*",
"eslint": "*",
"eslint-config-preact": "*",
"typescript": "*"
},
"jest": {
"preset": "jest-preset-preact",
"setupFiles": [
"<rootDir>/tests/__mocks__/browserMocks.ts",
"<rootDir>/tests/__mocks__/setupTests.ts"
]
"devDependencies": {
"dotenv": "^16.4.1",
"preact-cli": "^3.5.0",
"sirv-cli": "^2.0.2"
}
}
6 changes: 3 additions & 3 deletions examples/preact/src/components/app.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { FunctionalComponent, h } from 'preact'
import { FunctionalComponent } from 'preact'
import { useVisitorData } from '@fingerprintjs/fingerprintjs-pro-react'
import { useState } from 'preact/hooks'
import { TargetedEvent } from 'preact/compat'
import { JSX } from 'preact/compat'

const App: FunctionalComponent = () => {
const [extendedResult, updateExtendedResult] = useState(false)
Expand All @@ -11,7 +11,7 @@ const App: FunctionalComponent = () => {
getData({ ignoreCache: true })
}

const onChangeExtendedResult = (e: TargetedEvent<HTMLInputElement, Event>): void => {
const onChangeExtendedResult = (e: JSX.TargetedEvent<HTMLInputElement, Event>): void => {
updateExtendedResult((e.target as HTMLInputElement).checked)
}

Expand Down
2 changes: 1 addition & 1 deletion examples/preact/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FunctionalComponent, h } from 'preact'
import { FunctionalComponent } from 'preact'
import './style/index.css'
import App from './components/app'
import { FpjsProvider } from '@fingerprintjs/fingerprintjs-pro-react'
Expand Down
11 changes: 8 additions & 3 deletions examples/preact/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"compilerOptions": {
"paths": {
"react": ["./node_modules/preact/compat/"],
"react-dom": ["./node_modules/preact/compat/"]
},
/* Basic Options */
"target": "ES5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'. */
"module": "ESNext", /* Specify module code generation: 'none', commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation: */
"allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */
"jsxFragmentFactory": "Fragment", /* Specify the JSX fragment factory function to use when targeting react JSX emit with jsxFactory compiler option is specified, e.g. Fragment. */
"jsx": "react-jsx", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
"jsxImportSource": "preact",
// "jsxFactory": "h", /* Specify the JSX factory function to use when targeting react JSX emit, e.g. React.createElement or h. */
// "jsxFragmentFactory": "Fragment", /* Specify the JSX fragment factory function to use when targeting react JSX emit with jsxFactory compiler option is specified, e.g. Fragment. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
Expand Down
16 changes: 8 additions & 8 deletions examples/webpack-based/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
"build": "webpack"
},
"devDependencies": {
"@babel/core": "^7.21.0",
"@babel/preset-env": "^7.20.2",
"@babel/preset-react": "^7.18.6",
"babel-loader": "^9.1.2",
"@babel/core": "^7.23.9",
"@babel/preset-env": "^7.23.9",
"@babel/preset-react": "^7.23.3",
"babel-loader": "^9.1.3",
"dotenv-webpack": "^8.0.1",
"html-webpack-plugin": "^5.5.0",
"webpack": "^5.76.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.11.1"
"html-webpack-plugin": "^5.6.0",
"webpack": "^5.90.0",
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^4.15.1"
},
"dependencies": {
"@fingerprintjs/fingerprintjs-pro-react": "workspace:*"
Expand Down
Loading

0 comments on commit 2206d67

Please sign in to comment.