Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor, move legacy bitmap and utils directories into new components #9000

Merged
merged 84 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
c2b1276
refactor, move legacy bitmap directory into a new component
davidfirst Jul 2, 2024
54cd23f
Merge branch 'master' into refactor-legacy-bitmap
davidfirst Jul 2, 2024
df861a3
fix some ocurrences
davidfirst Jul 2, 2024
1d849e0
fix scope-name
davidfirst Jul 2, 2024
3143730
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 2, 2024
f16510d
fix lint
davidfirst Jul 2, 2024
1c30b11
change specs to Jest
davidfirst Jul 2, 2024
afb27e1
move utils into a new component teambit.legacy/utils
davidfirst Jul 2, 2024
78ec9a1
fix lint
davidfirst Jul 2, 2024
11ad3d5
fix lint
davidfirst Jul 2, 2024
385e18c
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 2, 2024
9884828
import typescript-compiler
davidfirst Jul 2, 2024
63df02a
fix lint
davidfirst Jul 2, 2024
c4256d2
fix typescript-compiler namespace
davidfirst Jul 2, 2024
4c709ab
fix lint
davidfirst Jul 2, 2024
82a9460
remove @teambit/typescript.typescript-compiler from the workspace
davidfirst Jul 2, 2024
be5f08f
change env to the new node-env: teambit.node/envs/node-babel-mocha
davidfirst Jul 3, 2024
2bccb30
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 3, 2024
e13cf90
remove core-env cache from circle
davidfirst Jul 3, 2024
e3d4136
fix circle to get the correct capsule path
davidfirst Jul 3, 2024
d9995e4
ci, add bit-status to debug the env loading issue after install
davidfirst Jul 3, 2024
817d98a
change the cache id again
davidfirst Jul 3, 2024
2e613ec
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 3, 2024
480e100
remove the bit-status from circle config
davidfirst Jul 3, 2024
ec96719
trying to fix build errors
davidfirst Jul 3, 2024
d6f98fd
ignore some ts errors for now
davidfirst Jul 3, 2024
995f606
fix linter to use the updated typescript-compiler version
davidfirst Jul 3, 2024
642d922
fix linter to not use the legacy
davidfirst Jul 3, 2024
bfbd018
fix build errors
davidfirst Jul 3, 2024
23b1236
extract path into a new component
davidfirst Jul 4, 2024
21409fe
fix lint
davidfirst Jul 4, 2024
cdc41a2
fix lint
davidfirst Jul 4, 2024
3af20d5
Merge branch 'master' into refactor-legacy-bitmap
davidfirst Jul 5, 2024
1ebc627
bump core-aspect-env to 0.0.41
davidfirst Jul 5, 2024
176af63
extract some utils to new components
davidfirst Jul 5, 2024
33a860e
remove only from a test
davidfirst Jul 5, 2024
c860ee6
remove diffFiles and mapObject
davidfirst Jul 5, 2024
22fd4e1
remove os-resolve-group-id and validate-types from utils
davidfirst Jul 5, 2024
045a330
extract getBasicLog
davidfirst Jul 5, 2024
31ae4ee
extract componentIdToPackageName
davidfirst Jul 5, 2024
b1ae7d1
extract component-node-modules-pat
davidfirst Jul 5, 2024
7248d7f
add missing dir components/modules/component-package-name
davidfirst Jul 5, 2024
9585617
extract concurrency
davidfirst Jul 5, 2024
828a223
extract concurrency
davidfirst Jul 5, 2024
0d3b508
rename encyption/sha1 to crypto/sha1
davidfirst Jul 5, 2024
6c2933c
fix import
davidfirst Jul 5, 2024
9ca793f
more refactoring
davidfirst Jul 5, 2024
1c06487
extract isDirEmpty
davidfirst Jul 5, 2024
6f34bff
extract last-modified to a new component
davidfirst Jul 5, 2024
c97b7a9
extract removeEmptyDir to a new component
davidfirst Jul 5, 2024
c4ed5d9
move components/legacy/utils/fs/remove-files-and-empty-dirs-recursive…
davidfirst Jul 5, 2024
11b7b2b
delete is-file-auto-generated
davidfirst Jul 5, 2024
05a60d6
extract git utils into teambit.git/modules/git-executable
davidfirst Jul 5, 2024
325f55a
move ignore to a new component
davidfirst Jul 5, 2024
34daeaa
move files-dependency-builder to teambit.dependencies
davidfirst Jul 5, 2024
41a3196
move resolve-pkg-data.ts file to teambit.dependencies
davidfirst Jul 5, 2024
38c9f1d
fix import statement
davidfirst Jul 5, 2024
9d267f7
remove ramda
davidfirst Jul 8, 2024
474d230
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 8, 2024
15b2a3a
fix react-env version
davidfirst Jul 8, 2024
a611d5b
export all new components
davidfirst Jul 8, 2024
9a3a429
update core-env
davidfirst Jul 8, 2024
32b85e1
fix lint
davidfirst Jul 8, 2024
981c4ce
add lint-full script
davidfirst Jul 8, 2024
0f01a7a
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 8, 2024
3b3e946
set core-aspect-env to use the newest version 0.0.42
davidfirst Jul 8, 2024
ef1806b
fix build error
davidfirst Jul 8, 2024
a545cf2
Merge branch 'master' into refactor-legacy-bitmap
davidfirst Jul 8, 2024
045708e
fix build
davidfirst Jul 8, 2024
6e70d64
Merge branch 'refactor-legacy-bitmap' of https://github.com/teambit/b…
davidfirst Jul 8, 2024
9c485fa
move fixtures into the dependencies component
davidfirst Jul 8, 2024
e553751
ignore any file that start with @bit-no-check
davidfirst Jul 9, 2024
636697d
fix build
davidfirst Jul 9, 2024
3ae3fa6
extract eol to a new component
davidfirst Jul 9, 2024
a52d222
Merge remote-tracking branch 'origin/master' into refactor-legacy-bitmap
davidfirst Jul 9, 2024
e52da71
extract pool-map into a new component
davidfirst Jul 9, 2024
14aee64
export the new components
davidfirst Jul 9, 2024
bf93c0c
skip some failing tests
davidfirst Jul 9, 2024
5b7087d
extract semver-helper into a new component
davidfirst Jul 9, 2024
8b9df46
fix dependencies tests
davidfirst Jul 9, 2024
53f6544
fix dependencies tests
davidfirst Jul 9, 2024
5ffb5b8
skip some tests temporarily
davidfirst Jul 9, 2024
00e8705
fix tests
davidfirst Jul 10, 2024
594fd10
fix tests
davidfirst Jul 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
899 changes: 803 additions & 96 deletions .bitmap

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ jobs:
- restore_cache:
key: bitsrc-registry10
- restore_cache:
key: core-aspect-env-v0.0.39-v1
key: core-aspect-env-v0.0.42-v1
- run: echo $BIT_FEATURES
- run: node -v
- run: npm -v
Expand Down Expand Up @@ -491,9 +491,9 @@ jobs:
name: bbit install
command: cd bit && bbit install
- save_cache:
key: core-aspect-env-v0.0.39-v1
key: core-aspect-env-v0.0.42-v1
paths:
- /home/circleci/Library/Caches/Bit/capsules/caec9a1075d4addee151dbe7e351b809aaa4b088
- /home/circleci/Library/Caches/Bit/capsules/caec9a107
- run: cd bit && npm run link-bit-legacy
# - run: cd bit && bbit compile

