yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.42k stars 1.11k forks source link

[Bug] yarn plugin import unquoting numbers in packageExtensions #2022

Open xenoterracide opened 4 years ago

xenoterracide commented 4 years ago

this is my yarnrc

# nodeLinker: node-modules

plugins:
  - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
    spec: '@yarnpkg/plugin-workspace-tools'
  - path: .yarn/plugins/@yarnpkg/plugin-stage.cjs
    spec: '@yarnpkg/plugin-stage'
  - path: .yarn/plugins/@yarnpkg/plugin-version.cjs
    spec: '@yarnpkg/plugin-version'

yarnPath: .yarn/releases/yarn-2.3.3.cjs

packageExtensions:
  apollo-engine-reporting-protobuf@^0.5:
    dependencies:
      long: '^4'
      '@types/long': '^4'
      '@apollo/protobufjs': '^1'
  apollo-reporting-protobuf@^0.6:
    dependencies:
      long: '^4'
      '@types/long': '^4'
  apollo-server-testing@^2:
    dependencies:
      apollo-server-types: '^0.6'
  apollo-server-plugin-response-cache@^0.5:
    dependencies:
      apollo-server-types: '^0.6'
  axios-logger@^2:
    dependencies:
      axios: '^0.19'
  subscriptions-transport-ws@^0.9:
    dependencies:
      '@types/ws': '^5.1'
  typeorm@^0.2:
    peerDependencies:
      pg: '^8'
  winston-transport@^4:
    dependencies:
      logform: '^2'
  '@new10com/axios-logger@^0.1':
    dependencies:
      pino: '^6'
      pino-pretty: '^4'
      '@types/pino': '^6'
      axios: '^0.19'
  jest-resolve@^26:
    dependencies:
      jest-haste-map: '^26'
  merge-anything@^3:
    dependencies:
      ts-toolbelt: '8.0'

now when I run yarn plugin import workspace-tools it changes it to this

packageExtensions:
  "@new10com/axios-logger@^0.1":
    dependencies:
      "@types/pino": ^6
      axios: ^0.19
      pino: ^6
      pino-pretty: ^4
  apollo-engine-reporting-protobuf@^0.5:
    dependencies:
      "@apollo/protobufjs": ^1
      "@types/long": ^4
      long: ^4
  apollo-reporting-protobuf@^0.6:
    dependencies:
      "@types/long": ^4
      long: ^4
  apollo-server-plugin-response-cache@^0.5:
    dependencies:
      apollo-server-types: ^0.6
  apollo-server-testing@^2:
    dependencies:
      apollo-server-types: ^0.6
  axios-logger@^2:
    dependencies:
      axios: ^0.19
  jest-resolve@^26:
    dependencies:
      jest-haste-map: ^26
  merge-anything@^3:
    dependencies:
      ts-toolbelt: 8.0
  subscriptions-transport-ws@^0.9:
    dependencies:
      "@types/ws": ^5.1
  typeorm@^0.2:
    peerDependencies:
      pg: ^8
  winston-transport@^4:
    dependencies:
      logform: ^2

plugins:
  - path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
    spec: "@yarnpkg/plugin-workspace-tools"
  - path: .yarn/plugins/@yarnpkg/plugin-stage.cjs
    spec: "@yarnpkg/plugin-stage"
  - path: .yarn/plugins/@yarnpkg/plugin-version.cjs
    spec: "@yarnpkg/plugin-version"

yarnPath: .yarn/releases/yarn-2.3.3.cjs

you'll note that in unquotes 8.0 for ts-toolbelt, according to vscode this field should be a string.

yarnbot commented 3 years ago

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