Skip to content

Commit

Permalink
fix: remove ExperimentalWarning
Browse files Browse the repository at this point in the history
  • Loading branch information
martiliones committed Feb 22, 2024
1 parent 59504fb commit 0631579
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/adamant.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import prompt from '../prompt/index.js';
import { log } from '../utils/log.js';
import config from '../utils/config.js';

import packageInfo from '../package.json' assert { type: 'json' };
import { packageInfo } from '../utils/package.js';

import installInitCommand from './init.js';

Expand Down
2 changes: 1 addition & 1 deletion lib/rpc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as api from './api/index.js';
import * as log from '../utils/log.js';
import config from '../utils/config.js';

import packageInfo from '../package.json' assert { type: 'json' };
import { packageInfo } from '../utils/package.js';

/**
* Safe callback and error handling
Expand Down
2 changes: 1 addition & 1 deletion prompt/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import readline from 'readline';
import History from './history.js';
import packageInfo from '../package.json' assert { type: 'json' };
import { packageInfo } from '../utils/package.js';

export default (callback) => {
const rl = readline.createInterface({
Expand Down
9 changes: 9 additions & 0 deletions utils/package.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

const __dirname = path.dirname(fileURLToPath(import.meta.url));

export const packageInfo = JSON.parse(
fs.readFileSync(path.join(__dirname, '../package.json'), 'utf8'),
);

0 comments on commit 0631579

Please sign in to comment.