Skip to content

Conversation

@nickserv
Copy link
Member

Fixes #6903 (tested with yarn link and webpack)

Thanks to @j-f1 for figuring out the fix

  • I’ve added tests to confirm my change works. (N/A)
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory) (N/A)
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/pr-XXXX.md file following changelog_unreleased/TEMPLATE.md. (N/A)
  • I’ve read the contributing guidelines.

Try the playground for this PR

Copy link
Member

@fisker fisker left a comment

Choose a reason for hiding this comment

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

@fisker
Copy link
Member

fisker commented Nov 11, 2019

@nickmccurdy since prettier-chrome-extension are bundling prettier, could you add some tests for this and #6658 , so we can prevent this happen again?

@nickserv
Copy link
Member Author

What should the test do, just import everything and assert there are no warnings?

@fisker
Copy link
Member

fisker commented Nov 11, 2019

maybe something like this

webpack({
  entry: './parser-typescript.js', 
  mode: 'production'
}, (error, stats) => {
 // check error and stats
})

quick test

wget https://unpkg.com/[email protected]/parser-typescript.js
node -e "require('webpack')({entry: './parser-typescript.js', mode: 'production'}, (error, stats) => console.error(stats.compilation.warnings))"

@nickserv
Copy link
Member Author

Thanks. I understand your test example, but where should I put this test? Test files? Integration test files (don't seem to run in CI)? After test:dir? Another script?

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

I think manual tests enough in this case

@lydell lydell merged commit 37846a7 into prettier:master Nov 12, 2019
@fisker fisker mentioned this pull request Nov 15, 2019
lipis added a commit that referenced this pull request Jan 8, 2020
* 'master' of github.com:prettier/prettier:
  Don't lowercase element names in CSS selectors (#6947)
  Support string-to-package config in JSON schema: (#6941)
  Rename SECURITY.md to .github/SECURITY.md
  Create SECURITY.md
  Add the XML plugin to the docs (#6944)
  TypeScript: Fix formatting of type operators as arrow function… (#6901)
  SCSS: don't add extra comma after last comment in map (#6918)
  Remove typescript-etw from build (#6919)
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Feb 10, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 10, 2020
@nickserv nickserv deleted the patch-1 branch August 23, 2021 03:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TypeScript browser bundle has webpack warning

6 participants