@hubspot/npm-scripts 0.3.3-beta.0 → 0.3.3-beta.1

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.3.3-beta.0",
3
+ "version": "0.3.3-beta.1",
4
4
  "description": "Scripts for working with npm packages in the HubSpot ecosystem",
5
5
  "author": "",
6
6
  "license": "Apache-2.0",
package/src/release.js CHANGED
@@ -5,10 +5,10 @@ import { EXIT_CODES } from './utils/process.js';
5
5
  import { DEFAULT_MAIN_BRANCH, TAG, TAG_OPTIONS, VERSION_INCREMENT_OPTIONS, } from './constants/release.js';
6
6
  import { getCurrentGitBranch } from './utils/git.js';
7
7
  import { getDistTags } from './utils/npm.js';
8
- import { ReleaseError } from './release/errors.js';
9
- import { validatePreviousBranchConfigured, validateBranchForTag, validateTagIncrementCombination, validateVersionSync, validateNextReleaseIsNotOverIncrement, } from './release/validate.js';
10
- import { computeNewVersion } from './release/version.js';
11
- import { confirmRelease, createTempBranch, bumpVersion, tryBuild, ensureNpmAuth, tryPublish, updateDistTagsForLatest, finalizeRelease, logReleaseSuccess, } from './release/steps.js';
8
+ import { ReleaseError } from './utils/release/errors.js';
9
+ import { validatePreviousBranchConfigured, validateBranchForTag, validateTagIncrementCombination, validateVersionSync, validateNextReleaseIsNotOverIncrement, } from './utils/release/validate.js';
10
+ import { computeNewVersion } from './utils/release/version.js';
11
+ import { confirmRelease, createTempBranch, bumpVersion, tryBuild, ensureNpmAuth, tryPublish, updateDistTagsForLatest, finalizeRelease, logReleaseSuccess, } from './utils/release/steps.js';
12
12
  function buildHandler({ build, postLatestRelease, packageName, localVersion, registry, repositoryUrl, mainBranch, previousBranch, ignoreScripts, }) {
13
13
  return async function handler({ versionIncrement, tag, dryRun, skipBranchValidation, skipVersionCheck, }) {
14
14
  try {
@@ -1,30 +1,30 @@
1
1
  import { describe, it, expect, vi, beforeEach } from 'vitest';
2
2
  import { exec as _exec, execSync } from 'node:child_process';
3
3
  import open from 'open';
4
- import { logger } from '../../utils/logging.js';
5
- import { EXIT_CODES } from '../../utils/process.js';
6
- import { gitCleanup } from '../../utils/git.js';
7
- import { publish, updateNextTag, updatePreviousTag } from '../../utils/npm.js';
8
- import { confirm } from '../../utils/prompting.js';
9
- import { TAG, INCREMENT } from '../../constants/release.js';
4
+ import { logger } from '../../../utils/logging.js';
5
+ import { EXIT_CODES } from '../../../utils/process.js';
6
+ import { gitCleanup } from '../../../utils/git.js';
7
+ import { publish, updateNextTag, updatePreviousTag, } from '../../../utils/npm.js';
8
+ import { confirm } from '../../../utils/prompting.js';
9
+ import { TAG, INCREMENT } from '../../../constants/release.js';
10
10
  import { confirmRelease, runBuild, tryBuild, createTempBranch, bumpVersion, ensureNpmAuth, tryPublish, updateDistTagsForLatest, finalizeRelease, logReleaseSuccess, } from '../steps.js';
11
11
  import { ReleaseError } from '../errors.js';
12
12
  vi.mock('util', () => ({ promisify: vi.fn(fn => fn) }));
13
13
  vi.mock('node:child_process', () => ({ exec: vi.fn(), execSync: vi.fn() }));
14
14
  vi.mock('open', () => ({ default: vi.fn().mockResolvedValue(undefined) }));
15
- vi.mock('../../utils/logging.js', () => ({
15
+ vi.mock('../../../utils/logging.js', () => ({
16
16
  logger: { log: vi.fn(), error: vi.fn(), success: vi.fn() },
17
17
  }));
18
- vi.mock('../../utils/process.js', () => ({
18
+ vi.mock('../../../utils/process.js', () => ({
19
19
  EXIT_CODES: { SUCCESS: 0, ERROR: 1 },
20
20
  }));
21
- vi.mock('../../utils/git.js', () => ({ gitCleanup: vi.fn() }));
22
- vi.mock('../../utils/npm.js', () => ({
21
+ vi.mock('../../../utils/git.js', () => ({ gitCleanup: vi.fn() }));
22
+ vi.mock('../../../utils/npm.js', () => ({
23
23
  publish: vi.fn(),
24
24
  updateNextTag: vi.fn(),
25
25
  updatePreviousTag: vi.fn(),
26
26
  }));
27
- vi.mock('../../utils/prompting.js', () => ({ confirm: vi.fn() }));
27
+ vi.mock('../../../utils/prompting.js', () => ({ confirm: vi.fn() }));
28
28
  const mockedExec = vi.mocked(_exec);
29
29
  const mockedExecSync = vi.mocked(execSync);
30
30
  const mockedGitCleanup = vi.mocked(gitCleanup);
@@ -1,7 +1,7 @@
1
1
  import { describe, it, expect } from 'vitest';
2
2
  import { validatePreviousBranchConfigured, validateBranchForTag, validateTagIncrementCombination, validateVersionSync, validateNextReleaseIsNotOverIncrement, } from '../validate.js';
3
3
  import { ReleaseError } from '../errors.js';
4
- import { TAG, INCREMENT } from '../../constants/release.js';
4
+ import { TAG, INCREMENT } from '../../../constants/release.js';
5
5
  const DIST_TAGS = {
6
6
  latest: '1.0.0',
7
7
  next: '1.0.0-beta.1',
@@ -1,7 +1,7 @@
1
1
  import { describe, it, expect } from 'vitest';
2
2
  import { computeNewVersion } from '../version.js';
3
3
  import { ReleaseError } from '../errors.js';
4
- import { TAG, INCREMENT } from '../../constants/release.js';
4
+ import { TAG, INCREMENT } from '../../../constants/release.js';
5
5
  const DIST_TAGS = {
6
6
  latest: '1.0.0',
7
7
  next: '1.0.0-beta.1',
@@ -1,4 +1,4 @@
1
- import { EXIT_CODES } from '../utils/process.js';
1
+ import { EXIT_CODES } from '../../utils/process.js';
2
2
  export class ReleaseError extends Error {
3
3
  exitCode;
4
4
  constructor(message, exitCode = EXIT_CODES.ERROR) {
@@ -1,12 +1,12 @@
1
1
  import { exec as _exec, execSync } from 'node:child_process';
2
2
  import { promisify } from 'util';
3
3
  import open from 'open';
4
- import { logger } from '../utils/logging.js';
5
- import { EXIT_CODES } from '../utils/process.js';
6
- import { gitCleanup } from '../utils/git.js';
7
- import { publish, updateNextTag, updatePreviousTag } from '../utils/npm.js';
8
- import { confirm } from '../utils/prompting.js';
9
- import { TAG, INCREMENT, PRERELEASE_IDENTIFIER } from '../constants/release.js';
4
+ import { logger } from '../../utils/logging.js';
5
+ import { EXIT_CODES } from '../../utils/process.js';
6
+ import { gitCleanup } from '../../utils/git.js';
7
+ import { publish, updateNextTag, updatePreviousTag } from '../../utils/npm.js';
8
+ import { confirm } from '../../utils/prompting.js';
9
+ import { TAG, INCREMENT, PRERELEASE_IDENTIFIER, } from '../../constants/release.js';
10
10
  import { ReleaseError } from './errors.js';
11
11
  const exec = promisify(_exec);
12
12
  export async function confirmRelease({ isDryRun, currentVersion, newVersion, tag, localVersion, versionIncrement, }) {
@@ -1,4 +1,4 @@
1
- import type { DistTags, Tag } from '../types.js';
1
+ import type { DistTags, Tag } from '../../types.js';
2
2
  export type NextReleaseIncrementOptions = {
3
3
  tag: Tag;
4
4
  versionIncrement: string;
@@ -1,4 +1,4 @@
1
- import type { Tag } from '../types.js';
1
+ import type { Tag } from '../../types.js';
2
2
  import type { BranchValidationOptions, NextReleaseIncrementOptions, VersionSyncOptions } from './types.js';
3
3
  export declare function validatePreviousBranchConfigured(isPrevious: boolean, previousBranch?: string): void;
4
4
  export declare function validateBranchForTag({ isExperimental, isPrevious, branch, mainBranch, previousBranch, }: BranchValidationOptions): void;
@@ -1,5 +1,5 @@
1
1
  import semver from 'semver';
2
- import { TAG, INCREMENT, PRERELEASE_IDENTIFIER } from '../constants/release.js';
2
+ import { TAG, INCREMENT, PRERELEASE_IDENTIFIER, } from '../../constants/release.js';
3
3
  import { ReleaseError } from './errors.js';
4
4
  export function validatePreviousBranchConfigured(isPrevious, previousBranch) {
5
5
  if (!isPrevious || previousBranch) {
@@ -1,5 +1,5 @@
1
1
  import semver from 'semver';
2
- import { TAG, INCREMENT, PRERELEASE_IDENTIFIER } from '../constants/release.js';
2
+ import { TAG, INCREMENT, PRERELEASE_IDENTIFIER, } from '../../constants/release.js';
3
3
  import { ReleaseError } from './errors.js';
4
4
  function computeIncrementType(tag, versionIncrement) {
5
5
  if (tag === TAG.LATEST ||
File without changes
File without changes
File without changes
File without changes