Skip to content

Commit

Permalink
Don't use JSON import
Browse files Browse the repository at this point in the history
They are not part of the EcmaScript standard yet.
  • Loading branch information
lpsinger committed Jul 23, 2024
1 parent 9a3b157 commit de3990f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions update-tags.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import { readFile, writeFile } from 'fs/promises'
import { glob as baseGlob } from 'glob'
import packageJSON from './package.json'
import * as prettier from 'prettier'

const tagPath = `v${packageJSON.version}`
// FIXME: replace with a JSON import when Import Attributes become part of
// EcmaScript. See https://github.com/tc39/proposal-import-attributes
const { version } = JSON.parse(
await readFile('package.json', { encoding: 'utf8' }),
)

const tagPath = `v${version}`

async function glob(path) {
return await baseGlob(path, {
Expand Down

0 comments on commit de3990f

Please sign in to comment.