Skip to content

Commit

Permalink
fix: benchmark by using es modules in ss-search package
Browse files Browse the repository at this point in the history
  • Loading branch information
yann510 committed Oct 28, 2024
1 parent f47d5d0 commit 20322ab
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 10 deletions.
2 changes: 1 addition & 1 deletion benchmark/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface BenchmarkResult {
}

const benchmarkResultPath = `${__dirname}/../../../../web-app/src/assets/benchmarkResults.json`
const ignoredVersions = ['1.9.1']
const ignoredVersions = ['1.9.1', '1.10.0']

async function main() {
const packageVersions: string[] = JSON.parse(execSync('npm view ss-search versions --json').toString())
Expand Down
15 changes: 13 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@
"@mui/icons-material": "5.14.8",
"@mui/material": "5.14.8",
"@swc/helpers": "0.5.13",
"@types/lodash-es": "4.17.12",
"axios": "1.7.7",
"flexsearch": "0.6.32",
"fuse.js": "6.6.2",
"fuzzysort": "2.0.4",
"js-search": "2.0.1",
"lodash": "4.17.21",
"lodash-es": "4.17.21",
"lunr": "2.3.9",
"react": "18.3.1",
"react-dom": "18.3.1",
Expand Down
3 changes: 2 additions & 1 deletion ss-search/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"version": "1.10.0",
"repository": "https://github.com/yann510/ss-search",
"dependencies": {
"lodash": "4.17.21"
"es-toolkit": "^1.26.1",
"lodash-es": "^4.17.21"
},
"main": "./index.cjs",
"module": "./index.esm.js",
Expand Down
7 changes: 1 addition & 6 deletions ss-search/src/lib/ss-search.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
// import { deburr, escapeRegExp, get, memoize, round } from 'lodash'
import deburr from 'lodash/deburr'
import escapeRegExp from 'lodash/escapeRegExp'
import memoize from 'lodash/memoize'
import get from 'lodash/get'
import round from 'lodash/round'
import { get, deburr, escapeRegExp,memoize, round } from 'lodash-es'

export const normalize = (text: string | undefined) =>
deburr(text)
Expand Down

0 comments on commit 20322ab

Please sign in to comment.