Skip to content

Commit

Permalink
refactor: move PackageJson.ts inside js-package-manager directory
Browse files Browse the repository at this point in the history
  • Loading branch information
gaetanmaisse committed Jun 8, 2020
1 parent 878aec5 commit d7ed53f
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/cli/src/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import path from 'path';
import fs from 'fs';
import { sync as spawnSync } from 'cross-spawn';
import { commandLog, getPackageJson } from './helpers';
import { PackageJson } from './PackageJson';
import { PackageJson } from './js-package-manager/PackageJson';
import { JsPackageManager, JsPackageManagerFactory } from './js-package-manager';

const logger = console;
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/detect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
TemplateMatcher,
} from './project_types';
import { getBowerJson, getPackageJson } from './helpers';
import { PackageJson } from './PackageJson';
import { PackageJson } from './js-package-manager/PackageJson';

const hasDependency = (packageJson: PackageJson, name: string) => {
return !!packageJson.dependencies?.[name] || !!packageJson.devDependencies?.[name];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import path from 'path';
import { sync as spawnSync } from 'cross-spawn';
import { packageNames } from '@storybook/codemod';
import { getBabelDependencies, getPackageJson, writePackageJson } from '../../helpers';
import { PackageJson } from '../../PackageJson';
import { PackageJson } from '../../js-package-manager/PackageJson';
import { NpmOptions } from '../../NpmOptions';
import { JsPackageManager } from '../../js-package-manager';

Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { satisfies } from '@storybook/semver';
import stripJsonComments from 'strip-json-comments';

import { StoryFormat } from './project_types';
import { PackageJson } from './PackageJson';
import { PackageJson } from './js-package-manager/PackageJson';
import { JsPackageManager } from './js-package-manager';

const logger = console;
Expand Down
2 changes: 1 addition & 1 deletion lib/cli/src/js-package-manager/JsPackageManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import fs from 'fs';
import chalk from 'chalk';
import { gt, satisfies } from '@storybook/semver';
import { commandLog, writePackageJson } from '../helpers';
import { PackageJson } from '../PackageJson';
import { PackageJson } from './PackageJson';

const logger = console;
// Cannot be `import` as it's not under TS root dir
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions lib/cli/src/js-package-manager/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './JsPackageManagerFactory';
export * from './JsPackageManager';
export * from './PackageJson';

0 comments on commit d7ed53f

Please sign in to comment.