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

Accounted for the location of the installed package #2

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

ijlee2
Copy link
Owner

@ijlee2 ijlee2 commented Jan 16, 2023

Description

A patch to #1. I derived and tested the solution by,

  • Running npx -p ember-codemod-v1-to-v2 which ember-codemod-v1-to-v2 to locate the installed code. This results in a path ~/.npm/_npx/<some-hash>/node_modules/ember-codemod-v1-to-v2.
  • Editing src/migration/ember-addon/steps/create-files-from-blueprint.js
  • Running npx ember-codemod-v1-to-v2 (cached) to run the edited code

Notes

I suspect that the analog in ember-cli is https://github.com/ember-cli/ember-cli/blob/v4.9.2/lib/models/blueprint.js#L1640-L1642.

@ijlee2 ijlee2 added the bug Something isn't working label Jan 16, 2023
Comment on lines +10 to +11
const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__dirname is unavailable in Node. An alternative came from https://stackoverflow.com/a/50052194.

@ijlee2 ijlee2 marked this pull request as ready for review January 16, 2023 14:34
@ijlee2 ijlee2 merged commit c167813 into main Jan 16, 2023
@ijlee2 ijlee2 deleted the fix-blueprint-root branch January 16, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant