-
Notifications
You must be signed in to change notification settings - Fork 13
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
TypeError: normalizedName.indexOf is not a function #61
Comments
To help you and debug on this can you show me your:
Then I'll have informations to help you and dive on this Have a nice day |
Sure @JulienKode! package.json
commitlint.config.js
lint-pr.yml
I left out the private/not relevant information. Thank you! |
@JulienKode I forked your example repository and configured it like our project is configured. The job is failing there too, see: https://github.com/dominikfoldi/pull-request-name-linter-action-example/runs/1198471507?check_suite_focus=true |
It does not work because this plugin is currently using @commitlint/lint v8, and it now needs to be updated to the version 11 While updating to v11 I face some issue that seems coming inside: https://github.com/davidtheclark/cosmiconfig It is not possible to load the commitlint.config file We need to dive more on this, to find out what is the issue and update this plugin to the v11 (we should version this plugin with the same version of commit lint may be ? ) |
Maybe we can version the plugin with the versions of commitlint but I have a feeling that it doesn't worth the effort. I think that first we should try to move to the latest commitlint version and if somebody complains that it is creating an issue for them, then consider the multiple version support. |
You're right, I think the main priority is to update to the latest version of commitlint then having a versioning strategy |
@JulienKode can I help you somehow with this? |
I've made a minimal reproduction for this bug on the following branch:
When you go on it you can do:
When we are using it with babel it work but when we pack it with Maybe we can try to investigate on this as now we have a reproductible issue |
The difference with lib/main.js and dist/index.js is that in the dist we pack it with the node_modules like here: https://github.com/actions/typescript-action/blob/main/package.json |
Maybe we should throw out |
The issue seems related to: https://github.com/sindresorhus/import-fresh, this is the same issue as sindresorhus/import-fresh#18 that seems to block the update to commitlint v11, I do not think if changing to webpack or rollup can change this issue as we will have only one bundle and the error that we have happens when there is no parent module. But we can try to move to webpack too if you want, or rollup sindresorhus/import-fresh#19 can fix the issue I think |
I think this is the last blocker before upgrading this action to v11 of commitlint |
I release a new version https://github.com/JulienKode/pull-request-name-linter-action/releases/tag/v0.2.0 This should fix this issue |
Let me know if you still have the issue or not |
We can close this issue if you still have it after the update @dominikfoldi, feel free to re-open this issue |
Just tested it. It is working like a charm! Thank you @JulienKode! 🌮 |
Perfect ! Glad that it work for you, thanks for raising this issue |
When the action runs it throws the following error:
It seems that it is coming from the bundled
eslint
. WhydevDependencies
are bundled into the action's bundle in the first place? Isn't it possible to leave thedevDependencies
out withncc
?I would really like to use your action but I don't have any experience with
ncc
so I cannot provide a PR unfortunately.The text was updated successfully, but these errors were encountered: