Skip to content

Commit

Permalink
Merge branch 'main' of github.com:redwoodjs/redwood into rc-serverles…
Browse files Browse the repository at this point in the history
…s-setup

* 'main' of github.com:redwoodjs/redwood: (87 commits)
  Update scripts tsconfig (#4258)
  Update dependency @types/aws-lambda to v8.10.92 (#4260)
  Update dependency @apollo/client to v3.5.8 (#4262)
  Update dependency msw to v0.36.7 (#4252)
  Update typescript-eslint monorepo to v5.10.1 (#4256)
  Update dependency webpack-cli to v4.9.2 (#4254)
  Update dependency @supabase/supabase-js to v1.29.4 (#4253)
  Update dependency supertokens-auth-react to v0.18.4 (#4255)
  Update dependency ts-morph to v13.0.3 (#4251)
  Update dependency supertokens-auth-react to v0.18.3 (#4248)
  Update dependency esbuild to v0.14.13 (#4249)
  Fixed netlify api config (#4247)
  Add storybook ci option to test that Storybook starts "ok" (#3515)
  Update dependency react-hook-form to v7.25.0 (#4245)
  Update dependency firebase-admin to v10.0.2 (#4244)
  Fix type definitions for pages that take props (#4219)
  update yarn.lock
  v0.42.1
  update yarn.lock
  Pin dependency @types/yargs to v16.0.4 (#4243)
  ...
  • Loading branch information
dac09 committed Jan 25, 2022
2 parents cb1da55 + f4e594d commit 2670eda
Show file tree
Hide file tree
Showing 108 changed files with 2,680 additions and 1,769 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Expand Up @@ -127,14 +127,15 @@ module.exports = {
'packages/api-server/src/**',
'packages/cli/src/**',
'packages/core/config/**',
'packages/create-redwood-app/src/create-redwood-app.js',
'packages/create-redwood-app/src/*.js',
'packages/internal/src/**',
'packages/prerender/src/**',
'packages/structure/src/**',
'packages/testing/src/**',
'packages/testing/config/**',
'packages/eslint-config/*.js',
'packages/record/src/**',
'packages/telemetry/src/**',
],
env: {
es6: true,
Expand Down
50 changes: 32 additions & 18 deletions .github/renovate.json
@@ -1,6 +1,16 @@
{
"extends": [
"config:base"
"extends": ["config:base"],
"postUpdateOptions": ["yarnDedupeHighest"],
"assignees": ["@jtoar"],
"labels": ["release:chore"],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch"
],
"automerge": true
}
],
"ignoreDeps": [
"boxen",
Expand All @@ -15,20 +25,24 @@
"@types/node-fetch",
"chalk",
"pascalcase",
"node-fetch"
],
"packageRules": [
{
"matchUpdateTypes": [
"minor",
"patch"
],
"automerge": true
}
],
"postUpdateOptions": ["yarnDedupeHighest"],
"assignees": [
"@jtoar"
],
"labels": ["release:chore"]
"node-fetch",
"@redwoodjs/api",
"@redwoodjs/api-server",
"@redwoodjs/auth",
"@redwoodjs/cli",
"@redwoodjs/codemods",
"@redwoodjs/core",
"@redwoodjs/create-redwood-app",
"@redwoodjs/eslint-config",
"@redwoodjs/forms",
"@redwoodjs/graphql-server",
"@redwoodjs/internal",
"@redwoodjs/prerender",
"@redwoodjs/record",
"@redwoodjs/router",
"@redwoodjs/structure",
"@redwoodjs/telemetry",
"@redwoodjs/testing",
"@redwoodjs/web"
]
}
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yaml
Expand Up @@ -82,14 +82,17 @@ jobs:
working-directory: ./tasks/e2e
spec: |
cypress/integration/01-tutorial/*.spec.js
cypress/integration/03-storybook/*.spec.js
cypress/integration/04-logger/*.spec.js
- name: Prepare for CLI checks by restoring 01-tutorial end state
run: |
git restore . && git clean -df
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Run `rw storybook`
run: yarn rw storybook --smoke-test
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Run `rw test api`
run: yarn rw test api --no-watch
working-directory: ${{ steps.createpath.outputs.project_path }}
Expand Down
80 changes: 0 additions & 80 deletions .github/workflows/projects_beta_automation.yml

This file was deleted.

96 changes: 96 additions & 0 deletions .github/workflows/telemetry-benchmarks.yaml
@@ -0,0 +1,96 @@
name: Telemetry Checks and Benchmarks

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
cypress-run:
if: github.repository == 'redwoodjs/redwood'
strategy:
matrix:
os: ['ubuntu-latest']
node-version: ['14', '16']
fail-fast: true
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} | Node ${{ matrix.node-version }} latest
env:
REDWOOD_CI: 1
REDWOOD_VERBOSE_TELEMETRY: 1
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Cache yarn
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-
- name: Install dependencies and Build Framework
run: |
yarn install --immutable
yarn build:clean && yarn build:js
- name: Create a temporary directory
id: createpath
run: |
project_path=$(mktemp -d -t redwood.XXXXXX)
echo "::set-output name=project_path::$project_path"
framework_path=$(pwd)
echo "::set-output name=framework_path::$framework_path"
- name: Create Redwood Project
run: |
yarn babel-node packages/create-redwood-app/src/create-redwood-app.js ${{ steps.createpath.outputs.project_path }} --no-yarn-install
- name: Add Framework Dependencies to Project
run: |
yarn project:deps ${{ steps.createpath.outputs.project_path }}
- name: Run Project Yarn Install
run: |
yarn install
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Copy Framework Packages to Project
run: |
yarn project:copy ${{ steps.createpath.outputs.project_path }}
- name: Run `rw info`
run: |
yarn rw info
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Run `rw build`
run: |
yarn rw build
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Run "prisma migrate dev"
run: |
yarn rw prisma migrate dev --name ci-test
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Run "g page"
run: |
yarn rw g page home /
working-directory: ${{ steps.createpath.outputs.project_path }}

- name: Throw Error | Run `rw g sdl <model>`
run: |
yarn rw g sdl DoesNotExist
working-directory: ${{ steps.createpath.outputs.project_path }}
continue-on-error: true
1 change: 1 addition & 0 deletions .gitpod.yml
Expand Up @@ -20,6 +20,7 @@ tasks:
before: |
export RWFW_PATH="/workspace/redwood"
export RWJS_DEV_API_URL="http://localhost"
export REDWOOD_DISABLE_TELEMETRY=1
init: |
cd /workspace/redwood
yarn install
Expand Down
23 changes: 15 additions & 8 deletions CONTRIBUTING.md
Expand Up @@ -10,7 +10,8 @@ Before interacting with the Redwood community, please read and understand our [C
- [Code Organization](#code-organization)
- [Local Setup](#local-setup)
- [Redwood Framework](#redwood-framework)
- [Redwood Project: Create a Functional Test Project](#redwood-project-create-a-functional-test-project)
- [Redwood Project: Options](#redwood-project-options)
- [Redwood Functional Test Project](#redwood-functional-test-project)
- [Testing the Framework in Your Project](#testing-the-framework-in-your-project)
- [Testing the CLI in Your Project](#testing-the-cli-in-your-project)
- [Browser-based Setup](#browser-based-setup)
Expand Down Expand Up @@ -49,26 +50,28 @@ cd redwood
yarn install
```

### Redwood Project: Create a Functional Test Project
### Redwood Project: Options

You'll almost always want to test the functionality of your changes to the Redwood Framework in a Redwood Project. When it comes to getting a Redwood Project to test your changes out in, you have several options:

- run `yarn create redwood-app ./redwood-project`
- `git clone` the [RedwoodJS Tutorial Blog](https://github.com/redwoodjs/redwood-tutorial)
- use a project you've already created
- run `yarn run build:test-project <project path>` from the root of your local copy of the Redwood Framework to create a functional test project 👀
- create a functional test project using `yarn run build:test-project <project directory>` 👀

**Using the functional test project might be the fastest and easiest way to test your changes.** You can create a Redwood Project that contains a lot of functionality in just a few minutes. For example, here's a brief overview of all the things `yarn run build:test-project <project directory>` does. It...
**Using the functional test project might be the fastest and easiest way to test your changes.**

#### Redwood Functional Test Project

You can create a Redwood Project that contains a lot of functionality in just a few minutes. For example, here's a brief overview of all the things `yarn run build:test-project <project directory>` does. It...

1. installs using the `create-redwood-app` template in the current branch of your Redwood Framework
2. with the current `canary` version of Redwood Packages (with the option to use the `latest` stable version)
3. with a JavaScript language target (with the option for TypeScript)
4. then applies code mods from the [Redwood tutorial](https://learn.redwoodjs.com/docs/tutorial/welcome-to-redwood/) to add functionality and styling
5. and initializes a Prisma DB migration for SQLite

Unless you've already got a project with a lot of functionality, it'd take quite some to add all of this yourself. Moreover, testing your changes in a project that has a lot of functionality will increase your confidence in the changes you're making.

But how do you actually test your changes in the Redwood Framework in your Redwood Project? With another command, this time in the root of your Redwood Project: `yarn rwfw`.
Run `yarn run build:test-project <project path>` from the root of your local copy of the Redwood Framework to create a functional test project.

> Besides `<project directory>`, `build:test-project` takes a few other options as well:
>
Expand All @@ -88,6 +91,10 @@ But how do you actually test your changes in the Redwood Framework in your Redwo
> yarn run build:test-project ~/my-repos/redwood-project --typescript --link
> ```
Unless you've already got a project with a lot of functionality, it'd take quite some to add all of this yourself. Moreover, testing your changes in a project that has a lot of functionality will increase your confidence in the changes you're making.

But how do you actually test your changes in the Redwood Framework in your Redwood Project? With another command, this time in the root of your Redwood Project: `yarn rwfw`.

### Testing the Framework in Your Project

As you make changes to the Redwood Framework, you'll want to see your changes reflected "live" in a Redwood Project. Since we're always looking for ways to make contributing to Redwood easier, there are a few workflows we've come up with. The one you'll want to use is `yarn rwfw`.
Expand Down Expand Up @@ -145,7 +152,7 @@ To do that, use the `--cwd` option to set the current working directory to your
cd redwood
yarn build
cd packages/cli
yarn dev --cwd <project directory>
yarn dev <cli command> --cwd <project directory>
```

`yarn dev` runs the CLI and `--cwd` makes the command run in your Redwood Project. If you make a change to the code, remember to rebuild the packages!
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
@@ -1,5 +1,5 @@
{
"version": "0.41.0",
"version": "0.42.1",
"npmClient": "yarn",
"useWorkspaces": true,
"command": {
Expand Down
10 changes: 5 additions & 5 deletions package.json
Expand Up @@ -27,10 +27,10 @@
"babel-jest": "27.4.6",
"babel-plugin-auto-import": "1.1.0",
"babel-plugin-remove-code": "0.0.6",
"core-js": "3.20.2",
"cypress": "9.2.1",
"core-js": "3.20.3",
"cypress": "9.3.1",
"cypress-wait-until": "1.7.2",
"eslint": "8.6.0",
"eslint": "8.7.0",
"fast-glob": "3.2.11",
"jest": "27.4.7",
"jscodeshift": "0.13.0",
Expand All @@ -42,15 +42,15 @@
"ora": "5.4.1",
"rimraf": "3.0.2",
"terminal-link": "2.1.1",
"typescript": "4.5.4",
"typescript": "4.5.5",
"typescript-transform-paths": "3.3.1"
},
"resolutions": {
"@types/react": "17.0.38",
"prop-types": "15.8.1",
"react-dom": "17.0.2",
"react": "17.0.2",
"typescript": "4.5.4",
"typescript": "4.5.5",
"vscode-languageserver-protocol": "3.15.3",
"vscode-languageserver-types": "3.16.0",
"vscode-languageserver": "6.1.1",
Expand Down

0 comments on commit 2670eda

Please sign in to comment.