Expand Down Expand Up @@ -537,7 +537,7 @@ jobs:
- restore_cache:
key: v3-linux-bvm-folder-{{ checksum "version.txt" }}
- restore_cache:
key: core-aspect-env-v0.0.39-v1
key: core-aspect-env-v0.0.42-v1
# - update_ssh_agent
# temporary, check if we can remove it
- run: cd bit && bit cc
Expand Down Expand Up @@ -574,7 +574,7 @@ jobs:
- restore_cache:
key: v3-linux-bvm-folder-{{ checksum "version.txt" }}
- restore_cache:
key: core-aspect-env-v0.0.39-v1
key: core-aspect-env-v0.0.42-v1
- bit_config:
env: "hub"
- restore_cache:
Expand Down Expand Up @@ -887,7 +887,7 @@ jobs:
- restore_cache:
key: bitsrc-registry10
- restore_cache:
key: core-aspect-env-v0.0.39-v1
key: core-aspect-env-v0.0.42-v1
- run: npm view @teambit/bit version > ./version.txt
- restore_cache:
key: v3-linux-bvm-folder-{{ checksum "version.txt" }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ build/Release
node_modules
jspm_packages
!fixtures/filing-cabinet/node_modules
!scopes/dependencies/dependencies/files-dependency-builder/fixtures/filing-cabinet/node_modules

# Optional npm cache directory
.npm
Expand Down
1 change: 1 addition & 0 deletions components/crypto/sha1/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { sha1 } from './sha1';
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import * as crypto from 'crypto';
* sha1('foo bar') // => '3773dea65156909838fa6c22825cafe090ff8030'
* ```
*/
export default function sha1(data: string | Buffer, encoding: crypto.BinaryToTextEncoding = 'hex'): string {
// @ts-ignore todo: fix after deleting teambit.legacy
export function sha1(data: string | Buffer, encoding: crypto.BinaryToTextEncoding = 'hex'): string {
return crypto.createHash('sha1').update(data).digest(encoding);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { expect } from 'chai';
import * as path from 'path';
import { ComponentID } from '@teambit/component-id';
import { BitId } from '@teambit/legacy-bit-id';
import logger from '../../logger/logger';
import BitMap from './bit-map';
import logger from '@teambit/legacy/dist/logger/logger';
import { BitMap } from './bit-map';
import { DuplicateRootDir } from './exceptions/duplicate-root-dir';

const scope = {
Expand All @@ -30,7 +30,7 @@ describe('BitMap', function () {
// @ts-ignore
logger.info = () => {};
// @ts-ignore
this.timeout(0);
// this.timeout(0);
describe('toObject', () => {
let bitMap: BitMap;
let componentMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,27 @@ import { BitError } from '@teambit/bit-error';
import { ComponentID, ComponentIdList } from '@teambit/component-id';
import { BitId, BitIdStr } from '@teambit/legacy-bit-id';
import { sortObjectByKeys } from '@teambit/toolbox.object.sorter';
import type { Consumer } from '..';
import type { Consumer } from '@teambit/legacy/dist/consumer';
import {
AUTO_GENERATED_MSG,
AUTO_GENERATED_STAMP,
BIT_MAP,
OLD_BIT_MAP,
VERSION_DELIMITER,
BITMAP_PREFIX_MESSAGE,
} from '../../constants';
import logger from '../../logger/logger';
import { pathJoinLinux, pathNormalizeToLinux } from '../../utils';
import { PathLinux, PathLinuxRelative, PathOsBased, PathOsBasedAbsolute, PathOsBasedRelative } from '../../utils/path';
import ComponentMap, {
} from '@teambit/legacy/dist/constants';
import logger from '@teambit/legacy/dist/logger/logger';
import {
pathJoinLinux,
pathNormalizeToLinux,
PathLinux,
PathLinuxRelative,
PathOsBased,
PathOsBasedAbsolute,
PathOsBasedRelative,
} from '@teambit/toolbox.path.path';
import {
ComponentMap,
ComponentMapFile,
Config,
PathChange,
Expand Down Expand Up @@ -49,7 +57,7 @@ export const LANE_KEY = '_bit_lane';
export const CURRENT_BITMAP_SCHEMA = '17.0.0';
export const SCHEMA_FIELD = '$schema-version';

export default class BitMap {
export class BitMap {
components: ComponentMap[];
hasChanged: boolean;
paths: { [path: string]: ComponentID }; // path => componentId
Expand All @@ -63,7 +71,7 @@ export default class BitMap {
_cacheIdsAllStrWithoutVersion: { [idStr: string]: ComponentID } | undefined;
_cacheIdsAllStrWithoutScopeAndVersion: { [idStr: string]: ComponentID } | undefined;
allTrackDirs: { [trackDir: string]: ComponentID } | null | undefined;
private updatedIds: { [oldIdStr: string]: ComponentMap } = {}; // needed for out-of-sync where the id is changed during the process
protected updatedIds: { [oldIdStr: string]: ComponentMap } = {}; // needed for out-of-sync where the id is changed during the process
constructor(
public projectRoot: string,
public mapPath: PathOsBasedAbsolute,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,30 @@ import globby from 'globby';
import ignore from 'ignore';
import R from 'ramda';
import { ComponentID } from '@teambit/component-id';
import { BIT_MAP, Extensions, PACKAGE_JSON, IGNORE_ROOT_ONLY_LIST } from '../../constants';
import ValidationError from '../../error/validation-error';
import logger from '../../logger/logger';
import { isValidPath, pathJoinLinux, pathNormalizeToLinux, pathRelativeLinux, retrieveIgnoreList } from '../../utils';
import { PathLinux, PathLinuxRelative, PathOsBased, PathOsBasedRelative } from '../../utils/path';
import { removeInternalConfigFields } from '../config/extension-data';
import Consumer from '../consumer';
import { BIT_MAP, Extensions, PACKAGE_JSON, IGNORE_ROOT_ONLY_LIST } from '@teambit/legacy/dist/constants';
import ValidationError from '@teambit/legacy/dist/error/validation-error';
import logger from '@teambit/legacy/dist/logger/logger';
import { isValidPath } from '@teambit/legacy.utils';
import {
retrieveIgnoreList,
BIT_IGNORE,
getBitIgnoreFile,
getGitIgnoreFile,
} from '@teambit/git.modules.ignore-file-reader';
import {
PathLinux,
PathLinuxRelative,
PathOsBased,
PathOsBasedRelative,
pathJoinLinux,
pathNormalizeToLinux,
pathRelativeLinux,
} from '@teambit/toolbox.path.path';
import { removeInternalConfigFields } from '@teambit/legacy/dist/consumer/config/extension-data';
import Consumer from '@teambit/legacy/dist/consumer/consumer';
import OutsideRootDir from './exceptions/outside-root-dir';
import ComponentNotFoundInPath from '../component/exceptions/component-not-found-in-path';
import { IgnoredDirectory } from '../component-ops/add-components/exceptions/ignored-directory';
import { BIT_IGNORE, getBitIgnoreFile, getGitIgnoreFile } from '../../utils/ignore/ignore';
import ComponentNotFoundInPath from '@teambit/legacy/dist/consumer/component/exceptions/component-not-found-in-path';
import { IgnoredDirectory } from '@teambit/legacy/dist/consumer/component-ops/add-components/exceptions/ignored-directory';

export type Config = { [aspectId: string]: Record<string, any> | '-' };

Expand Down Expand Up @@ -48,7 +61,7 @@ export type ComponentMapData = {

export type PathChange = { from: PathLinux; to: PathLinux };

export default class ComponentMap {
export class ComponentMap {
id: ComponentID;
files: ComponentMapFile[];
defaultScope?: string;
Expand Down Expand Up @@ -134,7 +147,7 @@ export default class ComponentMap {
return res;
}

private configToObject() {
configToObject() {
if (!this.config) return undefined;
const config = {};
Object.keys(this.config).forEach((aspectId) => {
Expand All @@ -145,7 +158,7 @@ export default class ComponentMap {

static getPathWithoutRootDir(rootDir: PathLinux, filePath: PathLinux): PathLinux {
const newPath = pathRelativeLinux(rootDir, filePath);
if (newPath.startsWith('..')) {
if (newPath.startsWith('@teambit/legacy/dist/consumer')) {
// this is forbidden for security reasons. Allowing files to be written outside the components directory may
// result in overriding OS files.
throw new OutsideRootDir(filePath, rootDir);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BitError } from '@teambit/bit-error';
import chalk from 'chalk';
import { BASE_DOCS_DOMAIN } from '../../../constants';
import { BASE_DOCS_DOMAIN } from '@teambit/legacy/dist/constants';

export default class MissingMainFile extends BitError {
componentId: string;
Expand Down
17 changes: 17 additions & 0 deletions components/legacy/bit-map/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export {
BitMap,
GetBitMapComponentOptions,
PathChangeResult,
CURRENT_BITMAP_SCHEMA,
SCHEMA_FIELD,
LANE_KEY,
} from './bit-map';
export { MissingBitMapComponent, MissingMainFile, InvalidBitMap } from './exceptions';
export {
ComponentMapData,
ComponentMapFile,
ComponentMap,
Config,
getIgnoreListHarmony,
NextVersion,
} from './component-map';
4 changes: 2 additions & 2 deletions components/legacy/component-diff/components-diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import chalk from 'chalk';
import tempy from 'tempy';
import R from 'ramda';
import { ComponentID } from '@teambit/component-id';
import diffFiles from '@teambit/legacy/dist/utils/diff-files';
import { PathOsBased } from '@teambit/legacy/dist/utils/path';
import { diffFiles } from './diff-files';
import { PathOsBased } from '@teambit/toolbox.path.path';
import { SourceFile } from '@teambit/legacy/dist/consumer/component/sources';

export type DiffStatus = 'MODIFIED' | 'UNCHANGED' | 'NEW' | 'DELETED';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import execa from 'execa';

import logger from '../logger/logger';
import { PathOsBased } from '../utils/path';
import GitNotFound from './git/exceptions/git-not-found';
import getGitExecutablePath from './git/git-executable';
import logger from '@teambit/legacy/dist/logger/logger';
import { PathOsBased } from '@teambit/toolbox.path.path';
import { GitNotFound, getGitExecutablePath } from '@teambit/git.modules.git-executable';

/**
* get diff between files using git diff command
*/
export default async function diffFiles(fileA: PathOsBased, fileB: PathOsBased, colors = true): Promise<string> {
export async function diffFiles(fileA: PathOsBased, fileB: PathOsBased, colors = true): Promise<string> {
const params = ['diff'];
params.push('--no-index'); // ignores the working tree (in case the project is managed by git)
if (colors) params.push('--color');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import R from 'ramda';
import { ComponentID } from '@teambit/component-id';

export default function isBitIdMatchByWildcards(bitId: ComponentID, idsWithWildcard: string[] | string): boolean {
export function isBitIdMatchByWildcards(bitId: ComponentID, idsWithWildcard: string[] | string): boolean {
if (!Array.isArray(idsWithWildcard)) idsWithWildcard = [idsWithWildcard];
const regexPatterns = idsWithWildcard.map((id) => getRegex(id));
const isNameMatchByWildcard = (name: string): boolean => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
50 changes: 23 additions & 27 deletions src/utils/index.ts → components/legacy/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,44 +1,29 @@
// @TODO refactor this file to include only exports
import sha1 from './encryption/sha1';
import * as eol from './eol';
import writeFile from './fs-write-file';
import { checksum, checksumFile } from './checksum';
import getWithoutExt from './fs/fs-no-ext';
import getExt from './fs/get-ext';
import isDirEmpty from './fs/is-dir-empty';
import glob from './glob';
import { retrieveIgnoreList } from './ignore/ignore';
import immutableUnshift from './immutable-unshift';
import isBitUrl from './is-bit-url';
import isDir from './is-dir';
import isDirEmptySync from './is-dir-empty-sync';
import isAutoGeneratedFile from './is-file-auto-generated';
import isRelativeImport from './is-relative-import';
import isValidPath from './is-valid-path';
import mapToObject from './map/to-object';
import isNumeric from './number/is-numeric';
import cleanObject from './object-clean';
import objectToStringifiedTupleArray from './object-to-stringified-tuple-array';
import resolveGroupId from './os-resolve-group-id';
import resolveHomePath from './os-resolve-home-path';
import { pathJoinLinux, pathNormalizeToLinux, pathRelativeLinux, pathResolveToLinux } from './path';
import { pathIsInside } from './path-is-inside';
import prependBang from './prepend-bang';
import getLatestVersionNumber from './resolveLatestVersion';
import fromBase64 from './string/from-base64';
import getStringifyArgs from './string/get-stringify-args';
import removeChalkCharacters from './string/remove-chalk-characters';
import stripTrailingChar from './string/strip-trailing-char';
import toBase64 from './string/to-base64';
import toBase64ArrayBuffer from './string/to-base64-array-buffer';
import deflate from './zlib-deflate';
import inflate from './zlib-inflate';

export {
sha1,
objectToStringifiedTupleArray,
resolveGroupId,
mapToObject,
removeChalkCharacters,
getStringifyArgs,
isNumeric,
Expand All @@ -56,21 +41,32 @@ export {
isBitUrl,
isDir,
resolveHomePath,
isDirEmpty,
isDirEmptySync,
immutableUnshift,
stripTrailingChar,
getLatestVersionNumber,
getWithoutExt,
getExt,
pathNormalizeToLinux,
pathJoinLinux,
pathRelativeLinux,
pathResolveToLinux,
retrieveIgnoreList,
pathIsInside,
isValidPath,
isAutoGeneratedFile,
eol,
isRelativeImport,
};

export { ChownOptions } from './fs-write-file';
export { isBitIdMatchByWildcards } from './bit/is-bit-id-match-by-wildcards';
export { resolvePackagePath, resolvePackageNameByPath } from './packages';
export { replacePlaceHolderForPackageValue } from './bit/component-placeholders';
export { parseScope } from './bit/parse-scope';
export { replacePackageName } from './string/replace-package-name';
export { hasWildcard } from './string/has-wildcard';
export {
PathLinux,
PathLinuxRelative,
PathOsBased,
PathOsBasedRelative,
PathOsBasedAbsolute,
PathAbsolute,
PathLinuxAbsolute,
PathRelative,
removeFileExtension,
pathJoinLinux,
pathNormalizeToLinux,
pathRelativeLinux,
pathResolveToLinux,
} from '@teambit/toolbox.path.path';
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export { resolvePackageNameByPath } from './resolve-pkg-name-by-path';
export { resolvePackagePath } from './resolve-pkg-path';
export { resolvePackageData, ResolvedPackageData } from './resolve-pkg-data';
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'fs-extra';
import path from 'path';

import { PathOsBased } from '../path';
import { PathOsBased } from '@teambit/toolbox.path.path';

/**
* Recursively search for node package inside node_modules dir
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';

import hasWildcard from './has-wildcard';
import { hasWildcard } from './has-wildcard';

describe('hasWildcard', () => {
describe('using string', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default function hasWildcard(ids: string | null | undefined | string[]): boolean {
export function hasWildcard(ids: string | null | undefined | string[]): boolean {
if (!ids) return false;
if (Array.isArray(ids)) {
return ids.some((id) => idHasWildcard(id));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { expect } from 'chai';

import replacePackageName from './replace-package-name';
import { replacePackageName } from './replace-package-name';

describe('replacePackageName', () => {
it('should replace package surrounded with single quotes', () => {
Expand Down
Loading