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

[v1.0.0-rc] Remove deprecated features #2896

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
7640cdd
Remove schemaDirectives from makeMergedSchema
callingmedic911 Jun 24, 2021
15fdd40
Remove deprecated api-server command
callingmedic911 Jun 24, 2021
b1c102e
Remove deprecated getConfig
callingmedic911 Jun 24, 2021
8c8f640
Remove deprecated prop dataType from form
callingmedic911 Jun 24, 2021
406e39d
Remove deprecated data field in supabase client
callingmedic911 Jun 24, 2021
a23f334
Use transformValue instead of dataType in scaffold form
callingmedic911 Jun 24, 2021
c49fbac
Revert "Remove deprecated api-server command"
callingmedic911 Jul 21, 2021
4df7f8e
Revert "Remove deprecated prop dataType from form"
callingmedic911 Jul 21, 2021
3a1ed4f
Revert "Use transformValue instead of dataType in scaffold form"
callingmedic911 Jul 21, 2021
7879f84
Merge branch 'main' into remove-deprecated-features
dac09 Jul 21, 2021
347f2b5
Merge branch 'main' into remove-deprecated-features
callingmedic911 Sep 29, 2021
e28c0f5
Merge branch 'main' into remove-deprecated-features
callingmedic911 Oct 31, 2021
60a7eb4
Remove deprecated api-server command
callingmedic911 Jun 24, 2021
c49fe55
Remove deprecated global/ambient types
callingmedic911 Oct 31, 2021
7961f0e
Revert "Remove deprecated data field in supabase client"
callingmedic911 Oct 31, 2021
1164800
Update yarn.lock
callingmedic911 Oct 31, 2021
922534b
Merge branch 'main' into remove-deprecated-features
callingmedic911 Nov 9, 2021
7440a26
Merge branch 'main' into remove-deprecated-features
callingmedic911 Nov 10, 2021
9c9327e
Remove deprecation warning for dbAuth scaffold
callingmedic911 Nov 10, 2021
c9413d0
Merge branch 'main' into remove-deprecated-features
callingmedic911 Nov 13, 2021
f9270b5
rm redwood tools
redwoodjsbot Nov 19, 2021
5aea77c
Merge branch 'main' into remove-deprecated-features
jtoar Nov 19, 2021
73ff6ac
style: add back comment
redwoodjsbot Nov 19, 2021
01fc42f
Merge branch 'main' into remove-deprecated-features
thedavidprice Nov 19, 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
31 changes: 1 addition & 30 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
- [Adding a Destroyer](#adding-a-destroyer)
- [Adding a Provider to the Auth Generator](#adding-a-provider-to-the-auth-generator)
- [dbCommands](#dbcommands)
- [redwood-tools](#redwood-tools)
- [Converting to TypeScript](#converting-to-typescript)
- [Generators](#generators)
- [What about...](#what-about)
Expand Down Expand Up @@ -97,8 +96,6 @@ export const handler = (argv) => {
}
```

To get a good sense of the difference, compare [redwood-tools.js](https://github.com/redwoodjs/redwood/blob/d51ade08118c17459cebcdb496197ea52485364a/packages/cli/src/redwood-tools.js#L79-L167) to [dev.js](https://github.com/redwoodjs/redwood/blob/d51ade08118c17459cebcdb496197ea52485364a/packages/cli/src/commands/dev.js#L10-L77), or any other command.

### Overview

Contributing to `@redwoodjs/cli` usually means adding a command or modifying an existing one. We've organized this doc around adding a command since if you know how to do this you'll know how to modify one too.
Expand Down Expand Up @@ -600,31 +597,6 @@ Adding or modifying a command here's no different—there's still a `command

This is because most `dbCommands` are really just running prisma commands, so they really just have to output something like `yarn prisma ...`.

### redwood-tools

[redwood-tools](https://github.com/redwoodjs/redwood/blob/main/packages/cli/src/redwood-tools.js) is Redwood's companion CLI development tool.
You can find a list of its commands in the top-level [contributing](https://github.com/redwoodjs/redwood/blob/main/CONTRIBUTING.md) guide. If you're contributing to `redwood-tools`, you're contributing in a way that helps people contribute, which is pretty meta.

As mentioned, redwood-tools uses the "regular" yargs api, which is defined by method-chaining.
Adding a command here just entails adding another `command` method before the calls to `demandCommand` and `strict` at the end:

```javascript
// ./src/commands/redwood-tools.js

...

.command(
['hello', 'h'],
'Say hi',
{},
() => console.log('hi!')
)
.demandCommand()
.strict().argv
```

Contrived example aside, any command you add here should help people contribute to Redwood.

#### Generators

If you're converting a generator, read the _Goals_ section of tracking issue [#523](https://github.com/redwoodjs/redwood/issues/523); it details some specs you should comply with.
Expand All @@ -651,8 +623,7 @@ redwood/packages/cli
├── commands
├── index.d.ts
├── index.js
├── lib
└── redwood-tools.js
└── lib
```

#### index.js
Expand Down
6 changes: 2 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
"license": "MIT",
"bin": {
"redwood": "./dist/index.js",
"redwood-tools": "./dist/redwood-tools.js",
"rw": "./dist/index.js",
"rwfw": "./dist/rwfw.js",
"rwt": "./dist/redwood-tools.js"
"rwfw": "./dist/rwfw.js"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -66,7 +64,7 @@
"prepublishOnly": "yarn build",
"build:clean-dist": "rimraf 'dist/**/*/__tests__'",
"build:js": "babel src -d dist --extensions \".js,.ts,.tsx\" --copy-files --no-copy-ignored && yarn build:clean-dist",
"fix:permissions": "chmod +x dist/index.js dist/redwood-tools.js dist/rwfw.js",
"fix:permissions": "chmod +x dist/index.js dist/rwfw.js",
"build:watch": "nodemon --watch src --ext \"js,ts,tsx,template\" --ignore dist --exec \"yarn build && yarn fix:permissions\"",
"test": "jest src",
"test:watch": "yarn test --watch"
Expand Down
7 changes: 0 additions & 7 deletions packages/cli/src/commands/generate/scaffold/scaffold.js
Original file line number Diff line number Diff line change
Expand Up @@ -689,13 +689,6 @@ export const handler = async ({
typescript,
tailwind,
}) => {
/** @deprecated Used to be able to create dbAuth pages with `yarn rw g scaffold dbAuth` */
if (modelArg.toLowerCase() === 'dbauth') {
console.info(c.green('\nGenerate dbAuth pages with:\n'))
console.info(' yarn rw generate dbAuth\n')
process.exit(0)
}

if (tests === undefined) {
tests = getConfig().generate.tests
}
Expand Down
Loading