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

Add \u002F insted of / ,when use shipjs setup #548

Closed
tyankatsu0105 opened this issue Dec 23, 2019 · 1 comment · Fixed by #549
Closed

Add \u002F insted of / ,when use shipjs setup #548

tyankatsu0105 opened this issue Dec 23, 2019 · 1 comment · Fixed by #549

Comments

@tyankatsu0105
Copy link
Contributor

tyankatsu0105 commented Dec 23, 2019

Describe the bug
Insert \u002F in ship.config.js

module.exports = {
  publishCommand: ({ defaultCommand }) => `${defaultCommand} --access public`,
  mergeStrategy: { toReleaseBranch: { master: "releases" } },
  monorepo: {
    mainVersionFile: "lerna.json",
    packagesToBump: '["packages\u002F*"]',
    packagesToPublish: '["packages\u002F*"]'
  },
  buildCommand: () => null
};

To Reproduce
Steps to reproduce the behavior:

  1. Set lerna.json
  2. run shipjs setup
  3. check ship.config.js

Expected behavior
Use / instead of u002F.

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • environment: (your local machine, CircleCI, Travis CI, etc.)
  • node -v: 12.13.0
  • npm -v or yarn -v:
  • Ship.js version: 0.12.0

Additional context
It may cause, here:
https://github.com/algolia/shipjs/blob/master/packages/shipjs/src/step/setup/addShipConfig.js#L54

https://www.npmjs.com/package/serialize-javascript#automatic-escaping-of-html-characters

このパッケージの主な機能は、<script>要素のコンテンツとして追加することにより、HTMLドキュメントに埋め込むことができるリテラルJavaScriptの文字列にコードをシリアル化することです。

I think in this case, don't need to use escape.

@eunjae-lee
Copy link
Contributor

Thanks for the report :)
Would you like to work on this?
As you know @uetchy already provided a way to fix this:
https://shipjs.slack.com/archives/CRTUJSCQ7/p1577101355020200

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 a pull request may close this issue.

2 participants