purescript-contrib / governance

Guidelines and resources for the PureScript Contributors organization
15 stars 3 forks source link

Expected behavior of --uses-js #10

Closed milesfrain closed 4 years ago

milesfrain commented 4 years ago

In the original package.json I have:

  "dependencies": {
    "ace-builds": "^1.4.12"
  }

But this gets dropped from the new one after running

contrib-updater generate --uses-js --title Ace --maintainer milesfrain

The new package.json is:

{
  "private": true,
  "scripts": {
    "build": "eslint src && spago build --purs-args '--censor-lib --strict'",
    "test": "spago test --no-install"
  },
  "devDependencies": {
    "eslint": "^7.6.0"
  }
}
thomashoneyman commented 4 years ago

At the moment the tool is naive: it will overwrite your existing files and save them into a backups directory. It’s then your job to manually reconcile the differences — for example, by re-adding that dependency.

I’ve been using the diffs to check what’s changed.

I’m not sure how better to handle this — it’s a pretty coarse tool at the moment.

thomashoneyman commented 4 years ago

Closing this, but if you'd like to open an issue to discuss a better way for the tool to work I'm happy to figure out a better solution!