@movable/rollup-plugin-package-manifest-validator 3.7.0 → 3.9.1-canary.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.studioIcons = exports.propertyTypes = exports.fieldTypes = exports.contextOptionTypes = void 0;
7
- const contextOptionTypes = ['select', 'text', 'hidden'];
7
+ const contextOptionTypes = ['select', 'text', 'hidden', 'time', 'datetime'];
8
8
  exports.contextOptionTypes = contextOptionTypes;
9
9
  const propertyTypes = ['text', 'image', 'link', 'api', 'boolean'];
10
10
  exports.propertyTypes = propertyTypes;
@@ -417,7 +417,7 @@ var _default = {
417
417
  required: ['name', 'label', 'properties'],
418
418
  additionalProperties: false
419
419
  },
420
- minItems: 1,
420
+ minItems: 0,
421
421
  maxItems: 1
422
422
  },
423
423
  element_modifiers: {
@@ -492,6 +492,22 @@ var _default = {
492
492
  required: ['name', 'label'],
493
493
  additionalProperties: false
494
494
  }
495
+ },
496
+ rule_property_references: {
497
+ type: 'array',
498
+ items: {
499
+ type: 'object',
500
+ properties: {
501
+ property_group: {
502
+ type: 'string'
503
+ },
504
+ name: {
505
+ type: 'string'
506
+ }
507
+ },
508
+ required: ['property_group', 'name'],
509
+ additionalProperties: false
510
+ }
495
511
  }
496
512
  },
497
513
  additionalProperties: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/rollup-plugin-package-manifest-validator",
3
- "version": "3.7.0",
3
+ "version": "3.9.1-canary.0",
4
4
  "description": "Validates package-manifest.yml",
5
5
  "main": "dist",
6
6
  "keywords": [],
@@ -38,5 +38,5 @@
38
38
  "volta": {
39
39
  "extends": "../../package.json"
40
40
  },
41
- "gitHead": "7139b3a40f09d65c236aa3a47571806dbc28fd40"
41
+ "gitHead": "3e5c243fb9008b0f4e28903a0cdf2b2f4e068086"
42
42
  }
@@ -1,4 +1,4 @@
1
- const contextOptionTypes = ['select', 'text', 'hidden'];
1
+ const contextOptionTypes = ['select', 'text', 'hidden', 'time', 'datetime'];
2
2
 
3
3
  const propertyTypes = ['text', 'image', 'link', 'api', 'boolean'];
4
4
 
@@ -248,7 +248,7 @@ export default {
248
248
  required: ['name', 'label', 'properties'],
249
249
  additionalProperties: false
250
250
  },
251
- minItems: 1,
251
+ minItems: 0,
252
252
  maxItems: 1
253
253
  },
254
254
  element_modifiers: {
@@ -293,6 +293,18 @@ export default {
293
293
  required: ['name', 'label'],
294
294
  additionalProperties: false
295
295
  }
296
+ },
297
+ rule_property_references: {
298
+ type: 'array',
299
+ items: {
300
+ type: 'object',
301
+ properties: {
302
+ property_group: { type: 'string' },
303
+ name: { type: 'string' }
304
+ },
305
+ required: ['property_group', 'name'],
306
+ additionalProperties: false
307
+ }
296
308
  }
297
309
  },
298
310
  additionalProperties: false
@@ -436,15 +436,7 @@ describe('pacakgeManifestValidator utility', async () => {
436
436
  );
437
437
  });
438
438
 
439
- it('has a single property group', async () => {
440
- const noPropertyGroupsManifest = {
441
- name: 'test',
442
- studio_options: {
443
- property_groups: []
444
- }
445
- };
446
- const { warnings: noPropertyGroupsWarnings } = manifestValidator(noPropertyGroupsManifest);
447
-
439
+ it('has up to one property group', async () => {
448
440
  const tooManyMPropertyGroupsManifest = {
449
441
  name: 'test',
450
442
  studio_options: {
@@ -476,10 +468,6 @@ describe('pacakgeManifestValidator utility', async () => {
476
468
  tooManyMPropertyGroupsManifest
477
469
  );
478
470
 
479
- expect(noPropertyGroupsWarnings[0].message).to.eq(
480
- 'should NOT have fewer than 1 items',
481
- 'must have exactly one property group'
482
- );
483
471
  expect(tooManyMPropertyGroupsWarnings[0].message).to.eq(
484
472
  'should NOT have more than 1 items',
485
473
  'cannot have more than one property group'