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

wrap setting err.message with a try/catch #2996

Merged
merged 3 commits into from May 1, 2020

Conversation

chharvey
Copy link
Contributor

@chharvey chharvey commented Apr 1, 2018

this attempts to bypass #2995 (a continuation of pugjs/pug-runtime#35)

note that this does not fix the bug. if setting err.message throws an error, the reason for that should be found and corrected.

this attempts to bypass pugjs#2995 (a continuation of pugjs/pug-runtime#35)

note that this does not fix the bug. if setting `err.message` throws an error, the reason for that should be found and corrected.
@ForbesLindesay
Copy link
Member

Can you update the tests. You can usually do this by running yarn test -u.

@chharvey
Copy link
Contributor Author

chharvey commented Jul 22, 2019

@ForbesLindesay I tried running npx yarn test -u (I don’t have the yarn command line) but got the error below.

I merged in master (pug v2.0.4), ran npm install, running npm v6.10.0, and node v10.15.3.

~/Repositories/_FORKED/pug:$ npx yarn test -u
npx: installed 1 in 1.098s
yarn run v1.17.3
$ lerna run pretest
lerna notice cli v3.10.8
lerna info versioning independent
lerna info Executing command in 1 package: "yarn run pretest"
lerna ERR! yarn run pretest exited 1 in 'pug-runtime'
lerna ERR! yarn run pretest stdout:
$ npm run prepublish

> pug-runtime@2.0.5 prepublish /Users/Chris/Repositories/_FORKED/pug/packages/pug-runtime
> node prepublish

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

lerna ERR! yarn run pretest stderr:
npm WARN lifecycle The node binary used for scripts is /var/folders/1c/lvpbw7yx2bngjzt7vkwt023r0000gn/T/yarn--1563760108313-0.08699649989854286/node but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.
undefined:2001
            S.token = S.input();
                        ^

TypeError: S.input is not a function
    at next (eval at <anonymous> (/Users/Chris/Repositories/_FORKED/pug/node_modules/uglify-js/tools/node.js:20:1), <anonymous>:2001:25)
    at Object.parse (eval at <anonymous> (/Users/Chris/Repositories/_FORKED/pug/node_modules/uglify-js/tools/node.js:20:1), <anonymous>:1985:15)
    at /Users/Chris/Repositories/_FORKED/pug/packages/pug-runtime/prepublish.js:32:22
    at Array.forEach (<anonymous>)
    at Object.<anonymous> (/Users/Chris/Repositories/_FORKED/pug/packages/pug-runtime/prepublish.js:18:10)
    at Module._compile (internal/modules/cjs/loader.js:701:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
    at Module.load (internal/modules/cjs/loader.js:600:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
    at Function.Module._load (internal/modules/cjs/loader.js:531:3)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! pug-runtime@2.0.5 prepublish: `node prepublish`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the pug-runtime@2.0.5 prepublish script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/Chris/.npm/_logs/2019-07-22T01_48_28_732Z-debug.log
error Command failed with exit code 1.

lerna ERR! yarn run pretest exited 1 in 'pug-runtime'
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@ForbesLindesay ForbesLindesay merged commit b043d7c into pugjs:master May 1, 2020
@chharvey chharvey deleted the chharvey-patch-1 branch May 1, 2020 16:47
@rollingversions
Copy link

pug-runtime (2.0.5 → 2.0.6)

Bug Fixes

  • wrap setting err.message with a try/catch

Packages With No Changes

The following packages have no user facing changes, so won't be released:

  • pug
  • pug-attrs
  • pug-code-gen
  • pug-error
  • pug-filters
  • pug-lexer
  • pug-linker
  • pug-load
  • pug-parser
  • pug-strip-comments
  • pug-walk

Edit changelogs

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.

None yet

2 participants