Skip to content

Commit

Permalink
fix: version updater
Browse files Browse the repository at this point in the history
  • Loading branch information
lekhmanrus committed Nov 19, 2024
1 parent b96814a commit 859d895
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .versionrc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"filename": "./projects/ngx-google-maps-places-api/package.json",
"type": "json"
},
{
"filename": "./projects/ngx-google-maps-places-autocomplete/package.json",
"type": "json"
},
{
"filename": "./projects/ngx-google-maps-places-autocomplete/package.json",
"updater": "./scripts/autocomplete-package-version-updater.js"
Expand Down
4 changes: 4 additions & 0 deletions scripts/autocomplete-package-version-updater.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ const stringifyPackage = require('stringify-package')
const detectIndent = require('detect-indent')
const detectNewline = require('detect-newline')

module.exports.readVersion = function(contents) {
return JSON.parse(contents).peerDependencies['ngx-google-maps-places-api'];
};

module.exports.writeVersion = function(contents, version) {
const json = JSON.parse(contents);
let indent = detectIndent(contents).indent;
Expand Down

0 comments on commit 859d895

Please # to comment.