@lotus-tree/fg-notation 2.0.2 → 2.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.js +6 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lotus-tree/fg-notation",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "main": "src/index.js",
5
5
  "type": "module",
6
6
  "dependencies": {
package/src/index.js CHANGED
@@ -5,9 +5,13 @@ import { DataTypes } from 'sequelize'
5
5
  import bent from 'bent'
6
6
  import axios from 'axios'
7
7
  import { GatewayIntentBits, Partials } from 'discord.js'
8
- import { readFileSync } from 'fs'
8
+ import { fileURLToPath } from 'url'
9
+ import fs from 'fs'
9
10
 
10
- const { sizes, aliases, builtin } = JSON.parse(readFileSync('./info.json'))
11
+ const __filename = fileURLToPath(import.meta.url)
12
+ const __dirname = path.dirname(__filename)
13
+
14
+ const { sizes, aliases, builtin } = JSON.parse(fs.readFileSync(path.join(__dirname, 'info.json')))
11
15
 
12
16
  const getJSON = bent('json')
13
17
  const imgPath = path.join(__dirname, 'img')