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

Use JSDOM alternative for deploying to Vercel #95

Draft
wants to merge 62 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 59 commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
5360fc9
Update next
Josehower Jun 19, 2023
896f69e
Remove Fly deploy
Josehower Jun 19, 2023
99f045e
Configure for railway
Josehower Jun 19, 2023
21cfc53
Update webpack config
Josehower Jun 20, 2023
5513174
Use canvas externals in webpack
Josehower Jun 20, 2023
73f34ad
Use ENV variable from vercel
Josehower Jun 20, 2023
9e70757
Use ligth JSDOM lib
Josehower Jun 20, 2023
4074dd3
Update lock
Josehower Jun 20, 2023
fe22997
Remove extra webpack config
Josehower Jun 20, 2023
d90acd5
Add vercel fix suggestion
Josehower Jun 20, 2023
af6f979
Update to use different canvas
Josehower Jun 20, 2023
dd55c34
Use different dom lib
Josehower Jun 20, 2023
281ba8f
Remove canvas
Josehower Jun 20, 2023
d9ebf98
Use new JSDOM lib
Josehower Jun 20, 2023
aa1c96e
Update to trigger deploy
Josehower Jun 20, 2023
61d93f6
Use ESM
Josehower Jun 22, 2023
27a6367
Use ESM
Josehower Jun 26, 2023
f900e10
Update object
Josehower Jun 26, 2023
8b14159
Update ssl
Josehower Jun 26, 2023
53e81a3
Use default export
Josehower Jun 26, 2023
25bb8b5
Update next
Josehower Jun 27, 2023
fd69555
Remove Fly deploy
Josehower Jun 19, 2023
a8482d9
Configure for railway
Josehower Jun 19, 2023
f8e9a7f
Update sass
Josehower Jun 27, 2023
afc6f2f
Update dependencies
Josehower Jun 27, 2023
b2957c1
Update lock
Josehower Jun 27, 2023
3fc307f
Merge branch 'main' into vercel-deploy
Josehower Jun 27, 2023
7f9e56a
Delete ley.config.js
karlhorky Jun 27, 2023
33c31b6
Update types
Josehower Jun 27, 2023
2331a16
Add generic
Josehower Jun 27, 2023
d829dae
Add types
Josehower Jun 27, 2023
7bd396a
Discard changes to ...rkflows/lint-check-types-build-deploy.yml
karlhorky Jun 30, 2023
9828dd4
Update lint-check-types-build-deploy.yml
karlhorky Jun 30, 2023
392d455
Discard changes to ...rkflows/lint-check-types-build-deploy.yml
karlhorky Jun 30, 2023
21cafe0
Create lint-check-types-build-deploy.yml
karlhorky Jun 30, 2023
7c01333
Discard changes to scripts/fly-io-start.sh
karlhorky Jun 30, 2023
e30ad76
Update next.config.js
karlhorky Jun 30, 2023
c5ffe0f
Add back deleted file
karlhorky Jun 30, 2023
51ea59d
Update config file to work
Josehower Jun 30, 2023
76e8678
Update dependency upgrades - non-major (#97)
Josehower Jun 30, 2023
2071c6f
Update dependency eslint-config-upleveled to v5 (#98)
renovate[bot] Jun 30, 2023
2e35968
Enable deployment to both Fly and Vercel (#96)
Josehower Jun 30, 2023
d0a3fff
Remove Fly deploy
Josehower Jun 30, 2023
c75a75f
Configure for railway
Josehower Jun 19, 2023
5933f1e
Use ligth JSDOM lib
Josehower Jun 20, 2023
0894cc2
Update object
Josehower Jun 26, 2023
19c51b6
Update ssl
Josehower Jun 26, 2023
d3d60bc
Add back removed deploy step
karlhorky Jun 30, 2023
32f0518
Rename lint-check-types-build.yml to lint-check-types-build-deploy.yml
karlhorky Jun 30, 2023
5c96612
Create fly-io-start.sh
karlhorky Jun 30, 2023
fe782aa
Create fly.toml
karlhorky Jun 30, 2023
e661e69
Fix dockerfile
Josehower Jun 30, 2023
afc7e2b
Delete ley.config.js
karlhorky Jun 30, 2023
b5b186c
Update connect
Josehower Jun 30, 2023
bc86540
Merge branch 'main' into vercel-deploy
Josehower Jun 30, 2023
181b96b
Update lock
Josehower Jun 30, 2023
c39d258
Use Boolean constructor instead of !!
Josehower Jun 30, 2023
a4be47b
Use sinfle file for jsdom types
Josehower Jun 30, 2023
baa4d62
Remove unnecesary configuration
Josehower Jun 30, 2023
7bc5af8
Merge branch 'main' into vercel-deploy
karlhorky Jun 30, 2023
be48c35
Update tsconfig.json
karlhorky Jun 30, 2023
31abf21
Merge branch 'main' into vercel-deploy
karlhorky Jun 30, 2023
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
2 changes: 2 additions & 0 deletions app/LinkIfNotCurrent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import Link, { LinkProps } from 'next/link';
import { usePathname } from 'next/navigation';
import { ReactNode } from 'react';

export default function LinkIfNotCurrent<RouteType>({
matchParentSegment,
...props
}: LinkProps<RouteType> & {
matchParentSegment?: boolean;
children: ReactNode;
}) {
const pathname = usePathname();

Expand Down
2 changes: 1 addition & 1 deletion app/example-6-cross-site-scripting/solution-2/page.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import DOMPurify from 'dompurify';
import { JSDOM } from 'jsdom';
import { JSDOM } from 'jsdom-napi-rs-canvas';
import { notFound } from 'next/navigation';
import { getBlogPostById } from '../../../database/blogPosts';
import Common from '../common';
Expand Down
2 changes: 1 addition & 1 deletion database/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ declare module globalThis {
function connectOneTimeToDatabase() {
if (!globalThis.postgresSqlClient) {
globalThis.postgresSqlClient = postgres({
ssl: !!process.env.POSTGRES_URL,
ssl: Boolean(process.env.POSTGRES_URL),
transform: {
...postgres.camel,
undefined: null,
Expand Down
Loading