Skip to content

Commit

Permalink
Require Node.js >= 22
Browse files Browse the repository at this point in the history
This is the version we deploy to now.

Note: remove lodash.groupBy, which now has a builtin alternative
Object.groupBy.
  • Loading branch information
lpsinger committed Dec 16, 2024
1 parent 7ad7549 commit 08d587f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
"@architect/inventory": "github:lpsinger/inventory#esm-graph-with-top-level-await"
},
"engines": {
"node": ">=20"
"node": ">=22"
},
"sideEffects": false,
"prettier": {
Expand Down
3 changes: 1 addition & 2 deletions sandbox-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
* SPDX-License-Identifier: Apache-2.0
*/
import { readFile } from 'fs/promises'
import groupBy from 'lodash/groupBy.js'

export default async function () {
const text = await readFile('sandbox-seed.json', { encoding: 'utf-8' })
const { circulars, synonyms } = JSON.parse(text)
const groups = Object.entries(groupBy(synonyms, 'synonymId')).flatMap(
const groups = Object.entries(Object.groupBy(synonyms, 'synonymId')).flatMap(
([synonymId, values]) => [
{
synonymId,
Expand Down

0 comments on commit 08d587f

Please sign in to comment.