From 744c24f8f0b2aa1ced52edf115b7eaaf630b5300 Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Fri, 6 Sep 2024 11:13:50 +0200 Subject: [PATCH 1/3] fix: macOS open -u --- src/node/open-browser.spec.ts | 2 +- src/node/open-browser.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/open-browser.spec.ts b/src/node/open-browser.spec.ts index da86143..8f8c6f9 100644 --- a/src/node/open-browser.spec.ts +++ b/src/node/open-browser.spec.ts @@ -15,7 +15,7 @@ describe('openBrowser', () => { it('should open URL on macOS', () => { vi.mocked(platform).mockReturnValue('darwin') openBrowser('http://example.com') - expect(exec).toHaveBeenCalledWith('open http://example.com') + expect(exec).toHaveBeenCalledWith('open -u http://example.com') }) it('should open URL on Windows', () => { diff --git a/src/node/open-browser.ts b/src/node/open-browser.ts index 67fb7ef..182c48c 100644 --- a/src/node/open-browser.ts +++ b/src/node/open-browser.ts @@ -5,7 +5,7 @@ import { platform } from 'node:os' export function openBrowser(url: string) { switch (platform()) { case 'darwin': - exec(`open ${url}`) + exec(`open -u ${url}`) break case 'win32': exec(`start ${url}`) From 40bdf1bf09714779fe6b18553f34ebce7f8f056c Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Fri, 6 Sep 2024 12:52:08 +0200 Subject: [PATCH 2/3] fix: eslint setings --- eslint.config.js | 1 - src/common/eslint-defaults.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/eslint.config.js b/eslint.config.js index 7fce60d..6105e27 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -11,7 +11,6 @@ export default antfu( { rules: { ...eslintRulesDefaults(), - 'unicorn/consistent-function-scoping': 'off', }, }, ) diff --git a/src/common/eslint-defaults.js b/src/common/eslint-defaults.js index 22c4934..8a3bc5e 100644 --- a/src/common/eslint-defaults.js +++ b/src/common/eslint-defaults.js @@ -24,7 +24,7 @@ export function eslintIgnoreDefaults() { ] } -// https://eslint.org/docs/latest/rules/ +/// Very much opiniated ESLint setting! Details to rules see https://eslint.org/docs/latest/rules/ export function eslintRulesDefaults() { return { 'unused-imports/no-unused-vars': 'off', @@ -44,6 +44,8 @@ export function eslintRulesDefaults() { ImportDeclaration: 'never', // ExportDeclaration: 'always' }], + + 'unicorn/consistent-function-scoping': 'off', } } From 46bc7ce8cc30f9c9da782d43f2c53c2764cfb971 Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Fri, 6 Sep 2024 12:52:11 +0200 Subject: [PATCH 3/3] 0.24.17 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2b6c11e..647bde3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed", "type": "module", - "version": "0.24.16", + "version": "0.24.17", "description": "🌱 Simple foundation library", "author": { "name": "Dirk Holtwick",