Skip to content

Commit

Permalink
Remove the mongoose adapter (#5280)
Browse files Browse the repository at this point in the history
  • Loading branch information
timleslie authored Mar 30, 2021
1 parent 5777fc6 commit 9e450d6
Show file tree
Hide file tree
Showing 39 changed files with 33 additions and 4,933 deletions.
1 change: 0 additions & 1 deletion .changeset/real-ears-cheat.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
'@keystone-next/fields': major
'@keystone-next/adapter-mongoose-legacy': major
'@keystone-next/fields-legacy': major
---

Expand Down
13 changes: 13 additions & 0 deletions .changeset/tame-points-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
'@keystone-next/example-ecommerce': patch
'@keystone-next/example-roles': patch
'@keystone-next/admin-ui': patch
'@keystone-next/fields': patch
'@keystone-next/keystone': patch
'@keystone-next/fields-legacy': patch
'@keystone-next/test-utils-legacy': patch
'@keystone-next/api-tests-legacy': patch
'@keystone-next/benchmarks-legacy': patch
---

Removed the `adapters-mongoose-legacy` packages dependency.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ While not every changeset is going to need a huge amount of detail, a good idea
- WHY the change was made
- HOW a consumer should update their code

An example, if you generate a changeset that includes `adapter-mongoose` as a patch, and `keystone` as a minor, you can merge your PR, and the next time the `version-packages` command is run, these will both be updated.
An example, if you generate a changeset that includes `adapter-prisma` as a patch, and `keystone` as a minor, you can merge your PR, and the next time the `version-packages` command is run, these will both be updated.

```md
---
'@keystone-next/adapter-mongoose-legacy': patch
'@keystone-next/adapter-prisma-legacy': patch
'@keystone-next/keystone-legacy': minor
---

Expand Down
2 changes: 1 addition & 1 deletion STYLE_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Also, it should go without saying:

- Ensure correct spelling; spell-check documents before committing.
(We _favour_ UK/Australian spelling.)
- Ensure correct capitalisation, inc. product names and acronyms (eg: JavaScript, URL, Node.js, MongoDB).
- Ensure correct capitalisation, inc. product names and acronyms (eg: JavaScript, URL, Node.js).
Note, _abbreviations_ like "etc.", "ie." and "eg." are not acronyms;
they should only be capitalised if at the start of a sentence.
- Ensure correct English grammar (or Miss Willings will come for you 👩🏼‍🏫).
Expand Down
1 change: 0 additions & 1 deletion examples-next/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ To run the projects locally:

- Clone this repo
- Run `yarn` in the root (this repo is a monorepo and uses yarn workspaces, so that will install everything you'll need)
- Make sure you have a local mongo server up and running on the default port
- Open one of the example project folders in your terminal and run `yarn dev`

If everything works 🤞 the GraphQL Server and Admin UI will start on [localhost:3000](http://localhost:3000)
Expand Down
1 change: 0 additions & 1 deletion examples-next/ecommerce/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ To run the project locally:

- Clone this repo
- Run `yarn` in the root (this repo is a monorepo and uses yarn workspaces, so that will install everything you'll need)
- Make sure you have a local mongo server up and running on the default port
- Open this folder in your terminal and run `yarn dev`

If everything works 🤞 the GraphQL Server and Admin UI will start on [localhost:3000](http://localhost:3000)
1 change: 0 additions & 1 deletion examples-next/roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ To run the project locally:

- Clone this repo
- Run `yarn` in the root (this repo is a monorepo and uses yarn workspaces, so that will install everything you'll need)
- Make sure you have a local mongo server up and running on the default port
- Open this folder in your terminal and run `yarn dev`

If everything works 🤞 the GraphQL Server and Admin UI will start on [localhost:3000](http://localhost:3000)
1 change: 0 additions & 1 deletion packages-next/admin-ui/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
- [ ] Add an example that implements custom fields
- [x] `idField` option
- [x] autoIncrement in fields package
- [x] mongoId in fields package
- [x] `idField` option
- [x] disallow `id` field in fields object
- [x] default `idField` to `autoIncrement` for Prisma with fieldMode: 'hidden' for itemView and createView
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export const fieldName = 'orderNumber';
export const skipCreateTest = false;
export const skipUpdateTest = true;

// `AutoIncrement` field type is not supported by `mongoose`. So, we need to filter it out while performing `API` tests.
export const unSupportedAdapterList = ['mongoose', 'prisma_sqlite'];
export const unSupportedAdapterList = ['prisma_sqlite'];

// Be default, `AutoIncrement` are read-only. But for `isRequired` test purpose, we need to bypass these restrictions.
export const fieldConfig = (matrixValue: MatrixValue) => ({
Expand Down
1 change: 0 additions & 1 deletion packages-next/keystone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
"@types/express": "^4.17.11",
"@types/fs-extra": "^9.0.9",
"@types/graphql-upload": "^8.0.4",
"@types/keystonejs__adapter-mongoose": "^5.1.2",
"@types/keystonejs__keystone": "^7.0.1",
"@types/pluralize": "^0.0.29",
"@types/prettier": "^2.2.3",
Expand Down
2 changes: 0 additions & 2 deletions packages/adapter-mongoose/.npmignore

This file was deleted.

870 changes: 0 additions & 870 deletions packages/adapter-mongoose/CHANGELOG.md

This file was deleted.

54 changes: 0 additions & 54 deletions packages/adapter-mongoose/README.md

This file was deleted.

6 changes: 0 additions & 6 deletions packages/adapter-mongoose/index.js

This file was deleted.

Loading

1 comment on commit 9e450d6

@vercel
Copy link

@vercel vercel bot commented on 9e450d6 Mar 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.