Skip to content

Commit

Permalink
Merge branch 'main' into fix/run-dedupe-on-yarn-3
Browse files Browse the repository at this point in the history
  • Loading branch information
jtoar authored May 9, 2022
2 parents 7b7b05d + 39dfc31 commit d1f9801
Show file tree
Hide file tree
Showing 24 changed files with 441 additions and 297 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -238,11 +238,6 @@ jobs:
yarn rw test web --no-watch
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}

- name: Run "rw type-check"
run: |
yarn rw type-check
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}

- name: Run "rw check"
run: |
yarn rw check
Expand Down Expand Up @@ -291,6 +286,16 @@ jobs:
yarn rw g page ciTest
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}

- name: Run "g sdl"
run: |
yarn rw g sdl userExample
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}

- name: Run "rw type-check"
run: |
yarn rw type-check
working-directory: ${{ steps.setup_test_project.outputs.test_project_path }}

- name: Throw Error | Run `rw g sdl <model>`
run: |
yarn rw g sdl DoesNotExist
Expand Down
13 changes: 13 additions & 0 deletions constraints.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,16 @@ gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange2, Depende
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, TargetDependencyRange, DependencyType) :-
workspace_has_dependency(WorkspaceCwd, DependencyIdent, CurrentDependencyRange, DependencyType),
atom_concat('^', TargetDependencyRange, CurrentDependencyRange).

