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

chore: update all the things #832

Merged
merged 5 commits into from
May 8, 2018
Merged

Conversation

isaacs
Copy link
Collaborator

@isaacs isaacs commented May 8, 2018

Some test failures.

./test/build/built-034-nyc-wrap-produce_source_map-handles_stack_traces.js .. 0/1
  nyc > wrap > produce source map > handles stack traces
  not ok expected 'Error: Blarrh\n    at blah (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1317)\n    at Object.<anonymous> (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1396)\n    at Module._compile (internal/modules/cjs/loader.js:678:30)\n    at Module._compile (/Users/isaacs/dev/js/nyc/node_modules/source-map-support/source-map-support.js:492:25)\n    at Module.replacementCompile (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:58:13)\n    at module.exports (/Users/isaacs/dev/js/nyc/node_modules/default-require-extensions/js.js:8:9)\n    at Object.<anonymous> (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:62:4)\n    at Module.load (internal/modules/cjs/loader.js:589:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:520:3)\n    at Module.require (internal/modules/cjs/loader.js:626:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Test.<anonymous> (/Users/isaacs/dev/js/nyc/test/src/nyc-tap.js:213:21)\n    at Test.t.test.tt (/Users/isaacs/dev/js/nyc/node_modules/tap/lib/mocha.js:95:20)\n    at bound (domain.js:396:14)\n    at Test.runBound (domain.js:409:12)' to match /stack-trace.js:4:/
    stack: |
      Test.<anonymous> (test/src/nyc-tap.js:214:24)
    at:
      line: 214
      column: 24
      file: test/src/nyc-tap.js
      function: Test.<anonymous>
    type: AssertionError
    showDiff: false
    actual: |-
      Error: Blarrh
          at blah (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1317)
          at Object.<anonymous> (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1396)
          at Module._compile (internal/modules/cjs/loader.js:678:30)
          at Module._compile (/Users/isaacs/dev/js/nyc/node_modules/source-map-support/source-map-support.js:492:25)
          at Module.replacementCompile (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:58:13)
          at module.exports (/Users/isaacs/dev/js/nyc/node_modules/default-require-extensions/js.js:8:9)
          at Object.<anonymous> (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:62:4)
          at Module.load (internal/modules/cjs/loader.js:589:32)
          at tryModuleLoad (internal/modules/cjs/loader.js:528:12)
          at Function.Module._load (internal/modules/cjs/loader.js:520:3)
          at Module.require (internal/modules/cjs/loader.js:626:17)
          at require (internal/modules/cjs/helpers.js:20:18)
          at Test.<anonymous> (/Users/isaacs/dev/js/nyc/test/src/nyc-tap.js:213:21)
          at Test.t.test.tt (/Users/isaacs/dev/js/nyc/node_modules/tap/lib/mocha.js:95:20)
          at bound (domain.js:396:14)
          at Test.runBound (domain.js:409:12)
    expected: null
    test: handles stack traces
    source: |
      check().should.match(/stack-trace.js:4:/)

Bail out! # expected 'Error: Blarrh\n    at blah (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1317)\n    at Object.<anonymous> (/Users/isaacs/dev/js/nyc/test/fixtures/stack-trace.js:1:1396)\n    at Module._compile (internal/modules/cjs/loader.js:678:30)\n    at Module._compile (/Users/isaacs/dev/js/nyc/node_modules/source-map-support/source-map-support.js:492:25)\n    at Module.replacementCompile (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:58:13)\n    at module.exports (/Users/isaacs/dev/js/nyc/node_modules/default-require-extensions/js.js:8:9)\n    at Object.<anonymous> (/Users/isaacs/dev/js/nyc/node_modules/append-transform/index.js:62:4)\n    at Module.load (internal/modules/cjs/loader.js:589:32)\n    at tryModuleLoad (internal/modules/cjs/loader.js:528:12)\n    at Function.Module._load (internal/modules/cjs/loader.js:520:3)\n    at Module.require (internal/modules/cjs/loader.js:626:17)\n    at require (internal/modules/cjs/helpers.js:20:18)\n    at Test.<anonymous> (/Users/isaacs/dev/js/nyc/test/src/nyc-tap.js:213:21)\n    at Test.t.test.tt (/Users/isaacs/dev/js/nyc/node_modules/tap/lib/mocha.js:95:20)\n    at bound (domain.js:396:14)\n    at Test.runBound (domain.js:409:12)' to match /stack-trace.js:4:/

@isaacs isaacs requested a review from bcoe May 8, 2018 18:05
@bcoe bcoe changed the title Update all the things chore: update all the things May 8, 2018
@@ -6,4 +6,3 @@ test/build/
*.covered.js
*.swp
needs-transpile.js
package-lock.json
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this necessary?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because it makes npm faster, enables security auditing, and allows maintainers to track changes to the dependency tree in use during development. npm update works great with it (and faster) to bring everything up to latest and greatest semver. And git conflicts are automatically resolved by npm. There's no reason not to use it, and several reasons to enable it and keep it in source control.

Copy link
Contributor

Choose a reason for hiding this comment

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

We often use the yarn cache on Travis CI and it just makes it faster with npm ci and this also introduces some overhead in many repos ;-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

npm ci requires having a package-lock.json file present, so it's pretty important to be able to check it into the repo!

Copy link
Contributor

Choose a reason for hiding this comment

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

I know =) But we have to manage 2 lockfiles then (which is not always the best solution). Just saw now that you created and founded npm =)

Copy link
Contributor

Choose a reason for hiding this comment

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

Because @latest would have been 6.0.0 afaik.

Many projects have two lockfiles, use snyp and alternatives and there is a big thread against adding package-lock in libraries (consumers get different or not latest dependencies).

This is what I know so far from the community ;-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You mean, they have two files both named package-lock.json in the root of the project? I don't understand how that's even possible, I must be misunderstanding you.

There is no reason to not include package-lock.json in libraries. It's never published, and in practice, it makes debugging the rare issues caused by mismatched dependencies easier, because you can tell what the differences are.

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean, they have two files both named package-lock.json in the root of the project?

No, yarn.lock + package-lock.json like we have it here now.

Copy link
Contributor

Choose a reason for hiding this comment

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

See sindresorhus/ama#479 (comment) and other comments regarding packages / libraries (not apps).

Copy link
Contributor

Choose a reason for hiding this comment

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

And still do not understand the downgrade from npm 6 to npm 5. Oh please enlighten me master =)

Copy link
Member

@bcoe bcoe left a comment

Choose a reason for hiding this comment

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

this looks good to me, once tests pass; @DanielRuf once this lands, let's rebase the pull requests you have open against it.

@bcoe bcoe merged commit d76744a into istanbuljs:master May 8, 2018
@@ -5,7 +5,7 @@ environment:
install:
- ps: Install-Product node $env:nodejs_version
- npm cache clear
- npm i npm@latest -g
- npm i npm@5 -g
Copy link
Contributor

Choose a reason for hiding this comment

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

Why 5 instead of 6 in this PR? That's what I've meant. It's basically a downgrade from 6 to 5. Or am I wrong? =)

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

Successfully merging this pull request may close these issues.

3 participants