Skip to content

Commit

Permalink
fix(gatsby-plugin-google-analytics): remove required on trackingId (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Marvin Frachet authored Oct 12, 2020
1 parent 8c79fbe commit 3518d10
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
9 changes: 4 additions & 5 deletions packages/gatsby-plugin-google-analytics/src/gatsby-node.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
exports.pluginOptionsSchema = ({ Joi }) =>
// TODO: make sure that trackingId gets required() when releasing a major version
Joi.object({
trackingId: Joi.string()
.required()
.description(
`The property ID; the tracking code won't be generated without it`
),
trackingId: Joi.string().description(
`The property ID; the tracking code won't be generated without it`
),
head: Joi.boolean()
.default(false)
.description(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,17 +268,6 @@ describe(`Load plugins`, () => {
"context": Object {
"pluginName": "gatsby-plugin-google-analytics",
"validationErrors": Array [
Object {
"context": Object {
"key": "trackingId",
"label": "trackingId",
},
"message": "\\"trackingId\\" is required",
"path": Array [
"trackingId",
],
"type": "any.required",
},
Object {
"context": Object {
"key": "anonymize",
Expand Down

0 comments on commit 3518d10

Please sign in to comment.