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

Refactored utilities #30

Merged
merged 16 commits into from
May 17, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: Removed utilities for files
ijlee2 committed May 17, 2023
commit 05c31de0f9eb0e24c60b18ea088fd13c3498ad3d
3 changes: 2 additions & 1 deletion src/migration/ember-addon/steps/analyze-addon.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { findFiles, renameDirectory } from '@codemod-utils/files';

import { getVersion } from '../../../utils/blueprints.js';
import { findFiles, renameDirectory } from '../../../utils/files.js';

function getAppReexports(options) {
const { projectRoot } = options;
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@ import { readFileSync } from 'node:fs';
import { join } from 'node:path';

import { processTemplate } from '@codemod-utils/blueprints';
import { createFiles, findFiles } from '@codemod-utils/files';

import { blueprintsRoot } from '../../../utils/blueprints.js';
import { createFiles, findFiles } from '../../../utils/files.js';

function getFilesToSkip(options) {
const { packageManager, packages } = options;
2 changes: 1 addition & 1 deletion src/migration/ember-addon/steps/create-options.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFileSync } from 'node:fs';
import { join } from 'node:path';

import { findFiles, unionize } from '../../../utils/files.js';
import { findFiles, unionize } from '@codemod-utils/files';

function validatePackageJson({ name, version }) {
if (!name) {
2 changes: 1 addition & 1 deletion src/migration/ember-addon/steps/move-addon-files.js
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import {
mapFilePaths,
moveFiles,
removeFiles,
} from '../../../utils/files.js';
} from '@codemod-utils/files';

function moveAddonFolder(options) {
const { locations, projectRoot } = options;
2 changes: 1 addition & 1 deletion src/migration/ember-addon/steps/move-project-root-files.js
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@ import {
moveFiles,
removeFiles,
unionize,
} from '../../../utils/files.js';
} from '@codemod-utils/files';

function copyToAddon(options) {
const { locations, projectRoot } = options;
2 changes: 1 addition & 1 deletion src/migration/ember-addon/steps/move-test-app-files.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { readFileSync, writeFileSync } from 'node:fs';
import { join } from 'node:path';

import { findFiles, mapFilePaths, moveFiles } from '../../../utils/files.js';
import { findFiles, mapFilePaths, moveFiles } from '@codemod-utils/files';

function moveTestsFolder(options) {
const { locations, projectRoot } = options;
8 changes: 0 additions & 8 deletions src/utils/files.js

This file was deleted.

16 changes: 0 additions & 16 deletions src/utils/files/copy-files.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/utils/files/create-directory.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/utils/files/create-files.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/utils/files/find-files.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/utils/files/map-file-paths.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/utils/files/move-files.js

This file was deleted.

21 changes: 0 additions & 21 deletions src/utils/files/remove-directory-if-empty.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/utils/files/remove-files.js

This file was deleted.

36 changes: 0 additions & 36 deletions tests/utils/files/copy-files.test.js

This file was deleted.

43 changes: 0 additions & 43 deletions tests/utils/files/create-directory.test.js

This file was deleted.

40 changes: 0 additions & 40 deletions tests/utils/files/create-files.test.js

This file was deleted.

57 changes: 0 additions & 57 deletions tests/utils/files/find-files.test.js

This file was deleted.

74 changes: 0 additions & 74 deletions tests/utils/files/map-file-paths.test.js

This file was deleted.

57 changes: 0 additions & 57 deletions tests/utils/files/move-files.test.js

This file was deleted.

43 changes: 0 additions & 43 deletions tests/utils/files/remove-directory-if-empty.test.js

This file was deleted.

42 changes: 0 additions & 42 deletions tests/utils/files/remove-files.test.js

This file was deleted.