@hubspot/npm-scripts 0.0.5-experimental.5 → 0.0.5-experimental.6

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/npm-scripts",
3
- "version": "0.0.5-experimental.5",
3
+ "version": "0.0.5-experimental.6",
4
4
  "description": "Scripts for working with npm packages in the HubSpot ecosystem",
5
5
  "author": "",
6
6
  "license": "Apache-2.0",
@@ -78,7 +78,7 @@ function buildHandler({ build, packageName, localVersion, mainBranch, }) {
78
78
  }
79
79
  logger.log('\nPackaging pre-release...');
80
80
  await exec(`mkdir -p releases && ${vsceCmd} package --pre-release -o releases/`);
81
- logger.success('Pre-release package created.');
81
+ logger.success('Pre-release package created in releases/');
82
82
  logger.log('\nTo test the package locally:');
83
83
  logger.log(' 1. Open VS Code');
84
84
  logger.log(' 2. Go to the Extensions panel');
@@ -96,9 +96,9 @@ function buildHandler({ build, packageName, localVersion, mainBranch, }) {
96
96
  logger.log(`\nUpdating version to ${newVersion}...`);
97
97
  await exec(`yarn version --no-git-tag-version --new-version ${newVersion}`);
98
98
  logger.success('Version updated in package.json');
99
- logger.log('\nPackaging regular release...');
99
+ logger.log('\nPackaging regular release (this will overwrite the pre-release .vsix)...');
100
100
  await exec(`mkdir -p releases && ${vsceCmd} package -o releases/`);
101
- logger.success('Regular release package created.');
101
+ logger.success('Regular release package created in releases/');
102
102
  const confirmRegularRelease = await confirm({
103
103
  message: 'Test the regular release .vsix and confirm it works. Ready to proceed?',
104
104
  });
@@ -109,6 +109,8 @@ function buildHandler({ build, packageName, localVersion, mainBranch, }) {
109
109
  }
110
110
  const tempBranch = `v${newVersion}-publish`;
111
111
  if (isDryRun) {
112
+ logger.log('\nReverting package.json version...');
113
+ await exec('git checkout -- package.json');
112
114
  logger.log('\nDry run complete. Would have:');
113
115
  logger.log(` 1. Created branch ${tempBranch}`);
114
116
  logger.log(` 2. Committed package.json version bump`);
@@ -141,6 +143,8 @@ function buildHandler({ build, packageName, localVersion, mainBranch, }) {
141
143
  }
142
144
  catch (e) {
143
145
  logger.error(e);
146
+ logger.log('Reverting package.json...');
147
+ await exec('git checkout -- package.json');
144
148
  process.exit(EXIT_CODES.ERROR);
145
149
  }
146
150
  };