docworks-repo
Advanced tools
Comparing version 1.4.0 to 1.4.4
@@ -109,6 +109,7 @@ 'use strict'; | ||
var changedSetter = !compareAttribute(newProperty.set, repoProperty.set, messages, key, 'setter'); | ||
var defaultValue = !compareAttribute(newProperty.defaultValue, repoProperty.defaultValue, messages, key, 'default value'); | ||
var docsChanged = !compareDocs(newProperty.srcDocs, repoProperty.srcDocs, messages, key); | ||
var extraMerge = (0, _plugins.runPlugins)(plugins, 'docworksMergeProperty', newProperty.extra || {}, repoProperty.extra || {}, messages, key); | ||
var changed = changedType || changedGetter || changedSetter || docsChanged || extraMerge.changed; | ||
var changed = changedType || changedGetter || changedSetter || defaultValue || docsChanged || extraMerge.changed; | ||
var item = (0, _collectionUtils.copy)(repoProperty, { | ||
@@ -119,2 +120,3 @@ labels: updateLabels(repoProperty.labels, changed), | ||
set: newProperty.set, | ||
defaultValue: newProperty.defaultValue, | ||
srcDocs: (0, _collectionUtils.copy)(newProperty.srcDocs), | ||
@@ -121,0 +123,0 @@ locations: newProperty.locations, |
@@ -201,6 +201,7 @@ 'use strict'; | ||
type: { pos: 5 }, | ||
locations: Object.assign({ pos: 6 }, locationSpec), | ||
docs: Object.assign({ pos: 7 }, docSpec), | ||
srcDocs: Object.assign({ pos: 8 }, docSpec), | ||
extra: { pos: 9 } | ||
defaultValue: { pos: 6 }, | ||
locations: Object.assign({ pos: 7 }, locationSpec), | ||
docs: Object.assign({ pos: 8 }, docSpec), | ||
srcDocs: Object.assign({ pos: 9 }, docSpec), | ||
extra: { pos: 10 } | ||
}; | ||
@@ -207,0 +208,0 @@ var paramSpec = { |
@@ -57,6 +57,7 @@ import {zipByKey, addRemoveLabels, hasLabel, copy, compareArraysAsSets} from './collection-utils'; | ||
let changedSetter = !compareAttribute(newProperty.set, repoProperty.set, messages, key, 'setter'); | ||
let defaultValue = !compareAttribute(newProperty.defaultValue, repoProperty.defaultValue, messages, key, 'default value'); | ||
let docsChanged = !compareDocs(newProperty.srcDocs, repoProperty.srcDocs, messages, key); | ||
let extraMerge = runPlugins(plugins, 'docworksMergeProperty', newProperty.extra || {}, repoProperty.extra || {}, messages, key); | ||
let changed = changedType || changedGetter || changedSetter || docsChanged || extraMerge.changed; | ||
let changed = changedType || changedGetter || changedSetter || defaultValue || docsChanged || extraMerge.changed; | ||
let item = copy(repoProperty, { | ||
@@ -67,2 +68,3 @@ labels: updateLabels(repoProperty.labels, changed), | ||
set: newProperty.set, | ||
defaultValue: newProperty.defaultValue, | ||
srcDocs: copy(newProperty.srcDocs), | ||
@@ -69,0 +71,0 @@ locations: newProperty.locations, |
@@ -27,6 +27,7 @@ import {join} from 'path'; | ||
type: {pos: 5}, | ||
locations: Object.assign({pos: 6}, locationSpec), | ||
docs: Object.assign({pos: 7}, docSpec), | ||
srcDocs: Object.assign({pos: 8}, docSpec), | ||
extra: {pos: 9} | ||
defaultValue: {pos: 6}, | ||
locations: Object.assign({pos: 7}, locationSpec), | ||
docs: Object.assign({pos: 8}, docSpec), | ||
srcDocs: Object.assign({pos: 9}, docSpec), | ||
extra: {pos: 10} | ||
}; | ||
@@ -33,0 +34,0 @@ const paramSpec = { |
{ | ||
"name": "docworks-repo", | ||
"version": "1.4.0", | ||
"version": "1.4.4", | ||
"description": "manage service files in a git repo", | ||
@@ -15,4 +15,4 @@ "main": "dist/index.js", | ||
"array-flatten": "^2.1.1", | ||
"docworks-jsdoc2spec": "^1.3.11", | ||
"docworks-json": "^1.3.11", | ||
"docworks-jsdoc2spec": "^1.4.4", | ||
"docworks-json": "^1.4.4", | ||
"fs-extra": "^3.0.1", | ||
@@ -19,0 +19,0 @@ "lodash.isequal": "^4.5.0" |
@@ -411,2 +411,16 @@ import chai from 'chai'; | ||
it('should report changed property default value', function() { | ||
let {repo: newRepo, prop: newProp1} = repoServiceProp(baseNewRepo, 'ChangeServiceProperties7', 'prop1'); | ||
let {repo} = repoServiceProp(baseRepo, 'ChangeServiceProperties7', 'prop1'); | ||
let mergedRepo = merge(newRepo, repo); | ||
expect(mergedRepo.messages).to.containSubset(['Service ChangeServiceProperties7 property prop1 has changed default value']); | ||
let {service, prop: prop1} = repoServiceProp(mergedRepo.repo, 'ChangeServiceProperties7', 'prop1'); | ||
expect(service.labels).to.include.members(['changed']); | ||
expect(prop1.labels).to.include.members(['changed']); | ||
expect(prop1.defaultValue).to.equal(newProp1.defaultValue); | ||
}); | ||
it('should report changed property get/set', function() { | ||
@@ -413,0 +427,0 @@ let {repo: newRepo, prop: newProp1} = repoServiceProp(baseNewRepo, 'ChangeServiceProperties4', 'prop1'); |
@@ -138,1 +138,24 @@ /** | ||
} | ||
/** | ||
* @class ChangeServiceProperties7 | ||
*/ | ||
export class ChangeServiceProperties7 { | ||
/** | ||
* @member prop1 | ||
* @memberof ChangeServiceProperties7 | ||
* @type {String} | ||
* @default def | ||
*/ | ||
get prop1() { | ||
} | ||
/** | ||
* @member prop1 | ||
* @memberof ChangeServiceProperties7 | ||
* @param {String} value The new label to display. | ||
*/ | ||
set prop1(value) { | ||
} | ||
} | ||
@@ -130,1 +130,23 @@ /** | ||
} | ||
/** | ||
* @class ChangeServiceProperties7 | ||
*/ | ||
export class ChangeServiceProperties7 { | ||
/** | ||
* @member prop1 | ||
* @memberof ChangeServiceProperties7 | ||
* @type {String} | ||
* @default abc | ||
*/ | ||
get prop1() { | ||
} | ||
/** | ||
* @member prop1 | ||
* @memberof ChangeServiceProperties7 | ||
* @param {String} value The new label to display. | ||
*/ | ||
set prop1(value) { | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
155030
4112
1
Updateddocworks-jsdoc2spec@^1.4.4
Updateddocworks-json@^1.4.4