Skip to content

Commit

Permalink
[v1.0.0-rc] Remove deprecated features (#2896)
Browse files Browse the repository at this point in the history
* Remove schemaDirectives from makeMergedSchema

* Remove deprecated api-server command

* Remove deprecated getConfig

* Remove deprecated prop dataType from form

* Remove deprecated data field in supabase client

* Use transformValue instead of dataType in scaffold form

* Revert "Remove deprecated api-server command"

This reverts commit 15fdd40.

* Revert "Remove deprecated prop dataType from form"

This reverts commit 8c8f640.

* Revert "Use transformValue instead of dataType in scaffold form"

This reverts commit 9e2c4ea.

* Remove deprecated api-server command

* Remove deprecated global/ambient types

* Revert "Remove deprecated data field in supabase client"

This reverts commit 406e39d.

* Update yarn.lock

* Remove deprecation warning for dbAuth scaffold

* rm redwood tools

* style: add back comment

Co-authored-by: Daniel Choudhury <[email protected]>
Co-authored-by: Dominic Saadi <[email protected]>
Co-authored-by: Dominic Saadi <[email protected]>
Co-authored-by: David Price <[email protected]>
  • Loading branch information
5 people authored Nov 19, 2021
1 parent 2d2d90c commit 44082ed
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 485 deletions.
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&mdash;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

0 comments on commit 44082ed

Please sign in to comment.