Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

zapier convert: Add track info in converted app's package.json #245

Merged
merged 2 commits into from
Feb 20, 2018

Conversation

eliangcs
Copy link
Member

@eliangcs eliangcs commented Feb 20, 2018

Adds to custom fields to the converted app's package.json:

  • convertedFromAppID: the source WB app which was being converted to CLI
  • convertedByCLIVersion: the CLI version that was used to perform zapier convert

The two fields are nested in a field named zapier, which allows us to add any other custom fields in the future.

@eliangcs eliangcs requested a review from xavdid February 20, 2018 07:15
Copy link
Contributor

@xavdid xavdid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome change! will definitely help our foggy memories.

Only other thing i'd do is add a single test somewhere that expects the zapier. convertedByCLIVersion value to be truthy in the output app. Not a big deal if that's not an easy line to drop into a test, but if it's already mostly there, a worthwhile add

@@ -5,6 +5,7 @@ const stripComments = require('strip-comments');
const { camelCase, snakeCase } = require('./misc');
const { copyFile, readFile, writeFile, ensureDir } = require('./files');
const { printStarting, printDone } = require('./display');
const CLI_VERSION = require('../../package.json').version;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eliangcs
Copy link
Member Author

eliangcs commented Feb 20, 2018

@xavdid pushed 6d8014e, which adds a test ensuring track info is correctly rendered and imports CLI version from constants instead. Also fixed a bug on the way: zapier convert crashes when the app description contains a single quote.

@eliangcs eliangcs merged commit 66a7f0c into master Feb 20, 2018
@eliangcs eliangcs deleted the convert-track-converted-from branch February 20, 2018 09:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants