From 43bc4d438ec7f4ab3302625f151b93ae55d70826 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 1 Oct 2023 21:23:00 +0000 Subject: [PATCH 1/2] Bump prettier from 2.8.8 to 3.0.3 Bumps [prettier](https://github.com/prettier/prettier) from 2.8.8 to 3.0.3. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.8...3.0.3) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cad20be..bb12c92 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "husky": "^8.0.1", "jest": "^29.1.2", "mock-fs": "^5.0.0", - "prettier": "2.8.8", + "prettier": "3.0.3", "type-fest": "^4.3.3", "typescript": "^5.0.4" }, From 377d0e80c5566a5996b229e84bb280cb046e2bcb Mon Sep 17 00:00:00 2001 From: Abraham Williams <4braham@gmail.com> Date: Sun, 29 Oct 2023 20:24:24 -0500 Subject: [PATCH 2/2] npm run format --- src/bin.test.ts | 32 ++++++++++++++++---------------- src/bin.ts | 2 +- src/index.test.ts | 6 +++--- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/bin.test.ts b/src/bin.test.ts index f9e5ec7..76106ba 100644 --- a/src/bin.test.ts +++ b/src/bin.test.ts @@ -21,7 +21,7 @@ describe('pkg-ok', () => { es2015: 'unknown.js', browser: 'unknown.js', exports: 'unknown.js', - }) + }), ); fs.mkdirSync(path.join(directory, 'B')); fs.writeFileSync( @@ -31,14 +31,14 @@ describe('pkg-ok', () => { X: 'unknown.js', Y: 'unknown.js', }, - }) + }), ); fs.mkdirSync(path.join(directory, 'C')); fs.writeFileSync( path.join(directory, 'C/package.json'), JSON.stringify({ foo: 'unknown.js', - }) + }), ); fs.mkdirSync(path.join(directory, 'D')); fs.writeFileSync( @@ -48,14 +48,14 @@ describe('pkg-ok', () => { bar: 'bar', baz: 'baz', }, - }) + }), ); fs.mkdirSync(path.join(directory, 'E')); fs.writeFileSync( path.join(directory, 'E/package.json'), JSON.stringify({ bin: './script.js', - }) + }), ); fs.writeFileSync(path.join(directory, 'E/script.js'), 'foo\r\nbar'); fs.writeFileSync(path.join(directory, 'E/another-script.js'), 'baz\r\nqux'); @@ -68,7 +68,7 @@ describe('pkg-ok', () => { './dist/lib.cjs.js': './dist/lib.cjs.browser.js', './dist/lib.esm.js': './dist/lib.esm.browser.js', }, - }) + }), ); fs.writeFileSync(path.join(directory, 'F/dist/lib.cjs.browser.js'), 'cjs'); fs.writeFileSync(path.join(directory, 'F/dist/lib.esm.browser.js'), 'esm'); @@ -81,7 +81,7 @@ describe('pkg-ok', () => { 'dist/lib.cjs.js': './dist/lib.cjs.browser.js', './dist/lib.esm.js': 'dist/lib.esm.browser.js', }, - }) + }), ); fs.writeFileSync(path.join(directory, 'G/dist/lib.cjs.js'), './dist/lib.cjs.browser.js'); }); @@ -89,7 +89,7 @@ describe('pkg-ok', () => { it('checks /A', (done) => { execFile('node', ['dist/bin.js', path.join(directory, 'A')], (_error, stdout) => { expect(stdout).toMatch( - /main[\s\S]*bin[\s\S]*types[\s\S]*typings[\s\S]*module[\s\S]*es2015[\s\S]*browser[\s\S]*exports/ + /main[\s\S]*bin[\s\S]*types[\s\S]*typings[\s\S]*module[\s\S]*es2015[\s\S]*browser[\s\S]*exports/, ); done(); }); @@ -109,7 +109,7 @@ describe('pkg-ok', () => { (_error, stdout) => { expect(stdout).toMatch(/foo/); done(); - } + }, ); }); @@ -120,7 +120,7 @@ describe('pkg-ok', () => { (_error, stdout) => { expect(stdout).toMatch(/foo\.bar[\s\S]*foo\.baz/); done(); - } + }, ); }); @@ -131,10 +131,10 @@ describe('pkg-ok', () => { () => { expect(fs.readFileSync(path.join(directory, '/E/script.js'), 'utf-8')).toEqual('foo\nbar'); expect(fs.readFileSync(path.join(directory, '/E/another-script.js'), 'utf-8')).toEqual( - 'baz\nqux' + 'baz\nqux', ); done(); - } + }, ); }); @@ -144,13 +144,13 @@ describe('pkg-ok', () => { ['dist/bin.js', path.join(directory, 'F'), '--bin', 'another-script.js'], () => { expect( - fs.readFileSync(path.join(directory, '/F/dist/lib.cjs.browser.js'), 'utf-8') + fs.readFileSync(path.join(directory, '/F/dist/lib.cjs.browser.js'), 'utf-8'), ).toEqual('cjs'); expect( - fs.readFileSync(path.join(directory, '/F/dist/lib.esm.browser.js'), 'utf-8') + fs.readFileSync(path.join(directory, '/F/dist/lib.esm.browser.js'), 'utf-8'), ).toEqual('esm'); done(); - } + }, ); }); @@ -161,7 +161,7 @@ describe('pkg-ok', () => { (_error, stdout) => { expect(stdout).toMatch(/browser.*path[\s\S]*browser.*path[\s\S]*browser.*must/); done(); - } + }, ); }); }); diff --git a/src/bin.ts b/src/bin.ts index 2924b6b..c9831df 100644 --- a/src/bin.ts +++ b/src/bin.ts @@ -31,7 +31,7 @@ const cli = meow( isMultiple: true, }, }, - } + }, ); const errorMessage = (error: unknown) => { diff --git a/src/index.test.ts b/src/index.test.ts index 3686c78..9862f7d 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -59,7 +59,7 @@ describe('pkg-ok', () => { it('checks /A', () => { expect(() => pkgOk(path.join('/A'))).toThrowError( - /main[\s\S]*bin[\s\S]*types[\s\S]*typings[\s\S]*module[\s\S]*es2015[\s\S]*browser[\s\S]*exports/ + /main[\s\S]*bin[\s\S]*types[\s\S]*typings[\s\S]*module[\s\S]*es2015[\s\S]*browser[\s\S]*exports/, ); }); @@ -73,7 +73,7 @@ describe('pkg-ok', () => { it('checks /D', () => { expect(() => pkgOk(path.join('/D'), { fields: ['foo'] })).toThrowError( - /foo\.bar[\s\S]*foo\.baz/ + /foo\.bar[\s\S]*foo\.baz/, ); }); @@ -91,7 +91,7 @@ describe('pkg-ok', () => { it('checks /G', () => { expect(() => pkgOk(path.join('/G'))).toThrowError( - /browser.*path[\s\S]*browser.*path[\s\S]*browser.*must/ + /browser.*path[\s\S]*browser.*path[\s\S]*browser.*must/, ); }); });