Skip to content

Commit

Permalink
upgrade latest-version (#2454)
Browse files Browse the repository at this point in the history
  • Loading branch information
niclim authored Oct 24, 2023
1 parent a3b43a7 commit e870e58
Show file tree
Hide file tree
Showing 3 changed files with 245 additions and 8 deletions.
2 changes: 1 addition & 1 deletion projects/optic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"js-yaml": "^4.1.0",
"json-schema-traverse": "^1.0.0",
"json-stable-stringify": "^1.0.1",
"latest-version": "^5.1.0",
"latest-version": "^7.0.0",
"lodash.chunk": "^4.2.0",
"lodash.groupby": "^4.6.0",
"lodash.sortby": "^4.7.0",
Expand Down
2 changes: 1 addition & 1 deletion projects/optic/src/commands/ruleset/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { OpticCliConfig } from '../../config';
import tar from 'tar';
import path from 'path';
import chalk from 'chalk';
import latestVersion from 'latest-version';
import { errorHandler } from '../../error-handler';

const DEFAULT_INIT_FOLDER = 'optic-ruleset';
Expand Down Expand Up @@ -71,6 +70,7 @@ const getInitAction = () => async (name?: string) => {
'@useoptic/rulesets-base',
'@useoptic/openapi-utilities',
];
const latestVersion = (await import('latest-version')).default;
const version = await latestVersion(dependencies[0]);

await fs
Expand Down
Loading

0 comments on commit e870e58

Please sign in to comment.