bbc / speculate

Automatically generates an RPM Spec file for your Node.js project
Other
66 stars 28 forks source link

Replace hyphens #66

Closed jmalk closed 5 years ago

jmalk commented 5 years ago

See https://github.com/bbc/speculate/issues/64.

I could also make this less opinionated by adding some option. e.g. Replacement will only happen if you specify in your package.json:

{
  "spec": {
    "replaceHyphens": true
  }
}
j-luong commented 5 years ago

Would you mind providing some context as to why we would need to replace hyphens?

jmalk commented 5 years ago

@j-luong rpmbuild errors on npm versions with hyphens in; more context in this issue: https://github.com/bbc/speculate/issues/64

j-luong commented 5 years ago

Hi @jmalk, I would favour implementing your suggestion regarding having it as an optional parameter to avoid any potential breaking changes.

Let's set it to false by default.

jmalk commented 5 years ago

@j-luong Cool, I agree 'opt-in' will be less likely to cause confusion or bugs. I'll update the PR when I get chance to implement that.

jmalk commented 5 years ago

@j-luong I've implemented 'opt-in' replacement of hyphens as suggested.