% Enforce that all workspaces building with Babel depend on '@babel/runtime-corejs3' and 'core-js'.
gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, 'dependencies') :-
member(DependencyIdent, [
'@babel/runtime-corejs3',
'core-js'
]),
% Exclude the root workspace
WorkspaceCwd \= '.',
% Only target workspaces with a build:js script
workspace_field(WorkspaceCwd, 'scripts.build:js', _),
% Get the range from the root workspace
workspace_has_dependency('.', DependencyIdent, DependencyRange, _).
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"test:release-script": "NODE_OPTIONS=--experimental-vm-modules ./node_modules/.bin/jest --config ./tasks/release/jest.config.mjs"
},
"resolutions": {
"@types/react": "17.0.44",
"@types/react": "17.0.45",
"all-contributors-cli@6.20.0": "patch:all-contributors-cli@npm:6.20.0#.yarn/patches/all-contributors-cli-npm-6.20.0-ba332c4a3e.patch",
"prop-types": "15.8.1",
"react": "17.0.2",
Expand All @@ -47,6 +47,9 @@
"@babel/node": "7.16.7",
"@babel/plugin-proposal-class-properties": "7.16.7",
"@babel/plugin-proposal-decorators": "7.16.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.16.7",
"@babel/plugin-proposal-private-methods": "7.16.7",
"@babel/plugin-proposal-private-property-in-object": "7.16.7",
"@babel/plugin-transform-runtime": "7.16.7",
"@babel/preset-env": "7.16.7",
"@babel/preset-react": "7.16.7",
Expand All @@ -71,7 +74,7 @@
"core-js": "3.22.4",
"cypress": "9.6.0",
"cypress-wait-until": "1.7.2",
"eslint": "8.14.0",
"eslint": "8.15.0",
"fast-glob": "3.2.11",
"fs-extra": "10.1.0",
"is-port-reachable": "3.1.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/api-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@
},
"dependencies": {
"@babel/plugin-transform-runtime": "7.16.7",
"@babel/runtime-corejs3": "7.16.7",
"@fastify/http-proxy": "7.1.0",
"@fastify/static": "5.0.2",
"@fastify/url-data": "4.0.0",
"ansi-colors": "4.1.1",
"chalk": "4.1.2",
"chokidar": "3.5.3",
"core-js": "3.22.4",
"fast-json-parse": "1.0.3",
"fastify": "3.29.0",
"fastify-raw-body": "3.2.0",
Expand All @@ -47,7 +49,7 @@
"devDependencies": {
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@types/aws-lambda": "8.10.95",
"@types/aws-lambda": "8.10.96",
"@types/lodash.escape": "4.0.7",
"@types/qs": "6.9.7",
"@types/split2": "3.2.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/client": "3.13.0",
"core-js": "3.22.4",
"cross-undici-fetch": "0.1.27",
"crypto-js": "4.1.1",
"humanize-string": "2.1.0",
Expand All @@ -46,11 +47,15 @@
"devDependencies": {
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@clerk/clerk-sdk-node": "3.4.0",
"@redwoodjs/auth": "1.3.1",
"@types/aws-lambda": "8.10.96",
"@types/crypto-js": "4.1.1",
"@types/jsonwebtoken": "8.5.8",
"@types/md5": "2.3.2",
"@types/pascalcase": "1.0.1",
"@types/split2": "3.2.1",
"@types/uuid": "8.3.4",
"aws-lambda": "1.0.7",
"jest": "27.5.1",
"split2": "4.1.0",
Expand Down
15 changes: 10 additions & 5 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,24 @@
"test": "jest src",
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"core-js": "3.22.4"
},
"devDependencies": {
"@auth0/auth0-spa-js": "1.21.0",
"@azure/msal-browser": "2.24.0",
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@clerk/clerk-js": "3.10.1",
"@clerk/clerk-sdk-node": "3.4.0",
"@clerk/types": "2.8.0",
"@nhost/nhost-js": "1.1.7",
"@supabase/supabase-js": "1.35.2",
"@clerk/types": "2.10.0",
"@nhost/hasura-auth-js": "1.1.4",
"@nhost/nhost-js": "1.1.9",
"@supabase/supabase-js": "1.35.3",
"@types/netlify-identity-widget": "1.9.3",
"@types/react": "17.0.44",
"firebase": "9.7.0",
"@types/react": "17.0.45",
"firebase": "9.8.0",
"firebase-admin": "10.2.0",
"gotrue-js": "0.9.29",
"jest": "27.5.1",
Expand Down
6 changes: 3 additions & 3 deletions packages/auth/src/authClients/firebase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { FirebaseApp } from '@firebase/app'
import type { CustomParameters, OAuthProvider, User } from '@firebase/auth'
import type FirebaseAuthNamespace from '@firebase/auth'
import type { FirebaseApp } from 'firebase/app'
import type { CustomParameters, OAuthProvider, User } from 'firebase/auth'
import type FirebaseAuthNamespace from 'firebase/auth'

import { AuthClient } from './'

Expand Down
9 changes: 7 additions & 2 deletions packages/auth/src/authClients/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Session, User, Provider } from '@supabase/gotrue-js'
import type { SupabaseClient, ApiError } from '@supabase/supabase-js'
import type {
SupabaseClient,
ApiError,
Session,
User,
Provider,
} from '@supabase/supabase-js'

import type { AuthClient } from './index'

Expand Down
1 change: 1 addition & 0 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/sdk": "3.13.0",
"@redwoodjs/api-server": "1.3.1",
"@redwoodjs/internal": "1.3.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/codemods/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"core-js": "3.22.4",
"cross-undici-fetch": "0.1.27",
"deepmerge": "4.2.2",
"execa": "5.1.1",
"fast-glob": "3.2.11",
"findup-sync": "5.0.0",
"jest": "27.5.1",
Expand All @@ -41,9 +42,12 @@
},
"devDependencies": {
"@types/babel__core": "7.1.19",
"@types/findup-sync": "4.0.2",
"@types/fs-extra": "9.0.13",
"@types/jest": "27.5.0",
"@types/jscodeshift": "0.11.5",
"@types/prettier": "2.6.0",
"@types/yargs": "17.0.10",
"fs-extra": "10.1.0",
"tempy": "1.0.1"
},
Expand Down
1 change: 1 addition & 0 deletions packages/create-redwood-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"@redwoodjs/telemetry": "1.3.1",
"chalk": "4.1.2",
"check-node-version": "4.2.1",
"core-js": "3.22.4",
"execa": "5.1.1",
"fs-extra": "10.1.0",
"listr": "0.14.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"@redwoodjs/internal": "1.3.1",
"@typescript-eslint/eslint-plugin": "5.22.0",
"@typescript-eslint/parser": "5.22.0",
"eslint": "8.14.0",
"eslint": "8.15.0",
"eslint-config-prettier": "8.5.0",
"eslint-import-resolver-babel-module": "5.3.1",
"eslint-plugin-babel": "5.3.1",
Expand Down
4 changes: 3 additions & 1 deletion packages/forms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"core-js": "3.22.4",
"pascalcase": "1.0.0",
"react-hook-form": "7.30.0"
},
Expand All @@ -33,9 +34,10 @@
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.1.1",
"@types/pascalcase": "1.0.1",
"@types/react": "17.0.44",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.16",
"@types/testing-library__jest-dom": "5.14.3",
"graphql": "16.4.0",
"jest": "27.5.1",
"nodemon": "2.0.16",
"react": "17.0.2",
Expand Down
1 change: 1 addition & 0 deletions packages/graphql-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@envelop/depth-limit": "1.5.1",
"@envelop/disable-introspection": "3.3.1",
"@envelop/filter-operation-type": "3.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K]
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type ResolverFn<TResult, TParent, TContext, TArgs> = (
args: TArgs,
obj: { root: TParent; context: TContext; info: GraphQLResolveInfo }
args?: TArgs,
obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo }
) => Promise<Partial<TResult>> | Partial<TResult>;
export type RequireFields<T, K extends keyof T> = Omit<T, K> & { [P in K]-?: NonNullable<T[P]> };
/** All built-in and custom scalars, mapped to their actual values */
Expand Down Expand Up @@ -78,11 +78,7 @@ export type Todo = {
export type ResolverTypeWrapper<T> = Promise<T> | T;
export type ResolverWithResolve<TResult, TParent, TContext, TArgs> = {
resolve: ResolverFn<TResult, TParent, TContext, TArgs>;
};
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs> | ResolverWithResolve<TResult, TParent, TContext, TArgs>;
export type Resolver<TResult, TParent = {}, TContext = {}, TArgs = {}> = ResolverFn<TResult, TParent, TContext, TArgs>;
export type SubscriptionSubscribeFn<TResult, TParent, TContext, TArgs> = (
parent: TParent,
Expand Down
7 changes: 4 additions & 3 deletions packages/internal/src/generate/graphqlCodeGen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ function getPluginConfig() {

const pluginConfig: CodegenTypes.PluginConfig &
typescriptResolvers.TypeScriptResolversPluginConfig = {
makeResolverTypeCallable: true,
namingConvention: 'keep', // to allow camelCased query names
scalars: {
// We need these, otherwise these scalars are mapped to any
Expand All @@ -152,10 +153,10 @@ function getPluginConfig() {
// prevent type names being PetQueryQuery, RW generators already append
// Query/Mutation/etc
omitOperationSuffix: true,

showUnusedMappers: false,
customResolverFn: `(
args: TArgs,
obj: { root: TParent; context: TContext; info: GraphQLResolveInfo }
args?: TArgs,
obj?: { root: TParent; context: TContext; info: GraphQLResolveInfo }
) => Promise<Partial<TResult>> | Partial<TResult>;`,
mappers: prismaModels,
contextType: `@redwoodjs/graphql-server/dist/functions/types#RedwoodGraphQLContext`,
Expand Down
2 changes: 2 additions & 0 deletions packages/prerender/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@redwoodjs/auth": "1.3.1",
"@redwoodjs/internal": "1.3.1",
"@redwoodjs/router": "1.3.1",
"@redwoodjs/structure": "1.3.1",
"@redwoodjs/web": "1.3.1",
"babel-plugin-ignore-html-and-css-imports": "0.1.0",
"cheerio": "1.0.0-rc.10",
"core-js": "3.22.4",
"cross-undici-fetch": "0.1.27",
"mime-types": "2.1.35"
},
Expand Down
1 change: 1 addition & 0 deletions packages/record/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
]
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/client": "3.13.0",
"core-js": "3.22.4"
},
Expand Down
3 changes: 3 additions & 0 deletions packages/router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@reach/skip-nav": "0.16.0",
"@redwoodjs/auth": "1.3.1",
"core-js": "3.22.4",
Expand All @@ -31,6 +32,8 @@
"@babel/cli": "7.16.7",
"@babel/core": "7.16.7",
"@types/lodash.isequal": "4.5.6",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.16",
"jest": "27.5.1",
"prop-types": "15.8.1",
"react": "17.0.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/structure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@
]
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@prisma/sdk": "3.13.0",
"@redwoodjs/internal": "1.3.1",
"@types/line-column": "1.0.0",
"camelcase": "6.3.0",
"core-js": "3.22.4",
"deepmerge": "4.2.2",
"dotenv-defaults": "5.0.0",
"enquirer": "2.3.6",
Expand Down
1 change: 1 addition & 0 deletions packages/telemetry/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@redwoodjs/internal": "1.3.1",
"@redwoodjs/structure": "1.3.1",
"ci-info": "3.3.0",
"core-js": "3.22.4",
"cross-undici-fetch": "0.1.27",
"envinfo": "7.8.1",
"systeminformation": "5.11.14",
Expand Down
6 changes: 4 additions & 2 deletions packages/testing/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"test:watch": "yarn test --watch"
},
"dependencies": {
"@babel/runtime-corejs3": "7.16.7",
"@redwoodjs/auth": "1.3.1",
"@redwoodjs/graphql-server": "1.3.1",
"@redwoodjs/internal": "1.3.1",
Expand All @@ -39,15 +40,16 @@
"@testing-library/jest-dom": "5.16.4",
"@testing-library/react": "12.1.5",
"@testing-library/user-event": "14.1.1",
"@types/aws-lambda": "8.10.95",
"@types/aws-lambda": "8.10.96",
"@types/babel-core": "6.25.7",
"@types/jest": "27.5.0",
"@types/node": "16.11.33",
"@types/react": "17.0.44",
"@types/react": "17.0.45",
"@types/react-dom": "17.0.16",
"@types/webpack": "5.28.0",
"babel-jest": "27.5.1",
"babel-plugin-inline-react-svg": "2.0.1",
"core-js": "3.22.4",
"jest": "27.5.1",
"jest-watch-typeahead": "1.1.0",
"msw": "0.39.2",
Expand Down
Loading

0 comments on commit d1f9801

Please sign in to comment.