| 1 |
// generated from test/fixtures/testing-rebuild-bundle-reified |
| 2 |
module.exports = t => { |
| 3 |
const path = t.testdir({ |
| 4 |
"README.md": `- \`root\` depends on \`parent\` |
| 5 |
- \`parent\` bundles \`a\` |
| 6 |
- \`a\` depends on \`b\` |
| 7 |
- \`b\` has a build script |
| 8 |
|
| 9 |
Should get rebuilt if \`rebuildBundle\` is true, otherwise not. |
| 10 |
`, |
| 11 |
"node_modules": { |
| 12 |
".package-lock.json": JSON.stringify({ |
| 13 |
"name": "@isaacs/testing-rebuild-bundle-reified", |
| 14 |
"version": "1.0.0", |
| 15 |
"lockfileVersion": 2, |
| 16 |
"requires": true, |
| 17 |
"packages": { |
| 18 |
"node_modules/@isaacs/testing-rebuild-bundle-a": { |
| 19 |
"version": "1.0.1", |
| 20 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-a/-/testing-rebuild-bundle-a-1.0.1.tgz", |
| 21 |
"integrity": "sha512-ZJeJZTSSm38+dZaFbei3ruFvLPWRbWrF8/CAojhuqopKHxp3qdQ4n4UVfVnUdzl55ZJ+gOzItKelIu3sASglKQ==", |
| 22 |
"bundleDependencies": [ |
| 23 |
"@isaacs/testing-rebuild-bundle-b" |
| 24 |
], |
| 25 |
"dependencies": { |
| 26 |
"@isaacs/testing-rebuild-bundle-b": "" |
| 27 |
} |
| 28 |
}, |
| 29 |
"node_modules/@isaacs/testing-rebuild-bundle-a/node_modules/@isaacs/testing-rebuild-bundle-b": { |
| 30 |
"version": "1.0.1", |
| 31 |
"hasInstallScript": true, |
| 32 |
"inBundle": true |
| 33 |
}, |
| 34 |
"node_modules/@isaacs/testing-rebuild-bundle-parent": { |
| 35 |
"version": "1.0.0", |
| 36 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-parent/-/testing-rebuild-bundle-parent-1.0.0.tgz", |
| 37 |
"integrity": "sha512-fa+mV2K+BDLzuxfI1LUWNmii92sylksrtaUITSO74ylcdWslvTFyr+REJfwdH5fDOxGqBH6kbVcDvWY8WqhgXg==", |
| 38 |
"dependencies": { |
| 39 |
"@isaacs/testing-rebuild-bundle-a": "" |
| 40 |
} |
| 41 |
} |
| 42 |
} |
| 43 |
}), |
| 44 |
"@isaacs": { |
| 45 |
"testing-rebuild-bundle-a": { |
| 46 |
"node_modules": { |
| 47 |
"@isaacs": { |
| 48 |
"testing-rebuild-bundle-b": { |
| 49 |
"package.json": JSON.stringify({ |
| 50 |
"name": "@isaacs/testing-rebuild-bundle-b", |
| 51 |
"version": "1.0.1", |
| 52 |
"scripts": { |
| 53 |
"install": "node -e \"require('fs').writeFileSync('cwd', process.cwd())\"" |
| 54 |
} |
| 55 |
}) |
| 56 |
} |
| 57 |
} |
| 58 |
}, |
| 59 |
"package.json": JSON.stringify({ |
| 60 |
"name": "@isaacs/testing-rebuild-bundle-a", |
| 61 |
"version": "1.0.1", |
| 62 |
"dependencies": { |
| 63 |
"@isaacs/testing-rebuild-bundle-b": "" |
| 64 |
}, |
| 65 |
"bundleDependencies": [ |
| 66 |
"@isaacs/testing-rebuild-bundle-b" |
| 67 |
] |
| 68 |
}) |
| 69 |
}, |
| 70 |
"testing-rebuild-bundle-parent": { |
| 71 |
"package.json": JSON.stringify({ |
| 72 |
"name": "@isaacs/testing-rebuild-bundle-parent", |
| 73 |
"version": "1.0.0", |
| 74 |
"dependencies": { |
| 75 |
"@isaacs/testing-rebuild-bundle-a": "" |
| 76 |
} |
| 77 |
}) |
| 78 |
} |
| 79 |
} |
| 80 |
}, |
| 81 |
"package-lock.json": JSON.stringify({ |
| 82 |
"name": "@isaacs/testing-rebuild-bundle-reified", |
| 83 |
"version": "1.0.0", |
| 84 |
"lockfileVersion": 2, |
| 85 |
"requires": true, |
| 86 |
"packages": { |
| 87 |
"": { |
| 88 |
"name": "@isaacs/testing-rebuild-bundle-reified", |
| 89 |
"version": "1.0.0", |
| 90 |
"dependencies": { |
| 91 |
"@isaacs/testing-rebuild-bundle-parent": "" |
| 92 |
} |
| 93 |
}, |
| 94 |
"node_modules/@isaacs/testing-rebuild-bundle-a": { |
| 95 |
"version": "1.0.1", |
| 96 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-a/-/testing-rebuild-bundle-a-1.0.1.tgz", |
| 97 |
"integrity": "sha512-ZJeJZTSSm38+dZaFbei3ruFvLPWRbWrF8/CAojhuqopKHxp3qdQ4n4UVfVnUdzl55ZJ+gOzItKelIu3sASglKQ==", |
| 98 |
"bundleDependencies": [ |
| 99 |
"@isaacs/testing-rebuild-bundle-b" |
| 100 |
], |
| 101 |
"dependencies": { |
| 102 |
"@isaacs/testing-rebuild-bundle-b": "" |
| 103 |
} |
| 104 |
}, |
| 105 |
"node_modules/@isaacs/testing-rebuild-bundle-a/node_modules/@isaacs/testing-rebuild-bundle-b": { |
| 106 |
"version": "1.0.1", |
| 107 |
"hasInstallScript": true, |
| 108 |
"inBundle": true |
| 109 |
}, |
| 110 |
"node_modules/@isaacs/testing-rebuild-bundle-parent": { |
| 111 |
"version": "1.0.0", |
| 112 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-parent/-/testing-rebuild-bundle-parent-1.0.0.tgz", |
| 113 |
"integrity": "sha512-fa+mV2K+BDLzuxfI1LUWNmii92sylksrtaUITSO74ylcdWslvTFyr+REJfwdH5fDOxGqBH6kbVcDvWY8WqhgXg==", |
| 114 |
"dependencies": { |
| 115 |
"@isaacs/testing-rebuild-bundle-a": "" |
| 116 |
} |
| 117 |
} |
| 118 |
}, |
| 119 |
"dependencies": { |
| 120 |
"@isaacs/testing-rebuild-bundle-a": { |
| 121 |
"version": "1.0.1", |
| 122 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-a/-/testing-rebuild-bundle-a-1.0.1.tgz", |
| 123 |
"integrity": "sha512-ZJeJZTSSm38+dZaFbei3ruFvLPWRbWrF8/CAojhuqopKHxp3qdQ4n4UVfVnUdzl55ZJ+gOzItKelIu3sASglKQ==", |
| 124 |
"requires": { |
| 125 |
"@isaacs/testing-rebuild-bundle-b": "" |
| 126 |
}, |
| 127 |
"dependencies": { |
| 128 |
"@isaacs/testing-rebuild-bundle-b": { |
| 129 |
"version": "1.0.1", |
| 130 |
"bundled": true |
| 131 |
} |
| 132 |
} |
| 133 |
}, |
| 134 |
"@isaacs/testing-rebuild-bundle-parent": { |
| 135 |
"version": "1.0.0", |
| 136 |
"resolved": "https://registry.npmjs.org/@isaacs/testing-rebuild-bundle-parent/-/testing-rebuild-bundle-parent-1.0.0.tgz", |
| 137 |
"integrity": "sha512-fa+mV2K+BDLzuxfI1LUWNmii92sylksrtaUITSO74ylcdWslvTFyr+REJfwdH5fDOxGqBH6kbVcDvWY8WqhgXg==", |
| 138 |
"requires": { |
| 139 |
"@isaacs/testing-rebuild-bundle-a": "" |
| 140 |
} |
| 141 |
} |
| 142 |
} |
| 143 |
}), |
| 144 |
"package.json": JSON.stringify({ |
| 145 |
"name": "@isaacs/testing-rebuild-bundle-reified", |
| 146 |
"version": "1.0.0", |
| 147 |
"dependencies": { |
| 148 |
"@isaacs/testing-rebuild-bundle-parent": "" |
| 149 |
}, |
| 150 |
"files": [] |
| 151 |
}) |
| 152 |
}) |
| 153 |
const {utimesSync} = require('fs') |
| 154 |
const n = Date.now() + 10000 |
| 155 |
const {resolve} = require('path') |
| 156 |
|
| 157 |
utimesSync(resolve(path, "node_modules/.package-lock.json"), new Date(n), new Date(n)) |
| 158 |
return path |
| 159 |
} |