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

Upgraded outdated dependencies in template #256

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

KoolTheba
Copy link

Hi @dougwilson !

I've just installed the express-generator and I saw that the dependencies were outdated. Please let me know if this modification is ok for you.

Dependencies upgraded:

Package      Current  Wanted  Latest  Location
debug          2.6.9   2.6.9   4.1.1  api
express       4.16.4  4.16.4  4.17.1  api
http-errors    1.6.3   1.6.3   1.7.3  api
morgan         1.9.1   1.9.1  1.10.0  api

```
Package      Current  Wanted  Latest  Location
debug          2.6.9   2.6.9   4.1.1  api
express       4.16.4  4.16.4  4.17.1  api
http-errors    1.6.3   1.6.3   1.7.3  api
morgan         1.9.1   1.9.1  1.10.0  api
```
@dougwilson
Copy link
Contributor

Thanks my friend! Looks like we just need to update the unit tests to account for the version changes. Perhaps we should make the unit tests ignore the specific version, as this keeps coming up 🤔

@helio-frota
Copy link

@dougwilson makes sense 👍

The test is to check if it has a package.json file, then the original version of the dependencies (modified in express-cli.js) can be added as part of the content, something like:

it('should have a package.json file', function () {
      var file = path.resolve(ctx.dir, 'package.json')
      var fileLoaded = require(file)  // <--- Changed here.
      var contents = fs.readFileSync(file, 'utf8')
      assert.strictEqual(contents, '{\n' +
        '  "name": "express-1-no-args",\n' +
        '  "version": "0.0.0",\n' +
        '  "private": true,\n' +
        '  "scripts": {\n' +
        '    "start": "node ./bin/www"\n' +
        '  },\n' +
        '  "dependencies": {\n' +
        '    "cookie-parser": "~1.4.4",\n' +
        '    "debug": "' + fileLoaded.dependencies.debug + '",\n' +  // <--- Changed here.
        '    "express": "~4.16.1",\n' +
        '    "http-errors": "~1.6.3",\n' +
        '    "jade": "~1.11.0",\n' +
        '    "morgan": "~1.9.1"\n' +
        '  }\n' +
        '}\n')
    })

@helio-frota helio-frota self-requested a review June 20, 2020 11:49
Copy link

@helio-frota helio-frota left a comment

Choose a reason for hiding this comment

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

Details here: #256 (comment)

@heardofdezz
Copy link

Thanks for the update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants