Skip to content

Commit

Permalink
Merge pull request #1888 from SUI-Components/dashboard-update
Browse files Browse the repository at this point in the history
feat(packages/sui-dashboard): compatible with node 20 require fn way
  • Loading branch information
andresin87 authored Jan 13, 2025
2 parents c22f1d3 + a0adaca commit ce95aac
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/sui-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@
"@s-ui/helpers": "1",
"commander": "8.3.0",
"fast-glob": "3.2.11"
},
"engines": {
"node": ">=20.0.0"
}
}
3 changes: 3 additions & 0 deletions packages/sui-dashboard/src/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import {readFileSync} from 'fs'
import {createRequire} from 'module'

import fg from 'fast-glob'

const require = createRequire(import.meta.url)

const flat = arr => [].concat(...arr)

const getPackageContent = filepath => JSON.parse(readFileSync(filepath))
Expand Down

0 comments on commit ce95aac

Please sign in to comment.