Skip to content

Commit

Permalink
chore(#517): remove deprecated fields by default (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher authored Feb 12, 2024
1 parent 8407fd2 commit 8e4d246
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/strange-bottles-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"druxt-entity": minor
---

chore(#517): removed deprecated entity component fields by default
5 changes: 1 addition & 4 deletions packages/entity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ module.exports = {
druxt: {
baseUrl: 'https://demo-api.druxtjs.org',
entity: {
component: {
fields: false,
},
query: {
schema: true,
fields: ['path', 'title'],
Expand Down Expand Up @@ -97,7 +94,7 @@ These options are specific to this module.

| Option | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `entity.components.fields` | `boolean` | No | `true` | Whether to import deprecated default Field components. |
| `entity.components.fields` | `boolean` | No | `false` | Whether to import deprecated default Field components. |
| `entity.query.fields` | `string[]` | No | `[]` | An array of fields to filter all Entity JSON:API queries. |
| `entity.query.schema` | `boolean` | No | `false` | Whether to automatically filter fields based on Display schema. |

Expand Down
2 changes: 1 addition & 1 deletion packages/entity/src/nuxtModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const DruxtEntityNuxtModule = async function (moduleOptions = {}) {
...((this.options || {}).druxt || {}).entity,
...moduleOptions,
components: {
fields: true,
fields: false,
...(((this.options || {}).druxt || {}).entity || {}).components,
...moduleOptions.components
}
Expand Down

0 comments on commit 8e4d246

Please sign in to comment.