Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump-dependencies #378

Merged
merged 3 commits into from
Apr 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
types/*
dist
1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"extends": ["standard", "eslint-config-standard-jsx", "prettier"],
"parser": "babel-eslint",
"plugins": ["react-hooks", "prettier"],
"rules": {
"react-hooks/rules-of-hooks": "error",
Expand Down
2 changes: 2 additions & 0 deletions __setups__/scroll.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/* eslint-env jest */
import {jest} from '@jest/globals'

Object.defineProperty(window, 'scrollTo', { value: jest.fn(), writable: true })
10 changes: 10 additions & 0 deletions __setups__/supress-warnings.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
const originalConsoleWarn = console.warn

console.warn = (...args) => {
if (
args[0] === 'Camera is not allowed for HTTP. Please use HTTPS connection.'
) {
return
}
originalConsoleWarn(...args)
}
9,634 changes: 5,247 additions & 4,387 deletions package-lock.json

Large diffs are not rendered by default.

89 changes: 40 additions & 49 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"prepublishOnly": "npm run clean && npm run build",
"test:dev": "jest",
"format": "prettier --write \"./src/**/*.js\" \"./test/**/*.js\" rollup.config.js",
"test": "npm run lint:js && npm run lint:types && jest",
"test": "npm run lint:js && npm run lint:types && node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
"release:prepare": "shipjs prepare",
"release:trigger": "shipjs trigger"
},
Expand Down Expand Up @@ -96,80 +96,71 @@
},
"homepage": "https://github.com/uploadcare/react-widget",
"dependencies": {
"@types/jquery": "^3.5.14",
"@types/jquery": "^3.5.16",
"@types/jquery-deferred": "^0.3.0",
"@uploadcare/client-suspense": "^1.1.0",
"react-fast-compare": "^3.2.0",
"react-fast-compare": "^3.2.1",
"uploadcare-widget": "^3.21.0"
},
"peerDependencies": {
"react": "^16.10.2 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.10.2 || ^17.0.0 || ^18.0.0"
},
"devDependencies": {
"@babel/cli": "7.17.6",
"@babel/core": "^7.17.9",
"@babel/plugin-transform-modules-commonjs": "^7.17.9",
"@babel/preset-env": "7.16.11",
"@babel/preset-react": "7.16.7",
"@rollup/plugin-commonjs": "22.0.0",
"@rollup/plugin-replace": "4.0.0",
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "13.1.1",
"@types/node": "^18.11.9",
"@types/react": "18.0.21",
"@types/react-dom": "18.0.6",
"@babel/cli": "7.21.0",
"@babel/core": "^7.21.4",
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
"@babel/plugin-transform-runtime": "^7.21.4",
"@babel/preset-env": "7.21.4",
"@babel/preset-react": "7.18.6",
"@rollup/plugin-babel": "^6.0.3",
"@rollup/plugin-commonjs": "24.1.0",
"@rollup/plugin-replace": "^5.0.2",
"@rollup/plugin-terser": "^0.4.1",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "14.0.0",
"@types/node": "^18.15.11",
"@types/react": "18.0.35",
"@types/react-dom": "18.0.11",
"babel-eslint": "10.1.0",
"babel-jest": "^28.0.3",
"babel-jest": "^29.5.0",
"babel-plugin-annotate-pure-calls": "0.4.0",
"dtslint": "4.2.1",
"eslint": "7.23.0",
"eslint-config-prettier": "8.1.0",
"eslint-config-standard": "16.0.2",
"eslint-config-standard-jsx": "10.0.0",
"eslint-plugin-import": "2.22.1",
"eslint": "8.38.0",
"eslint-config-prettier": "8.8.0",
"eslint-config-standard": "17.0.0",
"eslint-config-standard-jsx": "11.0.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "3.3.1",
"eslint-plugin-promise": "4.3.1",
"eslint-plugin-react": "7.29.4",
"eslint-plugin-react-hooks": "4.5.0",
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.32.2",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-standard": "4.1.0",
"jest": "28.0.3",
"jest-canvas-mock": "2.4.0",
"jest-environment-jsdom": "^28.0.2",
"jest": "29.5.0",
"jest-canvas-mock": "2.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-esm-jsx-transform": "1.0.0",
"parcel-bundler": "1.12.5",
"prettier": "2.2.1",
"react": "18.1.0",
"react-dom": "18.1.0",
"rimraf": "3.0.2",
"rollup": "2.70.2",
"rollup-plugin-babel": "4.4.0",
"prettier": "2.8.7",
"react": "18.2.0",
"react-dom": "18.2.0",
"rimraf": "5.0.0",
"rollup": "3.20.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-module-replacement": "1.2.1",
"rollup-plugin-terser": "7.0.2",
"shipjs": "0.24.4",
"typescript": "4.8.3",
"shipjs": "0.26.3",
"typescript": "5.0.4",
"uploadcare-widget-tab-effects": "1.6.0"
},
"jest": {
"testEnvironment": "jsdom",
"setupFiles": [
"./__setups__/supress-warnings.js",
"./__setups__/scroll.js",
"jest-canvas-mock"
],
"testMatch": [
"**/test/**/*.js"
],
"transform": {
"\\.js$": [
"babel-jest",
{
"plugins": [
"@babel/plugin-transform-modules-commonjs"
]
}
]
}
]
}
}
17 changes: 6 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import babel from 'rollup-plugin-babel'
import { babel } from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import replace from '@rollup/plugin-replace'
import replacement from 'rollup-plugin-module-replacement'
import { terser } from 'rollup-plugin-terser'
import terser from '@rollup/plugin-terser'
import copy from 'rollup-plugin-copy'

import replacement from 'rollup-plugin-module-replacement'
import uploadcare from 'uploadcare-widget'

const bundleConfig = ({ format, dir, minify, widgetBundle }) => {
Expand All @@ -13,12 +12,7 @@ const bundleConfig = ({ format, dir, minify, widgetBundle }) => {

return {
input: 'src/index.js',
external: [
'react',
'react-fast-compare',
'uploadcare-widget',
'@uploadcare/client-suspense'
],
external: ['react', 'react-fast-compare', 'uploadcare-widget'],
output: {
entryFileNames: `[name].${bundleExtension}`,
chunkFileNames: `[name]-[hash].${bundleExtension}`,
Expand All @@ -42,7 +36,8 @@ const bundleConfig = ({ format, dir, minify, widgetBundle }) => {
}),
babel({
exclude: 'node_modules/**',
presets: [['@babel/env', { modules: false }]]
presets: [['@babel/env', { modules: false }]],
babelHelpers: 'bundled'
}),
minify && terser(),
copy({
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React, { forwardRef } from 'react'
import { lazy, Suspense } from '@uploadcare/client-suspense'
import React, { forwardRef, lazy, Suspense } from 'react'
import { useIsomorphicEffect } from './hooks'

const Uploader = lazy(() =>
Expand Down
8 changes: 4 additions & 4 deletions test/locale.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-env jest */
import React from 'react'
import '@testing-library/jest-dom/extend-expect'
import {
render,
fireEvent,
getByText,
getByTitle,
fireEvent,
render,
waitFor
} from '@testing-library/react'
import '@testing-library/jest-dom/extend-expect'
import React from 'react'

import Uploader from '../src/uploader'

Expand Down