diff --git a/.prettierignore b/.prettierignore index 36a5c5a1..50b89dc2 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,8 +1,11 @@ +*.log *.snap *.styl *.svg .*ignore +.DS_Store .nojekyll +.nvmrc docs/.vuepress/dist /change/ /CHANGELOG.* diff --git a/src/__e2e__/bump.test.ts b/src/__e2e__/bump.test.ts index a11e93c6..40fb0767 100644 --- a/src/__e2e__/bump.test.ts +++ b/src/__e2e__/bump.test.ts @@ -584,12 +584,12 @@ describe('version bumping', () => { const jsonPath = path.join(packagePath, 'package.json'); expect(fs.readJSONSync(jsonPath).version).toBe('1.1.0'); }, - } + }; await bump({ path: repo.rootPath, bumpDeps: false, - hooks + hooks, } as BeachballOptions); expect(postBumpCalled).toBe(true); @@ -610,16 +610,16 @@ describe('version bumping', () => { let postbumpCalled = false; const hooks: BeachballOptions['hooks'] = { - postbump: async (packagePath, name, version) => { - postbumpCalled = true; - expect(packagePath.endsWith(path.join('packages', 'pkg-1'))).toBeTruthy(); - expect(name).toBe('pkg-1'); - expect(version).toBe('1.1.0'); + postbump: async (packagePath, name, version) => { + postbumpCalled = true; + expect(packagePath.endsWith(path.join('packages', 'pkg-1'))).toBeTruthy(); + expect(name).toBe('pkg-1'); + expect(version).toBe('1.1.0'); - const jsonPath = path.join(packagePath, 'package.json'); - expect((await fs.readJSON(jsonPath)).version).toBe('1.1.0'); - }, - } + const jsonPath = path.join(packagePath, 'package.json'); + expect((await fs.readJSON(jsonPath)).version).toBe('1.1.0'); + }, + }; await bump({ path: repo.rootPath, @@ -642,17 +642,16 @@ describe('version bumping', () => { repo.push(); - const hooks: BeachballOptions['hooks'] = { - postbump: async (_packagePath, _name, _version): Promise => { - throw new Error('Foo'); - }, - } + postbump: async (_packagePath, _name, _version): Promise => { + throw new Error('Foo'); + }, + }; const bumpResult = bump({ path: repo.rootPath, bumpDeps: false, - hooks + hooks, } as BeachballOptions); await expect(bumpResult).rejects.toThrow('Foo'); diff --git a/src/types/BeachballOptions.ts b/src/types/BeachballOptions.ts index 902dcbc2..39b19673 100644 --- a/src/types/BeachballOptions.ts +++ b/src/types/BeachballOptions.ts @@ -204,7 +204,12 @@ export interface HooksOptions { * @param version The post-bump version of the package to be published * @param packageInfos Metadata about other packages processed by Beachball. Computed post-bump. Readonly. */ - prepublish?: (packagePath: string, name: string, version: string, packageInfos: Readonly) => void | Promise; + prepublish?: ( + packagePath: string, + name: string, + version: string, + packageInfos: Readonly + ) => void | Promise; /** * Runs for each package after the publish command. @@ -215,7 +220,12 @@ export interface HooksOptions { * @param version The post-bump version of the package to be published * @param packageInfos Metadata about other packages processed by Beachball. Computed post-bump. Readonly. */ - postpublish?: (packagePath: string, name: string, version: string, packageInfos: Readonly) => void | Promise; + postpublish?: ( + packagePath: string, + name: string, + version: string, + packageInfos: Readonly + ) => void | Promise; /** * Runs for each package, before writing changelog and package.json updates @@ -236,7 +246,12 @@ export interface HooksOptions { * @param version The post-bump version of the package to be published * @param packageInfos Metadata about other packages processed by Beachball. Computed post-bump. Readonly. */ - postbump?: (packagePath: string, name: string, version: string, packageInfos: Readonly) => void | Promise; + postbump?: ( + packagePath: string, + name: string, + version: string, + packageInfos: Readonly + ) => void | Promise; /** * Runs once after all bumps to all packages before committing changes