Skip to content

Commit

Permalink
fix(laverna): fix cycle in type declarations
Browse files Browse the repository at this point in the history
This basically just moves the types from `index.js` to `types.js` and renames `laverna.js` to `index.js`.

This could be more elegant if the sources were TS or even ESM.  😄
  • Loading branch information
boneskull committed Mar 26, 2024
1 parent f9cc277 commit 8847688
Show file tree
Hide file tree
Showing 6 changed files with 570 additions and 570 deletions.
2 changes: 1 addition & 1 deletion packages/laverna/src/cli.js
Expand Up @@ -5,7 +5,7 @@

const { bold, magenta, gray, italic, cyan, underline } = require('kleur')
const util = require('node:util')
const { Laverna } = require('./laverna')
const { Laverna } = require('./index')
const { ERR } = require('./log-symbols')
const { name, bugs, version, description } = require('../package.json')

Expand Down
6 changes: 3 additions & 3 deletions packages/laverna/src/defaults.js
Expand Up @@ -30,7 +30,7 @@ const DEFAULT_GLOB_OPTS = Object.freeze(
cwd: DEFAULT_ROOT,
withFileTypes: true,
ignore: {
ignored: /** @param {import('.').GlobDirent} p */ (p) =>
ignored: /** @param {import('./types').GlobDirent} p */ (p) =>
!p.parent || !p.isDirectory(),
},
})
Expand All @@ -41,7 +41,7 @@ exports.DEFAULT_GLOB_OPTS = DEFAULT_GLOB_OPTS
* Default capabilities for Laverna
*/
const DEFAULT_CAPS = Object.freeze(
/** @type {import('.').AllLavernaCapabilities} */ ({
/** @type {import('./types').AllLavernaCapabilities} */ ({
fs: Fs,
glob: Glob.glob,
execFile: execFileAsync,
Expand All @@ -57,7 +57,7 @@ exports.DEFAULT_CAPS = DEFAULT_CAPS
* Default options for Laverna
*/
const DEFAULT_OPTS = Object.freeze(
/** @type {import('.').AllLavernaOptions} */ ({
/** @type {import('./types').AllLavernaOptions} */ ({
dryRun: false,
yes: false,
root: DEFAULT_ROOT,
Expand Down

0 comments on commit 8847688

Please sign in to comment.