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

dependency upgrades; graphql-tools bug fix, typescript 4.4, deprecated babel-eslint, clean up core/package.json #3371

Merged
merged 23 commits into from
Sep 18, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
a88f738
typescript 4.4 changes
thedavidprice Sep 9, 2021
d89b874
misc upgrades
thedavidprice Sep 9, 2021
5a62f8c
upgrades pt 2
thedavidprice Sep 13, 2021
39176ec
fix core/package.json; remove x---x---x
thedavidprice Sep 13, 2021
6e9776a
update yarn.lock
thedavidprice Sep 13, 2021
96cda2d
upgrade magic.sdk
thedavidprice Sep 14, 2021
d0961b9
TS resolution fix
thedavidprice Sep 14, 2021
74bcb5d
deprecate babel-eslint for @babel/eslint-parser
thedavidprice Sep 14, 2021
879e15f
upgrade MSW
thedavidprice Sep 14, 2021
970ddf9
Merge branch 'main' into dsp-misc-upgrades-sept-08-2021
thedavidprice Sep 14, 2021
6086655
update MSW ctx.set type ('cause cookie error)
thedavidprice Sep 15, 2021
3390e7b
Merge branch 'main' into dsp-misc-upgrades-sept-08-2021
thedavidprice Sep 15, 2021
9922501
use (and fix) core-js version from dependency
thedavidprice Sep 16, 2021
5aef878
misc upgrades
thedavidprice Sep 16, 2021
83793bb
type update catch(err)
thedavidprice Sep 16, 2021
20aa179
Merge branch 'main' into dsp-misc-upgrades-sept-08-2021
thedavidprice Sep 16, 2021
a10118c
check cwd for parserOptions
thedavidprice Sep 17, 2021
435bb8b
misc updates
thedavidprice Sep 17, 2021
3e1e641
Merge branch 'main' into dsp-misc-upgrades-sept-08-2021
thedavidprice Sep 17, 2021
9728627
update yarn.lock
thedavidprice Sep 17, 2021
be52794
Remove graphql-tools merge from api
dthyresson Sep 18, 2021
931d5b6
Merge branch 'main' into dsp-misc-upgrades-sept-08-2021
dthyresson Sep 18, 2021
d8d9ac3
update yarn.lock
thedavidprice Sep 18, 2021
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
"packages/*"
],
"devDependencies": {
"npm-packlist": "2.2.2",
"typescript-transform-paths": "3.3.0"
"npm-packlist": "3.0.0",
"typescript-transform-paths": "3.3.1"
},
"resolutions": {
"@types/react": "17.0.17",
"@types/react": "17.0.21",
"prop-types": "15.7.2",
"react-dom": "17.0.2",
"react": "17.0.2",
"typescript": "4.3.5",
"typescript": "4.4.3",
"vscode-languageserver-protocol": "3.15.3",
"vscode-languageserver-types": "3.15.1",
"vscode-languageserver": "6.1.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
"ansi-colors": "4.1.1",
"body-parser": "1.19.0",
"chokidar": "3.5.2",
"dotenv-defaults": "2.0.2",
"dotenv-defaults": "3.0.0",
"express": "4.17.1",
"fast-glob": "3.2.5",
"fast-glob": "3.2.7",
"http-proxy-middleware": "2.0.1",
"lodash.escape": "4.0.1",
"morgan": "1.10.0",
"qs": "6.9.3",
"qs": "6.10.1",
"yargs": "16.2.0",
"youch": "2.2.2",
"youch-terminal": "1.1.1"
},
"devDependencies": {
"@types/aws-lambda": "8.10.81",
"@types/aws-lambda": "8.10.83",
"@types/express": "4.17.13",
"@types/lodash.escape": "4.0.6",
"@types/morgan": "1.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/api-server/src/requestHandlers/awsLambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export const requestHandler = async (
try {
const lambaResponse = await handlerPromise
return expressResponseForLambdaResult(res, lambaResponse)
} catch (error) {
} catch (error: any) {
return expressResponseForLambdaError(res, error)
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@
"types": "./dist/index.d.ts",
"license": "MIT",
"dependencies": {
"@graphql-tools/merge": "7.0.0",
"@graphql-tools/merge": "8.1.2",
dthyresson marked this conversation as resolved.
Show resolved Hide resolved
"@prisma/client": "2.30.3",
"@types/pino": "6.3.11",
"core-js": "3.16.1",
"core-js": "3.17.3",
"crypto-js": "4.1.1",
"jsonwebtoken": "8.5.1",
"jwks-rsa": "2.0.4",
"pino": "6.13.0",
"pino": "6.13.2",
"pino-pretty": "5.1.3"
},
"devDependencies": {
"@redwoodjs/auth": "0.36.4",
"@types/crypto-js": "4.0.2",
"@types/jsonwebtoken": "8.5.4",
"@types/jsonwebtoken": "8.5.5",
"@types/lodash.merge": "4.6.6",
"@types/lodash.omitby": "4.6.6",
"split2": "3.2.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/auth/decoders/nhost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const nhost = async (token: string) => {
const roles = claims[ROLES_CLAIM]

return { ...decoded, roles }
} catch (error) {
} catch (error: any) {
throw new Error(error)
}
}
2 changes: 1 addition & 1 deletion packages/api/src/auth/verifiers/jwtVerifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const createSignature = ({
: undefined

return jwt.sign(payload, secret, { ...signOptions })
} catch (error) {
} catch (error: any) {
throw new WebhookSignError(error.message)
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/auth/verifiers/sha1Verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const verifySignature = ({
}

throw new WebhookVerificationError()
} catch (error) {
} catch (error: any) {
throw new WebhookVerificationError(
`${VERIFICATION_ERROR_MESSAGE}: ${error.message}`
)
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/auth/verifiers/sha256Verifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const verifySignature = ({
}

throw new WebhookVerificationError()
} catch (error) {
} catch (error: any) {
throw new WebhookVerificationError(
`${VERIFICATION_ERROR_MESSAGE}: ${error.message}`
)
Expand Down
4 changes: 2 additions & 2 deletions packages/api/src/functions/dbAuth/DbAuthHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export class DbAuthHandler {
]()

return this._ok(body, headers, options)
} catch (e) {
} catch (e: any) {
if (e instanceof DbAuthError.WrongVerbError) {
return this._notFound()
} else {
Expand Down Expand Up @@ -303,7 +303,7 @@ export class DbAuthHandler {
// to work, so return the user's ID in case we can use it for something
// in the future
return [user.id]
} catch (e) {
} catch (e: any) {
if (e instanceof DbAuthError.NotLoggedInError) {
return this._logoutResponse()
} else {
Expand Down
16 changes: 8 additions & 8 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@
"types": "./dist/index.d.ts",
"license": "MIT",
"devDependencies": {
"@auth0/auth0-spa-js": "1.17.0",
"@clerk/clerk-js": "1.28.2",
"@clerk/clerk-sdk-node": "0.5.1",
"@clerk/types": "1.8.1",
"@supabase/supabase-js": "1.21.1",
"@auth0/auth0-spa-js": "1.18.0",
"@clerk/clerk-js": "1.33.0",
"@clerk/clerk-sdk-node": "0.5.2",
"@clerk/types": "1.13.0",
"@supabase/supabase-js": "1.22.6",
"@types/netlify-identity-widget": "1.9.2",
"@types/react": "17.0.17",
"@types/react": "17.0.21",
"firebase": "8.9.1",
"firebase-admin": "9.11.0",
"firebase-admin": "9.11.1",
"gotrue-js": "0.9.29",
"magic-sdk": "4.4.1",
"magic-sdk": "6.0.5",
"msal": "1.4.12",
"netlify-identity-widget": "1.9.2",
"nhost-js-sdk": "3.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/auth/src/AuthProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export class AuthProvider extends React.Component<
loading: false,
})
}
} catch (e) {
} catch (e: any) {
this.setState({
...notAuthenticatedState,
hasError: true,
Expand Down
8 changes: 4 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
"@redwoodjs/internal": "0.36.4",
"@redwoodjs/prerender": "0.36.4",
"@redwoodjs/structure": "0.36.4",
"boxen": "5.0.1",
"boxen": "5.1.2",
"camelcase": "6.2.0",
"chalk": "4.1.2",
"concurrently": "6.2.1",
"configstore": "3.1.5",
"core-js": "3.16.1",
"core-js": "3.17.3",
"cross-env": "7.0.3",
"decamelize": "5.0.0",
"dotenv-defaults": "2.0.2",
"dotenv-defaults": "3.0.0",
"envinfo": "7.8.1",
"execa": "5.1.1",
"fs-extra": "10.0.0",
Expand All @@ -39,7 +39,7 @@
"param-case": "3.0.4",
"pascalcase": "1.0.0",
"pluralize": "8.0.0",
"prettier": "2.3.2",
"prettier": "2.4.1",
"prisma": "2.30.3",
"prompts": "2.4.1",
"rimraf": "3.0.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/core/config/babel-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ const TARGETS_NODE = '12.16'
// Warning! Use the minor core-js version: "corejs: '3.6'", instead of "corejs: 3",
// because we want to include the features added in the minor version.
// https://github.com/zloirock/core-js/blob/master/README.md#babelpreset-env
const CORE_JS_VERSION = '3.6'

const CORE_JS_VERSION = packageJSON.dependencies['core-js']
.split('.')
.slice(0, 2)
.join('.') // Produces: 3.12, instead of 3.12.1

/** @type {import('@babel/core').TransformOptions} */
module.exports = () => {
Expand Down
67 changes: 33 additions & 34 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,58 +10,57 @@
"main": "dist/index.js",
"types": "dist/index.d.ts",
"dependencies": {
"@redwoodjs/eslint-config": "0.36.4",
"@redwoodjs/internal": "0.36.4",
"@redwoodjs/testing": "0.36.4",
"@redwoodjs/cli": "0.36.4",
"x----x----x": "^0 Babel",
"@babel/cli": "7.14.8",
"@babel/core": "7.15.0",
"@babel/node": "7.14.9",
"@babel/plugin-proposal-decorators": "7.14.5",
"@babel/cli": "7.15.4",
"@babel/core": "7.15.5",
"@babel/node": "7.15.4",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/plugin-proposal-decorators": "7.15.4",
"@babel/plugin-proposal-private-methods": "7.14.5",
"@babel/plugin-transform-runtime": "7.15.0",
"@babel/preset-env": "7.15.6",
"@babel/preset-react": "7.14.5",
"@babel/preset-typescript": "7.15.0",
"@babel/preset-env": "7.15.0",
"@babel/runtime-corejs3": "7.15.4",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.6",
"@redwoodjs/cli": "0.36.4",
"@redwoodjs/eslint-config": "0.36.4",
"@redwoodjs/internal": "0.36.4",
"@redwoodjs/testing": "0.36.4",
"babel-loader": "8.2.2",
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-graphql-tag": "3.3.0",
"babel-plugin-inline-react-svg": "2.0.1",
"babel-plugin-module-resolver": "4.1.0",
"core-js": "3.16.1",
"graphql": "15.5.1",
"graphql-tag": "2.12.5",
"fast-glob": "3.2.7",
"@babel/runtime-corejs3": "7.15.3",
"x----x----x": "^0 Bins",
"esbuild": "0.12.21",
"typescript": "4.3.5",
"cross-env": "7.0.3",
"x----x----x": "^0 Webpack",
"webpack": "5.51.1",
"webpack-bundle-analyzer": "4.4.2",
"webpack-cli": "4.8.0",
"webpack-dev-server": "4.0.0",
"webpack-manifest-plugin": "4.0.2",
"webpack-merge": "5.8.0",
"webpack-retry-chunk-load-plugin": "2.2.0",
"babel-loader": "8.2.2",
"babel-timing": "0.9.1",
"copy-webpack-plugin": "9.0.1",
"core-js": "3.17.3",
"cross-env": "7.0.3",
"css-loader": "6.2.0",
"css-minimizer-webpack-plugin": "3.0.2",
"dotenv-webpack": "7.0.3",
"esbuild": "0.12.28",
"esbuild-loader": "2.15.1",
"fast-glob": "3.2.7",
"file-loader": "6.2.0",
"graphql": "15.5.3",
"graphql-tag": "2.12.5",
"html-webpack-plugin": "5.3.2",
"lodash.escaperegexp": "4.1.2",
"mini-css-extract-plugin": "2.3.0",
"nodemon": "2.0.12",
"null-loader": "4.0.1",
"react-refresh": "0.10.0",
"style-loader": "3.2.1",
"svg-react-loader": "0.4.6",
"@pmmmwh/react-refresh-webpack-plugin": "0.5.0-rc.4",
"mini-css-extract-plugin": "2.2.0",
"null-loader": "4.0.1",
"lodash.escaperegexp": "4.1.2",
"nodemon": "2.0.12",
"esbuild-loader": "2.15.1"
"typescript": "4.4.3",
"url-loader": "4.1.1",
"webpack": "5.53.0",
"webpack-bundle-analyzer": "4.4.2",
"webpack-cli": "4.8.0",
"webpack-dev-server": "4.2.1",
"webpack-manifest-plugin": "4.0.2",
"webpack-merge": "5.8.0",
"webpack-retry-chunk-load-plugin": "2.2.0"
},
"devDependencies": {
"@types/babel-core": "6.25.7",
Expand Down
4 changes: 2 additions & 2 deletions packages/create-redwood-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"template"
],
"dependencies": {
"@babel/runtime-corejs3": "7.15.3",
"@babel/runtime-corejs3": "7.15.4",
"@redwoodjs/internal": "0.36.4",
"axios": "0.21.1",
"axios": "0.21.4",
"chalk": "4.1.2",
"check-node-version": "4.1.0",
"decompress": "4.2.1",
Expand Down
18 changes: 10 additions & 8 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
"main": "index.js",
"license": "MIT",
"dependencies": {
"@typescript-eslint/eslint-plugin": "4.29.0",
"@typescript-eslint/parser": "4.29.0",
"babel-eslint": "10.1.0",
"@babel/core": "^7.15.5",
"@babel/eslint-parser": "^7.15.4",
"@babel/eslint-plugin": "^7.14.5",
"@typescript-eslint/eslint-plugin": "4.31.1",
"@typescript-eslint/parser": "4.31.1",
"eslint": "7.32.0",
"eslint-config-prettier": "8.3.0",
"eslint-import-resolver-babel-module": "5.3.1",
"eslint-plugin-babel": "5.3.1",
"eslint-plugin-import": "2.23.4",
"eslint-plugin-jest-dom": "3.9.0",
"eslint-plugin-import": "2.24.2",
"eslint-plugin-jest-dom": "3.9.2",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-prettier": "3.4.0",
"eslint-plugin-react": "7.24.0",
"eslint-plugin-prettier": "4.0.0",
"eslint-plugin-react": "7.25.2",
"eslint-plugin-react-hooks": "4.2.0",
"prettier": "2.3.2"
"prettier": "2.4.1"
},
"scripts": {
"build": "echo 'Nothing to build..'"
Expand Down
19 changes: 17 additions & 2 deletions packages/eslint-config/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,32 @@
// [^1] https://eslint.org/docs/rules/
// [^2] https://www.npmjs.com/package/eslint-plugin-react#list-of-supported-rules

const findUp = require('findup-sync')

const babelConfigPath = (cwd = process.env.RWJS_CWD ?? process.cwd()) => {
const configPath = findUp('babel.config.js', { cwd })
if (!configPath) {
throw new Error(`Eslint-parser could not find a "babel.config.js" file`)
}
return configPath
}

module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:jest-dom/recommended',
],
parser: 'babel-eslint',
parser: '@babel/eslint-parser',
parserOptions: {
babelOptions: {
configFile: babelConfigPath(),
},
},
plugins: [
'prettier',
'babel',
'@babel',
'import',
'jsx-a11y',
'react',
Expand Down
6 changes: 3 additions & 3 deletions packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"types": "src/index.d.ts",
"license": "MIT",
"dependencies": {
"@types/pascalcase": "1.0.0",
"core-js": "3.16.1",
"@types/pascalcase": "1.0.1",
"core-js": "3.17.3",
"pascalcase": "1.0.0",
"react-hook-form": "7.12.2"
"react-hook-form": "7.15.3"
},
"scripts": {
"build": "yarn build:js",
Expand Down
Loading