Skip to content

Commit

Permalink
Merge branch 'main' of github.com:redwoodjs/redwood into feat/vite-ssr
Browse files Browse the repository at this point in the history
* 'main' of github.com:redwoodjs/redwood: (50 commits)
  Use formatCacheKey() when deleting a key (redwoodjs#7362)
  fix(deps): update dependency @types/node to v16.18.14 (redwoodjs#7739)
  chore(deps): update dependency @npmcli/arborist to v6.2.4 (redwoodjs#7741)
  chore(deps): update dependency @replayio/playwright to v0.3.24 (redwoodjs#7738)
  chore(deps): update dependency @testing-library/react to v14 (redwoodjs#7737)
  chore(deps): update dependency @testing-library/dom to v9 (redwoodjs#7736)
  chore(deps): update dependency @types/vscode to v1.76.0 (redwoodjs#7729)
  chore(deps): update dependency zx to v7.2.0 (redwoodjs#7731)
  fix(deps): update dependency webpack-bundle-analyzer to v4.8.0 (redwoodjs#7735)
  fix(deps): update dependency babel-plugin-polyfill-corejs3 to v0.7.1 (redwoodjs#7732)
  fix(deps): update dependency msw to v1.1.0 (redwoodjs#7733)
  chore(deps): update dependency @clerk/clerk-react to v4.12.0 (redwoodjs#7728)
  fix(deps): update dependency @types/node to v16.18.13 (redwoodjs#7727)
  fix: change isDataEmpty, add codemod, fix codemod (redwoodjs#7704)
  fix: avoid naming conflict with `client` prop (redwoodjs#7024)
  fix(deps): update jest monorepo to v29.4.3 (redwoodjs#7651)
  chore(deps): update dependency @auth0/auth0-spa-js to v2 (redwoodjs#7524)
  fix(deps): update dependency @types/aws-lambda to v8.10.111 (redwoodjs#7726)
  fix(deps): update dependency @clerk/clerk-sdk-node to v4.7.7 (redwoodjs#7725)
  chore(deps): update dependency supertokens-node to v13.1.2 (redwoodjs#7714)
  ...
  • Loading branch information
dac09 committed Mar 3, 2023
2 parents 5e37a27 + af85f10 commit 911522e
Show file tree
Hide file tree
Showing 94 changed files with 3,464 additions and 2,217 deletions.
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,26 +35,26 @@
"devDependencies": {
"@actions/core": "1.10.0",
"@actions/exec": "1.1.1",
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/generator": "7.20.14",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@babel/generator": "7.21.1",
"@babel/node": "7.20.7",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-decorators": "7.20.13",
"@babel/plugin-proposal-decorators": "7.21.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.18.6",
"@babel/plugin-proposal-private-methods": "7.18.6",
"@babel/plugin-proposal-private-property-in-object": "7.20.5",
"@babel/plugin-transform-runtime": "7.19.6",
"@babel/plugin-proposal-private-property-in-object": "7.21.0",
"@babel/plugin-transform-runtime": "7.21.0",
"@babel/preset-env": "7.20.2",
"@babel/preset-react": "7.18.6",
"@babel/preset-typescript": "7.18.6",
"@babel/runtime-corejs3": "7.20.13",
"@npmcli/arborist": "6.2.3",
"@nrwl/nx-cloud": "15.0.3",
"@playwright/test": "1.30.0",
"@replayio/playwright": "0.3.23",
"@babel/preset-typescript": "7.21.0",
"@babel/runtime-corejs3": "7.21.0",
"@npmcli/arborist": "6.2.4",
"@nrwl/nx-cloud": "15.1.1",
"@playwright/test": "1.31.1",
"@replayio/playwright": "0.3.24",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "13.4.0",
"@testing-library/react": "14.0.0",
"@testing-library/user-event": "14.4.3",
"@tsd/typescript": "4.9.5",
"@types/babel__generator": "7.6.4",
Expand All @@ -66,37 +66,37 @@
"@types/prompts": "2.4.2",
"all-contributors-cli": "6.24.0",
"ansi-colors": "4.1.3",
"babel-jest": "29.4.2",
"babel-jest": "29.4.3",
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-remove-code": "0.0.6",
"boxen": "5.1.2",
"core-js": "3.28.0",
"cypress": "12.5.1",
"core-js": "3.29.0",
"cypress": "12.7.0",
"cypress-wait-until": "1.7.2",
"eslint": "8.34.0",
"eslint": "8.35.0",
"fast-glob": "3.2.12",
"fs-extra": "11.1.0",
"is-port-reachable": "3.1.0",
"jest": "29.4.2",
"jest": "29.4.3",
"jest-runner-tsd": "4.0.0",
"jscodeshift": "0.14.0",
"lerna": "6.5.1",
"listr2": "5.0.7",
"lodash.template": "4.5.0",
"make-dir-cli": "3.0.0",
"msw": "0.49.3",
"msw": "1.1.0",
"ncp": "2.0.0",
"node-notifier": "10.0.1",
"nodemon": "2.0.20",
"npm-packlist": "7.0.4",
"nx": "15.6.3",
"nx": "15.8.1",
"octokit": "2.0.14",
"ora": "5.4.1",
"prompts": "2.4.2",
"rimraf": "3.0.2",
"terminal-link": "2.1.1",
"typescript": "4.9.5",
"zx": "7.1.1"
"zx": "7.2.0"
},
"packageManager": "yarn@3.4.1",
"npmClient": "yarn"
Expand Down
14 changes: 7 additions & 7 deletions packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/plugin-transform-runtime": "7.19.6",
"@babel/runtime-corejs3": "7.20.13",
"@babel/plugin-transform-runtime": "7.21.0",
"@babel/runtime-corejs3": "7.21.0",
"@fastify/http-proxy": "8.4.0",
"@fastify/static": "6.9.0",
"@fastify/url-data": "5.3.1",
"ansi-colors": "4.1.3",
"chalk": "4.1.2",
"chokidar": "3.5.3",
"core-js": "3.28.0",
"core-js": "3.29.0",
"fast-json-parse": "1.0.3",
"fastify": "4.13.0",
"fastify-raw-body": "4.2.0",
Expand All @@ -48,15 +48,15 @@
"yargs": "17.7.1"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@types/aws-lambda": "8.10.110",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/aws-lambda": "8.10.111",
"@types/lodash.escape": "4.0.7",
"@types/qs": "6.9.7",
"@types/split2": "3.2.1",
"@types/yargs": "17.0.22",
"aws-lambda": "1.0.7",
"jest": "29.4.2",
"jest": "29.4.3",
"typescript": "4.9.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
20 changes: 10 additions & 10 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,34 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"@prisma/client": "4.10.1",
"@babel/runtime-corejs3": "7.21.0",
"@prisma/client": "4.11.0",
"@whatwg-node/fetch": "0.8.1",
"core-js": "3.28.0",
"core-js": "3.29.0",
"humanize-string": "2.1.0",
"jsonwebtoken": "9.0.0",
"pascalcase": "1.0.0",
"pino": "8.10.0",
"pino": "8.11.0",
"title-case": "3.0.3"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@types/aws-lambda": "8.10.110",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/aws-lambda": "8.10.111",
"@types/jsonwebtoken": "9.0.1",
"@types/memjs": "1",
"@types/pascalcase": "1.0.1",
"@types/split2": "3.2.1",
"jest": "29.4.2",
"jest": "29.4.3",
"memjs": "1.3.0",
"redis": "4.6.4",
"redis": "4.6.5",
"split2": "4.1.0",
"ts-toolbelt": "9.6.0",
"typescript": "4.9.5"
},
"peerDependencies": {
"memjs": "1.3.0",
"redis": "4.6.4"
"redis": "4.6.5"
},
"peerDependenciesMeta": {
"memjs": {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/cache/__tests__/cacheFindMany.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jest.mock('@prisma/client', () => ({

describe('cacheFindMany', () => {
afterEach(() => {
jest.restoreAllMocks()
jest.clearAllMocks()
})

it('adds the collection to the cache based on latest updated user', async () => {
Expand Down
7 changes: 4 additions & 3 deletions packages/api/src/cache/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,19 +187,20 @@ export const createCache = (

const deleteCacheKey = async (key: CacheKey) => {
let result
const cacheKey = formatCacheKey(key, prefix)

try {
await Promise.race([
(result = client.del(key as string)),
(result = client.del(cacheKey as string)),
wait(timeout).then(() => {
throw new CacheTimeoutError()
}),
])

logger?.debug(`[Cache] DEL '${key}'`)
logger?.debug(`[Cache] DEL '${cacheKey}'`)
return result
} catch (e: any) {
logger?.error(`[Cache] Error DEL '${key}': ${e.message}`)
logger?.error(`[Cache] Error DEL '${cacheKey}': ${e.message}`)
return false
}
}
Expand Down
10 changes: 5 additions & 5 deletions packages/auth-providers/auth0/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"core-js": "3.28.0",
"@babel/runtime-corejs3": "7.21.0",
"core-js": "3.29.0",
"jsonwebtoken": "9.0.0",
"jwks-rsa": "3.0.1"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@redwoodjs/api": "4.0.0",
"@types/jsonwebtoken": "9.0.1",
"jest": "29.4.2",
"jest": "29.4.3",
"typescript": "4.9.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
10 changes: 5 additions & 5 deletions packages/auth-providers/auth0/setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"@babel/runtime-corejs3": "7.21.0",
"@redwoodjs/cli-helpers": "4.0.0",
"core-js": "3.28.0"
"core-js": "3.29.0"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/yargs": "17.0.22",
"jest": "29.4.2",
"jest": "29.4.3",
"typescript": "4.9.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
2 changes: 1 addition & 1 deletion packages/auth-providers/auth0/setup/src/setupHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export async function handler({ force: forceArg }: Args) {
"import { authDecoder } from '@redwoodjs/auth-auth0-api'",
apiPackages: [`@redwoodjs/auth-auth0-api@${version}`],
webPackages: [
'@auth0/auth0-spa-js@^1',
'@auth0/auth0-spa-js@^2',
`@redwoodjs/auth-auth0-web@${version}`,
],
notes: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ import { createAuth } from '@redwoodjs/auth-auth0-web'

const auth0 = new Auth0Client({
domain: process.env.AUTH0_DOMAIN || '',
client_id: process.env.AUTH0_CLIENT_ID || '',
redirect_uri: process.env.AUTH0_REDIRECT_URI,
clientId: process.env.AUTH0_CLIENT_ID || '',
authorizationParams: {
redirect_uri: process.env.AUTH0_REDIRECT_URI,
audience: process.env.AUTH0_AUDIENCE,
},

// Storing tokens in the browser's local storage provides persistence across page refreshes and browser tabs.
// But if an attacker can run JavaScript in your SPA using a cross-site scripting (XSS) attack,
// they can retrieve the tokens stored in local storage.
// See https://auth0.com/docs/libraries/auth0-spa-js#change-storage-options.
cacheLocation: 'localstorage',
audience: process.env.AUTH0_AUDIENCE,

// `useRefreshTokens` is required for automatically extending sessions beyond what's set in the initial JWT expiration.
// See https://auth0.com/docs/tokens/refresh-tokens.
Expand Down
14 changes: 7 additions & 7 deletions packages/auth-providers/auth0/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,21 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"@babel/runtime-corejs3": "7.21.0",
"@redwoodjs/auth": "4.0.0",
"core-js": "3.28.0"
"core-js": "3.29.0"
},
"devDependencies": {
"@auth0/auth0-spa-js": "1.22.6",
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@auth0/auth0-spa-js": "2.0.4",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/react": "18.0.28",
"jest": "29.4.2",
"jest": "29.4.3",
"react": "18.2.0",
"typescript": "4.9.5"
},
"peerDependencies": {
"@auth0/auth0-spa-js": "1.22.6"
"@auth0/auth0-spa-js": "2.0.4"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
}
6 changes: 4 additions & 2 deletions packages/auth-providers/auth0/web/src/auth0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ function createAuthImplementation(auth0Client: Auth0Client) {
signup: async (options?: RedirectLoginOptions) =>
auth0Client.loginWithRedirect({
...options,
screen_hint: 'signup',
prompt: 'login',
authorizationParams: {
screen_hint: 'signup',
prompt: 'login',
},
}),
getToken: () => auth0Client.getTokenSilently(),
getUserMetadata: async () => {
Expand Down
12 changes: 6 additions & 6 deletions packages/auth-providers/azureActiveDirectory/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"core-js": "3.28.0",
"@babel/runtime-corejs3": "7.21.0",
"core-js": "3.29.0",
"jsonwebtoken": "9.0.0",
"jwks-rsa": "3.0.1"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@redwoodjs/api": "4.0.0",
"@types/aws-lambda": "8.10.110",
"@types/aws-lambda": "8.10.111",
"@types/jsonwebtoken": "9.0.1",
"jest": "29.4.2",
"jest": "29.4.3",
"typescript": "4.9.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
10 changes: 5 additions & 5 deletions packages/auth-providers/azureActiveDirectory/setup/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"@babel/runtime-corejs3": "7.21.0",
"@redwoodjs/cli-helpers": "4.0.0",
"core-js": "3.28.0"
"core-js": "3.29.0"
},
"devDependencies": {
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/yargs": "17.0.22",
"jest": "29.4.2",
"jest": "29.4.3",
"typescript": "4.9.5"
},
"gitHead": "3905ed045508b861b495f8d5630d76c7a157d8f1"
Expand Down
10 changes: 5 additions & 5 deletions packages/auth-providers/azureActiveDirectory/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.20.13",
"@babel/runtime-corejs3": "7.21.0",
"@redwoodjs/auth": "4.0.0",
"core-js": "3.28.0"
"core-js": "3.29.0"
},
"devDependencies": {
"@azure/msal-browser": "2.33.0",
"@babel/cli": "7.20.7",
"@babel/core": "7.20.12",
"@babel/cli": "7.21.0",
"@babel/core": "7.21.0",
"@types/netlify-identity-widget": "1.9.3",
"@types/react": "18.0.28",
"jest": "29.4.2",
"jest": "29.4.3",
"react": "18.2.0",
"typescript": "4.9.5"
},
Expand Down
Loading

0 comments on commit 911522e

Please sign in to comment.