plugins icon indicating copy to clipboard operation
plugins copied to clipboard

[@rollup/plugin-yaml 4.0.0] if yaml data use '00' or '0' has different result

Open shaoahs opened this issue 4 years ago • 1 comments

  • Rollup Plugin Name: plugin-yaml
  • Rollup Plugin Version: 4.0.0
  • Rollup Version: 2.79.1
  • Operating System (or Browser): linux
  • Node Version: v16.12.0
  • Link to reproduction (⚠️ read below): https://replit.com/@shaoahs/rollup-repro-plugins-yaml-sample0001#src/res.yml

Expected Behavior

yaml data

---
'00': abc
aa: xyz

convert to js source code

{
  '00': abc,
  aa: xyz
}

or yaml data

---
'0': abc
aa: xyz

convert to js source code

{
  '0': abc,
  aa: xyz
}

Actual Behavior

[!] Error: Invalid number (Note that you need plugins to import files that are not JavaScript)
src/res.yml (1:13)
1: var data = { 00:"abc",
                ^
2:   aa:"xyz" };

or yaml data

---
'0': abc
aa: xyz

convert to js source code

{
  0: abc,
  aa: xyz
}

Additional Information

null

shaoahs avatar Oct 12 '22 06:10 shaoahs

Hey folks. This issue hasn't received any traction for 60 days, so we're going to close this for housekeeping. If this is still an ongoing issue, please do consider contributing a Pull Request to resolve it. Further discussion is always welcome even with the issue closed. If anything actionable is posted in the comments, we'll consider reopening it. ⓘ

stale[bot] avatar Dec 20 '22 22:12 stale[bot]