File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env node
2+ import { readFile } from 'node:fs/promises' ;
3+
24import * as core from '@actions/core' ;
35import chalk from 'chalk' ;
46import updateNotifier from 'update-notifier-cjs' ;
57
6- import pkg from '../package.json' assert { type : 'json ' } ;
7-
88import { isGHA } from './lib/isCI.js' ;
99
1010import rdme from './index.js' ;
1111
12+ const pkg = JSON . parse ( await readFile ( new URL ( '../../package.json' , import . meta. url ) , { encoding : 'utf-8' } ) ) ;
13+
1214updateNotifier ( { pkg } ) . notify ( ) ;
1315
1416rdme ( process . argv . slice ( 2 ) )
Original file line number Diff line number Diff line change 11/* eslint-disable import/first, import/order, no-underscore-dangle */
2+ import { readFile } from 'node:fs/promises' ;
23import path from 'node:path' ;
34
45import chalk from 'chalk' ;
@@ -20,7 +21,7 @@ import config from 'config';
2021
2122process . env . NODE_CONFIG_DIR = configDir ;
2223
23- import pkg from '../package.json' assert { type : 'json ' } ;
24+ const pkg = JSON . parse ( await readFile ( new URL ( '../../ package.json' , import . meta . url ) , { encoding : 'utf-8 ' } ) ) ;
2425
2526const { version } = pkg ;
2627
Original file line number Diff line number Diff line change 1+ import { readFile } from 'node:fs/promises' ;
2+
13import Configstore from 'configstore' ;
24
3- import pkg from '../../package.json' assert { type : 'json ' } ;
5+ const pkg = JSON . parse ( await readFile ( new URL ( '../../package.json' , import . meta . url ) , { encoding : 'utf-8 ' } ) ) ;
46
57const configstore = new Configstore (
68 /**
Original file line number Diff line number Diff line change 1+ import { readFile } from 'node:fs/promises' ;
2+
13// eslint-disable-next-line no-restricted-imports
24import fetch from 'node-fetch' ;
35import semver from 'semver' ;
46
5- import pkg from '../../package.json' assert { type : 'json' } ;
6-
77import { error } from './logger.js' ;
88
9+ const pkg = JSON . parse ( await readFile ( new URL ( '../../package.json' , import . meta. url ) , { encoding : 'utf-8' } ) ) ;
10+
911const registryUrl = 'https://registry.npmjs.com/rdme' ;
1012
1113/**
Original file line number Diff line number Diff line change 11import type { SpecFileType } from './prepareOas.js' ;
22import type { RequestInit , Response } from 'node-fetch' ;
33
4+ import { readFile } from 'node:fs/promises' ;
45import path from 'node:path' ;
56
67import config from 'config' ;
78import mime from 'mime-types' ;
89import nodeFetch , { Headers } from 'node-fetch' ; // eslint-disable-line no-restricted-imports
910
10- import pkg from '../../package.json' assert { type : 'json' } ;
11-
1211import APIError from './apiError.js' ;
1312import { git } from './createGHA/index.js' ;
1413import isCI , { ciName , isGHA } from './isCI.js' ;
1514import { debug , warn } from './logger.js' ;
1615
16+ const pkg = JSON . parse ( await readFile ( new URL ( '../../package.json' , import . meta. url ) , { encoding : 'utf-8' } ) ) ;
17+
1718const SUCCESS_NO_CONTENT = 204 ;
1819
1920/**
You can’t perform that action at this time.
0 commit comments