Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Removing Corepack

Removing Corepack

東京Node学園 44時限目で発表した Removing Corepack についてです。

Yosuke Furukawa

September 27, 2024
Tweet

More Decks by Yosuke Furukawa

Other Decks in Programming

Transcript

  1. ܦҢ • corepack ͸ Node.js ͷcore͔Β࡟আ͢ΔࣄΛද໌͢ΔPR͕ Ϛʔδ͞Εͨɻ https://github.com/nodejs/package- maintenance/pull/606 •

    Package Maintenance Working Group ʹΑΔܾఆ • ͦ΋ͦ΋͜ͷGroupͷҙਤ͸ͲΜͳ΋ͷ͕͋Δͷ͔
  2. Package Maintenance Working Group • ࣮ࡍʹൃ଍͞Εͨͷ͸6೥લɺNode.js v10͘Β͍ʁ • Node.js ͷΤίγεςϜͰ͋ΔpackageͷࢧԉΛ͢ΔͨΊͷά

    ϧʔϓ • όʔδϣϯΞοϓͷ๦͛ʹͳΔΑ͏ͳϥΠϒϥϦ΍ύοέʔδ ͷ໰୊Λಛఆ͠ɺαϙʔτΛߦ͏͜ͱ͕໨త
  3. Package Maintenance Working Group • Version؅ཧʹؔ͢ΔNode.js ͱ Package Managerͷ໨త •

    ΞϓϦέʔγϣϯ։ൃऀ͕ҎԼͷ͜ͱ͕Ͱ͖ΔΑ͏ʹ͢Δ 1. ϓϩδΣΫτʹద੾ͳNode.js/Package Managerͷόʔδϣϯ͕ఆٛͰ͖Δ ͜ͱ 2. ϩʔΧϧ։ൃ༻ͷNode.js / Package ManagerΛΠϯετʔϧͰ͖Δ͜ͱ 3. ϓϩδΣΫτ͝ͱʹਖ਼͍͠Node.js / Package Manager ͷ࣮ߦ͕Ͱ͖Δ͜ͱ
  4. Package Maintenance Working Group • nvm ΍ fnm ͳͲͷόʔδϣϯ ؅ཧπʔϧܦ༝ͰೖΕΔΑ͏ͳ

    ಋೖ͕هड़͞ΕΔΑ͏ʹͳͬͨɻ • ͜͜ͷผλϒʹผ్ύοέʔδ ϚωʔδϟͷΠϯετʔϧ΋هࡌ ͞ΕΔ༧ఆʹͳ͍ͬͯΔɻ
  5. Package Maintenance Working Group • ͭ·Γɺyarn, pnpm ͳͲͷπʔϧ ΋͜͜ͰΠϯετʔϧʹରͯ͠ खॱ͕هࡌ͞ΕΔɻ

    • ͦͷखॱ͸yarn, pnpmͷ ࡞ऀ͕ਪ঑͢ΔΠϯετʔϧखॱʹ ै͏ඞཁ͕͋Δ • ඞͣ͠΋corepackܦ༝ͰΠϯετʔϧ ͢Δ͜ͱ͕ਪ঑͞ΕΔΘ͚Ͱ͸ͳ͍
  6. Corepack security issue? • corepackͷͦ΋ͦ΋ͷߟ͑ํͱͯ͠ npm Ҏ֎ͷιʔε͔ΒύοέʔδϚ ωʔδϟʔͷμ΢ϯϩʔυΛ޿͘Ͱ͖Δ΋ͷͱ͍ͯ͠Δɻ • ྫ͑͹ɺcorepack͕αϙʔτ͍ͯ͠Δ

    yarn ͷURL͕ࣦޮ͠ɺυϝΠϯ͕ ৐ͬऔΒΕͨ৔߹͸Ͳ͏ͳΔʁ • ެ͕ࣜαϙʔτ͢Δ package manager ͸ͪΌΜͱग़ॴ͕อূͰ͖Δ΋ͷ Ͱͳͯ͘͸ͳΒͳ͍ͷͰ͸ͳ͍͔ɺͦ͏͡Όͳ͍΋ͷ͸ೖΕΔ΂͖Ͱ͸ͳ ͍ͱ͍͏ҙݟ https://github.com/nodejs/corepack/issues/495
  7. Corepack security issue? • ॺ໊Λ͚ͭͯ npm ͕ॺ໊ݕূͰվ͟ΜΛ๷ࢭ͢Δػೳ͕͢Ͱʹଘࡏ͠ ͍ͯΔͷͰɺͦͷΑ͏ͳܗͰ഑৴Ͱ͖Δඞཁ͕͋ΔͷͰ͸ͳ͍͔ʁ • গͳ͘ͱ΋

    corepack ଆͰ package manager ͕ॻ͖׵͑ΒΕͯͳ͍͔ ΛݕূͰ͖Δػೳ͸ඞཁͳͷͰ͸ɻ • yarnʹॺ໊Λݕূ͢ΔΑ͏ͳػೳ͕ͳ͍͜ͱ΋ࢦఠ͞Ε͍ͯΔɻ • ݌ʑᨣʑ https://github.com/nodejs/corepack/issues/495
  8. ๻ͷҙݟ • ͦ΋ͦ΋Ͱ͍͏ͱ nvm ͳͲͷ Runtime ͷόʔδϣϯϚωʔδϟʔ͸ίΞͷ தʹ͸ͳ͍ɻ • package

    managerͷ version manager ͚ͩίΞͷதʹ͋Δͷ͸ػೳఏڙత ʹยखམͪͳؾ͕͢Δɻ • rust ͷ cargo ͷΑ͏ʹversion manager Ͱ͋Γ package manager Ͱ͋Γɺ runtime upgrader Ͱ͋Δ͔ͷΑ͏ͳ։ൃʹඞཁͳػೳΛ౷Ұ͢Δπʔϧ͕ ͋ͬͯ΋ྑ͍Α͏ͳؾ͕ͨ͠ɻ