Skip to content

Commit

Permalink
chore: update to latest dependencies + any fixups required
Browse files Browse the repository at this point in the history
  • Loading branch information
LouisBrunner committed Jun 7, 2023
1 parent 57e8221 commit 813acb8
Show file tree
Hide file tree
Showing 12 changed files with 15,320 additions and 11,828 deletions.
10 changes: 7 additions & 3 deletions esbuild/dev.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
import esbuild from 'esbuild';
import {examples} from './config.js';

esbuild.serve({
const context = await esbuild.context({
...examples,
outdir: 'examples/',
});

const server = await context.serve({
servedir: 'examples/',
port: 4001,
}, examples).then((server) => {
console.log(`Server available at http://${server.host}:${server.port}`);
});
console.log(`Server available at http://${server.host}:${server.port}`);
27,056 changes: 15,259 additions & 11,797 deletions package-lock.json

Large diffs are not rendered by default.

42 changes: 23 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"npm" : ">=7.0.0",
"node" : ">=15.0.0"
},
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/LouisBrunner"
},
"scripts": {
"clean": "rm -rf packages/*/dist examples/*.js coverage",
"build:types": "lerna exec -- tsc -p ./tsconfig.json --declarationDir dist",
Expand All @@ -26,26 +30,26 @@
"prepare": "npm run clean && npm run build && npm run lint && npm run test"
},
"devDependencies": {
"@babel/preset-typescript": "^7.18.6",
"@babel/preset-typescript": "^7.21.5",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/jsdom": "^20.0.1",
"@types/react-dom": "^18.0.9",
"@typescript-eslint/eslint-plugin": "^5.46.0",
"@typescript-eslint/parser": "^5.46.0",
"esbuild": "^0.15",
"@testing-library/react": "^14.0.0",
"@types/jsdom": "^21.1.1",
"@types/react-dom": "^18.2.4",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"esbuild": "^0.17",
"esbuild-jest": "^0.5.0",
"esbuild-node-externals": "^1.5.0",
"eslint": "^8.29.0",
"eslint-plugin-compat": "^4.0.2",
"eslint-plugin-jest": "^27.1.6",
"eslint-plugin-jest-dom": "^4.0.3",
"eslint-plugin-react": "^7.31.11",
"eslint-plugin-testing-library": "^5.9.1",
"jest": "^29.3.1",
"jest-environment-jsdom": "^29.3.1",
"jest-runner-eslint": "^1.1.0",
"lerna": "^6.1.0",
"esbuild-node-externals": "^1.7.0",
"eslint": "^8.42.0",
"eslint-plugin-compat": "^4.1.4",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-jest-dom": "^5.0.1",
"eslint-plugin-react": "^7.32.2",
"eslint-plugin-testing-library": "^5.11.0",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-runner-eslint": "^2.1.0",
"lerna": "^6.6.2",
"node-notifier": "^10.0.1",
"react": "^18.2.0",
"react-dnd": "^16.0.1",
Expand All @@ -54,7 +58,7 @@
"react-dnd-test-utils": "^16.0.1",
"react-dnd-touch-backend": "^16.0.1",
"react-dom": "^18.2.0",
"typescript": "^4.9.4"
"typescript": "^5.1.3"
},
"workspaces": [
"./packages/*"
Expand Down
4 changes: 4 additions & 0 deletions packages/dnd-multi-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"backend",
"multi"
],
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/LouisBrunner"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions packages/rdndmb-html5-to-touch/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
"react-dnd",
"react-dnd-multi-backend"
],
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/LouisBrunner"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 4 additions & 0 deletions packages/react-dnd-multi-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"touch",
"react-dnd"
],
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/LouisBrunner"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,19 @@ describe('Preview component', () => {
expectNull()
}

await act(() => {
await act<void>(() => {
backend.previewEnabled.mockReturnValue(true)
getLastRegister().backendChanged(backend)
})
expectNotNull()

// No notification, no change
await act(() => {
await act<void>(() => {
backend.previewEnabled.mockReturnValue(false)
})
expectNotNull()

await act(() => {
await act<void>(() => {
getLastRegister().backendChanged(backend)
})
expectNull()
Expand Down Expand Up @@ -128,7 +128,7 @@ describe('Preview component', () => {

test('portal is in detached div', async () => {
render(<Component generator={Simple} />)
await act(() => {
await act<void>(() => {
backend.previewEnabled.mockReturnValue(true)
getLastRegister().backendChanged(backend)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,14 @@ describe('useMultiDrag component', () => {

test('fails without a context', () => {
let err
const spy = jest.spyOn(console, 'error')
spy.mockImplementation(() => {})
try {
renderHook(MultiAction)
} catch (e) {
err = e
} finally {
spy.mockRestore()
expect(err).toEqual(expect.any(Error))
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ describe('useMultiDrop component', () => {

test('fails without a context', () => {
let err
const spy = jest.spyOn(console, 'error')
spy.mockImplementation(() => {})
try {
renderHook(MultiAction)
} catch (e) {
err = e
} finally {
spy.mockRestore()
expect(err).toEqual(expect.any(Error))
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,19 @@ describe('usePreview component', () => {
expectNull()
}

await act(() => {
await act<void>(() => {
backend.previewEnabled.mockReturnValue(true)
getLastRegister().backendChanged(backend)
})
expectNotNull()

// No notification, no change
await act(() => {
await act<void>(() => {
backend.previewEnabled.mockReturnValue(false)
})
expectNotNull()

await act(() => {
await act<void>(() => {
getLastRegister().backendChanged(backend)
})
expectNull()
Expand Down
4 changes: 4 additions & 0 deletions packages/react-dnd-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"react-dnd",
"preview"
],
"funding": {
"type": "individual",
"url": "https://github.com/sponsors/LouisBrunner"
},
"type": "module",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dnd-preview/src/__tests__/usePreview.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ describe('usePreview hook', () => {
transform: 'translate(1.0px, 2.0px)',
},
})
await act(() => {
await act<void>(() => {
// FIXME: not great...
(ref as MutableRefObject<HTMLDivElement>).current = {
...document.createElement('div'),
Expand Down Expand Up @@ -163,7 +163,7 @@ describe('usePreview hook', () => {
transform: 'translate(0.0px, 1.0px)',
},
})
await act(() => {
await act<void>(() => {
// FIXME: not great...
(ref as MutableRefObject<HTMLDivElement>).current = {
...document.createElement('div'),
Expand Down

0 comments on commit 813acb8

Please sign in to comment.