Yarn: bundledDependencies๋Š”> = v0.19.0๋ถ€ํ„ฐ ์••์ถ•๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์— ๋งŒ๋“  2017๋…„ 02์›” 05์ผ  ยท  3์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: yarnpkg/yarn

๊ธฐ๋Šฅ ์„ ์š”์ฒญํ•˜๊ฑฐ๋‚˜ ๋ฒ„๊ทธ๋ฅผ๋ณด๊ณ  ํ•˜์‹œ๊ฒ ์Šต๋‹ˆ๊นŒ?
๊ณค์ถฉ

ํ˜„์žฌ ํ–‰๋™์€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?
yarn pack ์€ v0.19.0, v0.19.1 ๋ฐ v0.20.0์—์„œ bundledDependecies๋ฅผ ํŒจํ‚ค์ง€ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

ํ˜„์žฌ ๋™์ž‘์ด ๋ฒ„๊ทธ ์ธ ๊ฒฝ์šฐ ์žฌํ˜„ ๋‹จ๊ณ„๋ฅผ ์ œ๊ณตํ•˜์‹ญ์‹œ์˜ค.

{
  "name": "test-bundled-deps",
  "version": "0.0.0",
  "dependencies": {
    "bcryptjs": "^2.0.0",
  },
  "bundledDependencies": [
    "bcryptjs",
  ]
}

๊ทธ๋Ÿฐ ๋‹ค์Œ yarn ๋‹ค์Œ์— yarn pack
tgz ํŒŒ์ผ์„ ํ™•์ธํ•˜์‹ญ์‹œ์˜ค. node_modules ํด๋”๋Š” ํฌํ•จ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์˜ˆ์ƒ๋˜๋Š” ๋™์ž‘์€ ๋ฌด์—‡์ž…๋‹ˆ๊นŒ?
๋ฒ„์ „ 0.18.1์—์„œ์™€ ๊ฐ™์ด ์ž‘๋™
node.js, yarn ๋ฐ ์šด์˜ ์ฒด์ œ ๋ฒ„์ „์„ ์–ธ๊ธ‰ํ•˜์‹ญ์‹œ์˜ค.

$ node -v
v7.4.0

OS X El Capitan 10.11.6

cat-bug good first issue help wanted high-priority triaged

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

@bestander : ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์— ์‹คํŒจํ•œ PR์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค (# 4598).

ํ…Œ์ŠคํŠธ ํ”ฝ์Šค์ฒ˜์— ์ง€์ •๋œ ํ”„๋กœ์ ํŠธ ์„ค์ •์„ ์‚ฌ์šฉํ•˜์—ฌ npm install ๋ฐ npm pack ํ•˜๋ฉด ๊ฒฐ๊ณผ ์•„์นด์ด๋ธŒ์— ๋ฒˆ๋“ค ์ข…์†์„ฑ์ด ํฌํ•จ ๋œ node_modules ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. yarn ์‚ฌ์šฉํ•˜์—ฌ ๋™์ผํ•œ ๋ช…๋ น์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ์•„์นด์ด๋ธŒ์— ๋ฒˆ๋“ค ์ข…์†์„ฑ์ด ํฌํ•จ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  3 ๋Œ“๊ธ€

์ ์–ด๋„ ๋‹ค์Œ ์›์ธ์œผ๋กœ ์ธํ•ด ๋ฐœ์ƒํ•˜๋Š” ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • FOLDERS_IGNORE d1d5343082cd5a3b2020962c0bb6f2d6fb1ac4f3์— 'node_modules'์ถ”๊ฐ€
  • commands / pack.js์—์„œ ์ž˜๋ชป๋œ bundledDependencies ์•ก์„ธ์Šค :-

    • src / cli / commands / pack.js : const {bundledDependencies, main, files : onlyFiles} = pkg;

    • src / util / normalize-manifest / fix.js : info.bundleDependencies = info.bundledDependencies;

    • src / util / normalize-manifest / fix.js : info.bundledDependencies ์‚ญ์ œ;

๊ทธ๊ฒƒ๋“ค์„ ํ•ด๊ฒฐํ•˜๋ฉด ์••์ถ• ๋œ .tgz์— node_modules / module์ด ์ œ๊ณต๋˜์ง€๋งŒ ํ•˜์œ„ ๋””๋ ‰ํ† ๋ฆฌ / ํŒŒ์ผ์€ ์—†์Šต๋‹ˆ๋‹ค.

ํ…Œ์ŠคํŠธ๋ฅผ ํ†ตํ•œ PR์€ ํ™˜์˜ํ•ฉ๋‹ˆ๋‹ค

@bestander : ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค์— ์‹คํŒจํ•œ PR์„ ์ถ”๊ฐ€ํ–ˆ์Šต๋‹ˆ๋‹ค (# 4598).

ํ…Œ์ŠคํŠธ ํ”ฝ์Šค์ฒ˜์— ์ง€์ •๋œ ํ”„๋กœ์ ํŠธ ์„ค์ •์„ ์‚ฌ์šฉํ•˜์—ฌ npm install ๋ฐ npm pack ํ•˜๋ฉด ๊ฒฐ๊ณผ ์•„์นด์ด๋ธŒ์— ๋ฒˆ๋“ค ์ข…์†์„ฑ์ด ํฌํ•จ ๋œ node_modules ๋””๋ ‰ํ† ๋ฆฌ๊ฐ€ ํฌํ•จ๋ฉ๋‹ˆ๋‹ค. yarn ์‚ฌ์šฉํ•˜์—ฌ ๋™์ผํ•œ ๋ช…๋ น์„ ์ˆ˜ํ–‰ํ•˜๋ฉด ์•„์นด์ด๋ธŒ์— ๋ฒˆ๋“ค ์ข…์†์„ฑ์ด ํฌํ•จ๋˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