diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..b6f27f1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +engine-strict=true diff --git a/package-lock.json b/package-lock.json index e151a1c..e39c55f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "tc-source-content-updater", - "version": "1.4.26", + "version": "1.4.27-beta", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "tc-source-content-updater", - "version": "1.4.26", + "version": "1.4.27-beta", "license": "ISC", "dependencies": { "adm-zip": "^0.4.11", @@ -45,6 +45,9 @@ "tsv-groupdata-parser": "1.1.0", "usfm-js": "3.4.0" }, + "engines": { + "node": ">=16.14 <16.21" + }, "peerDependencies": { "bible-reference-range": "^1.0.1", "string-punctuation-tokenizer": "^2.2.0", diff --git a/package.json b/package.json index e4a557f..3341864 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "tc-source-content-updater", - "version": "1.4.26", + "version": "1.4.27-beta", "description": "Module that updates source content for the desktop application translationCore.", "main": "lib/index.js", "display": "library", @@ -47,6 +47,9 @@ "url": "https://github.com/unfoldingWord/tc-source-content-updater/issues" }, "homepage": "https://github.com/unfoldingWord/tc-source-content-updater#readme", + "engines": { + "node": ">=16.14 <16.21" + }, "devDependencies": { "babel-cli": "^6.26.0", "babel-core": "^6.26.0", diff --git a/src/helpers/apiHelpers.js b/src/helpers/apiHelpers.js index b0e6eb0..175466f 100644 --- a/src/helpers/apiHelpers.js +++ b/src/helpers/apiHelpers.js @@ -250,7 +250,10 @@ function filterOutMasterBranch(catalog, ignoredResources = [], newCatalog = []) if (sourceResource) { const _tagName = sourceResource.branch_or_tag_name; if (isValidVersionTag(_tagName)) { + // copy latest release data from source resource.branch_or_tag_name = _tagName; + resource.released = sourceResource.released; + resource.modified = sourceResource.modified; return true; } } @@ -294,7 +297,7 @@ export async function getCatalog(config = {}) { let catalogReleases_ = filterOutMasterBranch(catalogReleases, ['obs', 'obs-tn'], newCatalogReleases); console.log(`getCatalog - found ${catalogReleases_.length} items in old Door43-Catalog after filter`); - let newCatalogReleases_ = filterOutMasterBranch(newCatalogReleases, ['obs', 'obs-tn']); + const newCatalogReleases_ = filterOutMasterBranch(newCatalogReleases, ['obs', 'obs-tn']); console.log(`getCatalog - found ${newCatalogReleases_.length} items in catalog next after filter`); // merge catalogs together - catalog new takes precedence