monorepo-next 12.0.5 → 12.1.0

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/README.md CHANGED
@@ -124,6 +124,8 @@ Options:
124
124
  --push git push + tags when done
125
125
  [boolean] [default: true]
126
126
  --publish npm publish when done[boolean] [default: true]
127
+ --dist-tag publish to a different NPM dist-tag
128
+ [string] [default: "latest"]
127
129
  --bump-in-range-dependencies If a dependency is still in range, and nothing
128
130
  changed in my package, still bump my version
129
131
  and the dependency version.
@@ -21,6 +21,11 @@ module.exports = {
21
21
  type: 'boolean',
22
22
  default: true,
23
23
  },
24
+ 'dist-tag': {
25
+ describe: 'publish to a different NPM dist-tag',
26
+ type: 'string',
27
+ default: 'latest',
28
+ },
24
29
  'bump-in-range-dependencies': {
25
30
  describe: 'If a dependency is still in range, and nothing changed in my package, still bump my version and the dependency version.',
26
31
  type: 'boolean',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "monorepo-next",
3
- "version": "12.0.5",
3
+ "version": "12.1.0",
4
4
  "description": "Detach monorepo packages from normal linking",
5
5
  "bin": {
6
6
  "next": "bin/next.js"
package/src/release.js CHANGED
@@ -26,6 +26,7 @@ async function release({
26
26
  dryRun = builder['dry-run'].default,
27
27
  shouldPush = builder['push'].default,
28
28
  shouldPublish = builder['publish'].default,
29
+ distTag = builder['dist-tag'].default,
29
30
  shouldBumpInRangeDependencies = builder['bump-in-range-dependencies'].default,
30
31
  shouldInheritGreaterReleaseType = builder['inherit-greater-release-type'].default,
31
32
  shouldExcludeDevChanges = builder['exclude-dev-changes'].default,
@@ -228,7 +229,7 @@ async function release({
228
229
  }
229
230
 
230
231
  if (shouldPublish) {
231
- await prePublishCallback({ dryRun });
232
+ await prePublishCallback({ distTag, dryRun });
232
233
  }
233
234
 
234
235
  // eslint-disable-next-line require-atomic-updates
@@ -236,13 +237,14 @@ async function release({
236
237
  if (shouldPublish && _shouldPublish) {
237
238
  // eslint-disable-next-line no-inner-declarations
238
239
  async function originalPublish() {
239
- await publish({ cwd, silent, dryRun });
240
+ await publish({ cwd, silent, distTag, dryRun });
240
241
  }
241
242
 
242
243
  if (publishOverride) {
243
244
  await publishOverride({
244
245
  cwd,
245
246
  originalPublish,
247
+ distTag,
246
248
  dryRun,
247
249
  });
248
250
  } else {
@@ -294,10 +296,10 @@ async function push({ cwd, silent, dryRun }) {
294
296
  }
295
297
  }
296
298
 
297
- async function publish({ cwd, silent, dryRun }) {
299
+ async function publish({ cwd, silent, distTag, dryRun }) {
298
300
  let dryRunArgs = dryRun ? ['--dry-run'] : [];
299
301
 
300
- await execa('npm', ['publish', ...dryRunArgs], { cwd, silent });
302
+ await execa('npm', ['publish', '--tag', distTag, ...dryRunArgs], { cwd, silent });
301
303
  }
302
304
 
303
305
  module.exports = release;