Skip to content

Commit 6b75e81

Browse files
authored
Update spectacle dependencies (#1241)
* chore: one stage of installing dependencies * chore: more updates * chore: more dependency changes * chore: even more package updates * chore: update history * chore: update react-spring and others * chore: update react-swipeable * chore: update use-resize-observer * chore: revert the local dependency notation
1 parent bffe055 commit 6b75e81

File tree

8 files changed

+2527
-1067
lines changed

8 files changed

+2527
-1067
lines changed

package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
11
{
22
"name": "spectacle-monorepo",
33
"devDependencies": {
4-
"@babel/cli": "^7.12.8",
5-
"@babel/core": "^7.17.2",
4+
"@babel/cli": "^7.19.3",
5+
"@babel/core": "^7.19.3",
66
"@babel/plugin-proposal-class-properties": "^7.12.1",
77
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
8-
"@babel/preset-env": "^7.12.7",
8+
"@babel/preset-env": "^7.19.3",
99
"@babel/preset-react": "^7.16.7",
1010
"@babel/preset-typescript": "^7.16.0",
11-
"@changesets/cli": "^2.23.1",
11+
"@changesets/cli": "^2.24.4",
1212
"@svitejs/changesets-changelog-github-compact": "^0.1.1",
1313
"@testing-library/jest-dom": "^5.16.4",
1414
"@testing-library/react": "^13.3.0",
15-
"@types/jest": "^27.5.2",
15+
"@types/jest": "^29.1.1",
1616
"@types/testing-library__jest-dom": "^5.14.5",
17-
"@typescript-eslint/eslint-plugin": "^5.4.0",
18-
"@typescript-eslint/parser": "^5.4.0",
19-
"babel-eslint": "^10.1.0",
17+
"@typescript-eslint/eslint-plugin": "^5.38.1",
18+
"@typescript-eslint/parser": "^5.38.1",
2019
"babel-loader": "^8.0.6",
2120
"babel-plugin-transform-jsx-to-htm": "^2.0.0",
22-
"concurrently": "^7.3.0",
21+
"concurrently": "^7.4.0",
2322
"cross-env": "^7.0.3",
24-
"eslint": "^8.2.0",
23+
"eslint": "^8.24.0",
2524
"eslint-config-prettier": "^8.3.0",
26-
"eslint-plugin-react": "^7.27.0",
27-
"eslint-plugin-prettier": "^3.3.1",
25+
"eslint-plugin-prettier": "^4.2.1",
26+
"eslint-plugin-react": "^7.31.8",
2827
"eslint-plugin-react-hooks": "^4.3.0",
2928
"html-webpack-plugin": "^5.5.0",
30-
"jest": "^28.1.3",
31-
"jest-environment-jsdom": "^28.1.3",
29+
"jest": "^29.1.2",
30+
"jest-environment-jsdom": "^29.1.2",
3231
"jest-puppeteer": "^6.1.1",
3332
"mkdirp": "^1.0.4",
3433
"nps": "^5.10.0",
3534
"prettier": "^2.4.1",
36-
"puppeteer": "^16.0.0",
35+
"puppeteer": "^18.0.5",
3736
"raw-loader": "^4.0.0",
3837
"rimraf": "^3.0.0",
3938
"serve": "^14.0.1",
40-
"ts-jest": "^28.0.7",
41-
"typescript": "^4.7.4",
39+
"ts-jest": "^29.0.3",
40+
"typescript": "^4.8.4",
4241
"wait-on": "^6.0.1",
4342
"webpack": "^5.68.0",
4443
"webpack-cli": "^4.10.0",
45-
"webpack-dev-server": "^4.7.4",
46-
"wireit": "^0.7.1"
44+
"webpack-dev-server": "^4.11.1",
45+
"wireit": "^0.7.2"
4746
},
4847
"pnpm": {
4948
"neverBuiltDependencies": [

packages/create-spectacle/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"devDependencies": {
2626
"@types/node": "^18.0.3",
2727
"@types/prompts": "^2.0.14",
28-
"spectacle": "workspace:*"
28+
"spectacle": "*"
2929
},
3030
"resolutions": {},
3131
"scripts": {

packages/spectacle/package.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,45 +18,44 @@
1818
},
1919
"browserslist": "> 0.25%, not dead",
2020
"dependencies": {
21-
"broadcast-channel": "^3.2.0",
22-
"history": "^4.9.0",
21+
"broadcast-channel": "^4.17.0",
22+
"history": "^5.3.0",
2323
"kbar": "0.1.0-beta.36",
2424
"mdast-builder": "^1.1.1",
2525
"mdast-zone": "^4.0.0",
2626
"merge-anything": "^3.0.3",
2727
"mousetrap": "^1.6.5",
28-
"query-string": "^6.8.2",
28+
"query-string": "^7.1.1",
2929
"react-fast-compare": "^3.2.0",
3030
"react-is": "^18.1.0",
31-
"react-spring": "^8.0.25",
32-
"react-swipeable": "^6.1.0",
31+
"react-spring": "^9.5.5",
32+
"react-swipeable": "^7.0.0",
3333
"react-syntax-highlighter": "^15.5.0",
3434
"rehype-raw": "^5.1.0",
3535
"rehype-react": "^6.0.0",
3636
"remark-parse": "^8.0.3",
3737
"remark-rehype": "^7.0.0",
38-
"styled-components": "^4.3.2",
38+
"styled-components": "^5.3.6",
3939
"styled-system": "5.1.5",
4040
"ulid": "^2.3.0",
4141
"unified": "^9.0.0",
4242
"unist-util-visit": "^2.0.3",
43-
"use-resize-observer": "^6.1.0"
43+
"use-resize-observer": "^9.0.2"
4444
},
4545
"peerDependencies": {
4646
"react": ">=17.0.2",
4747
"react-dom": ">=17.0.2"
4848
},
4949
"devDependencies": {
50-
"@types/history": "^4.7.9",
5150
"@types/mousetrap": "^1.6.8",
52-
"@types/react": "^18.0.12",
51+
"@types/react": "^18.0.21",
5352
"@types/react-dom": "^18.0.5",
5453
"@types/react-is": "^17.0.3",
55-
"@types/react-syntax-highlighter": "^15.5.2",
54+
"@types/react-syntax-highlighter": "^15.5.5",
5655
"@types/styled-components": "^5.1.15",
5756
"@types/styled-system": "^5.1.5",
5857
"@types/unist": "^2.0.6",
59-
"csstype": "^3.1.0",
58+
"csstype": "^3.1.1",
6059
"process": "^0.11.10",
6160
"react": "^18.1.0",
6261
"react-dom": "^18.1.0"

packages/spectacle/src/components/appear.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,19 @@ const SteppedComponent = (props: SteppedComponentProps): JSX.Element => {
4242
}
4343

4444
const springStyle = useSpring({
45-
to: isActive ? activeStyle : inactiveStyle,
45+
to: (isActive ? activeStyle : inactiveStyle) as React.CSSProperties,
4646
immediate
4747
});
4848

4949
return (
5050
<>
5151
{placeholder}
5252
<AnimatedEl
53-
style={alwaysAppearActive ? activeStyle : springStyle}
53+
style={
54+
alwaysAppearActive
55+
? (activeStyle as React.CSSProperties)
56+
: springStyle
57+
}
5458
className={className}
5559
data-testid="AppearElement"
5660
>

packages/spectacle/src/components/deck/default-deck.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ const DefaultDeck = (props: DefaultDeckProps): JSX.Element => {
7575
);
7676

7777
const onMobileSlide: DeckInternalProps['onMobileSlide'] = (e) => {
78-
if (navigator.maxTouchPoints < 1) return;
78+
if (navigator.maxTouchPoints < 1 || !deck.current) return;
7979
switch (e.dir) {
8080
case 'Left':
81-
deck.current!.stepForward();
81+
deck.current.stepForward();
8282
break;
8383
case 'Right':
84-
deck.current!.regressSlide();
84+
deck.current.regressSlide();
8585
break;
8686
}
8787
};

packages/spectacle/src/components/markdown/markdown.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,9 @@ export const Markdown = forwardRef<HTMLDivElement, MarkdownProps>(
209209
}
210210
);
211211

212-
type PropsFrom<T extends ElementType> = T extends ElementType<infer Props>
213-
? Props
214-
: never;
215-
216-
const AppearingListItem = (props: PropsFrom<typeof ListItem>) => (
212+
const AppearingListItem = (
213+
props: React.ComponentPropsWithoutRef<typeof ListItem>
214+
) => (
217215
<Appear>
218216
<ListItem {...props} />
219217
</Appear>

packages/spectacle/src/hooks/use-location-sync.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function useLocationSync({
6161
// "down-sync" from location to state
6262
useEffect(() => {
6363
if (!initialized && disableInteractivity) return;
64-
return history.listen((location) => {
64+
return history.listen(({ location }) => {
6565
setState(mapLocationToState(location));
6666
});
6767
}, [

0 commit comments

Comments
 (0)