Skip to content

Commit

Permalink
Change a few dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
yanthomasdev committed Sep 9, 2024
1 parent 94f7a6c commit a66e433
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 83 deletions.
10 changes: 5 additions & 5 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,18 @@
"dependencies": {
"consola": "^3.2.3",
"empathic": "^1.0.0",
"fast-glob": "^3.3.2",
"jiti": "2.0.0-beta.3",
"micromatch": "^4.0.7",
"neotraverse": "^0.6.18",
"path-to-regexp": "6.2.2",
"simple-git": "^3.25.0",
"picomatch": "^4.0.2",
"simple-git": "^3.26.0",
"tinyglobby": "^0.2.6",
"ultramatter": "^0.0.4",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/micromatch": "^4.0.9",
"@types/node": "^22.4.1"
"@types/node": "^22.5.4",
"@types/picomatch": "^3.0.1"
},
"engines": {
"node": ">=18.17.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { existsSync } from 'node:fs';
import { get } from 'node:http';
import { resolve } from 'node:path';
import { type ConsolaInstance, createConsola } from 'consola';
import glob from 'fast-glob';
import { glob } from 'tinyglobby';
import { loadConfig, validateConfig } from './config/config.js';
import type { LunariaConfig, Pattern } from './config/types.js';
import { FileConfigNotFound } from './errors/errors.js';
Expand Down Expand Up @@ -118,6 +117,7 @@ class LunariaInstance {
// generated paths using `pattern`.
const sourceFilePaths = (
await glob(include, {
expandDirectories: false,
ignore: exclude,
})
).filter((path) => {
Expand Down
6 changes: 3 additions & 3 deletions packages/core/src/status/git.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { cpus } from 'node:os';
import { resolve } from 'node:path';
import type { ConsolaInstance } from 'consola';
import micromatch from 'micromatch';
import picomatch from 'picomatch';
import { type DefaultLogFields, type ListLogLine, simpleGit } from 'simple-git';
import type { LunariaConfig } from '../config/types.js';
import { FileCommitsNotFound, UncommittedFileFound } from '../errors/errors.js';
Expand Down Expand Up @@ -105,8 +105,8 @@ export function findLatestTrackedCommit(
// TODO: Test this function with multiple paths and globs.
return (
pathsOrGlobs.split(';').find((pathOrGlob) => {
if (directive === '@lunaria-track') return micromatch.isMatch(path, pathOrGlob);
if (directive === '@lunaria-ignore') return !micromatch.isMatch(path, pathOrGlob);
if (directive === '@lunaria-track') return picomatch.isMatch(path, pathOrGlob);
if (directive === '@lunaria-ignore') return !picomatch.isMatch(path, pathOrGlob);
}) !== undefined
);
});
Expand Down
Loading

0 comments on commit a66e433

Please sign in to comment.