diff --git a/__fixtures__/ignored-package/.changeset/config.json b/__fixtures__/ignored-package/.changeset/config.json deleted file mode 100644 index f74ed2be..00000000 --- a/__fixtures__/ignored-package/.changeset/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json", - "ignore": ["changesets-dev-ignored-package-pkg-a"] -} diff --git a/__fixtures__/ignored-package/package.json b/__fixtures__/ignored-package/package.json deleted file mode 100644 index 3926c8f8..00000000 --- a/__fixtures__/ignored-package/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "ignored-package", - "version": "1.0.0", - "private": true, - "workspaces": [ - "packages/*" - ] -} diff --git a/__fixtures__/ignored-package/packages/pkg-a/package.json b/__fixtures__/ignored-package/packages/pkg-a/package.json deleted file mode 100644 index 8bbc0d62..00000000 --- a/__fixtures__/ignored-package/packages/pkg-a/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "changesets-dev-ignored-package-pkg-a", - "version": "1.0.0", - "dependencies": { - "changesets-dev-ignored-package-pkg-b": "1.0.0" - } -} diff --git a/__fixtures__/ignored-package/packages/pkg-b/package.json b/__fixtures__/ignored-package/packages/pkg-b/package.json deleted file mode 100644 index c949da03..00000000 --- a/__fixtures__/ignored-package/packages/pkg-b/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "changesets-dev-ignored-package-pkg-b", - "version": "1.0.0" -} diff --git a/__fixtures__/simple-project/.changeset/config.json b/__fixtures__/simple-project/.changeset/config.json deleted file mode 100644 index 77554b81..00000000 --- a/__fixtures__/simple-project/.changeset/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json" -} diff --git a/__fixtures__/simple-project/package.json b/__fixtures__/simple-project/package.json deleted file mode 100644 index 0527be9d..00000000 --- a/__fixtures__/simple-project/package.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "name": "simple-project", - "version": "1.0.0", - "private": true, - "workspaces": [ - "packages/*" - ] -} diff --git a/__fixtures__/simple-project/packages/pkg-a/package.json b/__fixtures__/simple-project/packages/pkg-a/package.json deleted file mode 100644 index 64565496..00000000 --- a/__fixtures__/simple-project/packages/pkg-a/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "changesets-dev-simple-project-pkg-a", - "version": "1.0.0", - "dependencies": { - "changesets-dev-simple-project-pkg-b": "1.0.0" - } -} diff --git a/__fixtures__/simple-project/packages/pkg-b/package.json b/__fixtures__/simple-project/packages/pkg-b/package.json deleted file mode 100644 index d7fe69a7..00000000 --- a/__fixtures__/simple-project/packages/pkg-b/package.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "name": "changesets-dev-simple-project-pkg-b", - "version": "1.0.0" -} diff --git a/package.json b/package.json index 29d2f618..b444f48a 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@types/semver": "^7.5.0", "builtin-modules": "^5.0.0", "esbuild": "^0.25.4", - "fixturez": "^1.1.0", + "fs-fixture": "^2.13.0", "oxfmt": "^0.48.0", "rollup": "^4.40.2", "typescript": "^5.8.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2ccd3da1..95dcadd5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,9 +91,9 @@ importers: esbuild: specifier: ^0.25.4 version: 0.25.12 - fixturez: - specifier: ^1.1.0 - version: 1.1.0 + fs-fixture: + specifier: ^2.13.0 + version: 2.13.0 oxfmt: specifier: ^0.48.0 version: 0.48.0 @@ -1126,18 +1126,10 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-union@1.0.2: - resolution: {integrity: sha512-Dxr6QJj/RdU/hCaBjOfxW+q6lyuVE6JFWIrAUpuOOhoJJoQ99cUn3igRaHVB5P9WrgFVN0FfArM3x0cueOU8ng==} - engines: {node: '>=0.10.0'} - array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} - array-uniq@1.0.3: - resolution: {integrity: sha512-MNha4BWQ6JbwhFhj03YK552f7cb3AzoE8SzeljgChvL1dl3IcvggXVz1DilzySZkCja+CXuZbdW7yATchWn8/Q==} - engines: {node: '>=0.10.0'} - assertion-error@2.0.1: resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} engines: {node: '>=12'} @@ -1152,9 +1144,6 @@ packages: bail@1.0.5: resolution: {integrity: sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ==} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -1168,9 +1157,6 @@ packages: bottleneck@2.19.5: resolution: {integrity: sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==} - brace-expansion@1.1.14: - resolution: {integrity: sha512-MWPGfDxnyzKU7rNOW9SP/c50vi3xrmrua/+6hfPbCS2ABNWfx24vPidzvC7krjU/RTo235sV776ymlsMtGKj8g==} - braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} @@ -1231,9 +1217,6 @@ packages: commondir@1.0.1: resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} @@ -1246,10 +1229,6 @@ packages: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - crypto-random-string@1.0.0: - resolution: {integrity: sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg==} - engines: {node: '>=4'} - dataloader@1.4.0: resolution: {integrity: sha512-68s5jYdlvasItOJnCuI2Q9s4q98g0pCyL3HrcKJu8KNugUl8ahgmZYg38ysLTgQjjXX3H8CJLkAvWrclWfcalw==} @@ -1272,10 +1251,6 @@ packages: diff3@0.0.3: resolution: {integrity: sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g==} - dir-glob@2.2.2: - resolution: {integrity: sha512-f9LBi5QWzIW3I6e//uxZoLBlUt9kcp66qo0sSCxL6YZKc75R1c4MFCoe/LaZiBGmgujvQdxc5Bn3QhfyvK5Hsw==} - engines: {node: '>=4'} - dir-glob@3.0.1: resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} engines: {node: '>=8'} @@ -1373,16 +1348,10 @@ packages: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} - fixturez@1.1.0: - resolution: {integrity: sha512-c4q9eZsAmCzj9gkrEO/YwIRlrHWt/TXQiX9jR9WeLFOqeeV6EyzdiiV28CpSzF6Ip+gyYrSv5UeOHqyzfcNTVA==} - for-each@0.3.5: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} - fs-extra@5.0.0: - resolution: {integrity: sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==} - fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -1391,8 +1360,9 @@ packages: resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} engines: {node: '>=6 <7 || >=8'} - fs.realpath@1.0.0: - resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + fs-fixture@2.13.0: + resolution: {integrity: sha512-bqL4EVFNgoA38OnztLfeHn4NZJ32zWnSNA3ALtessYO0WjpL//QuYl1YkYd7j+TY0cLO6cqgoHxPJpfSwKQAPA==} + engines: {node: '>=18.0.0'} fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} @@ -1414,18 +1384,10 @@ packages: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} - glob@7.2.3: - resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} - deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me - globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} - globby@7.1.1: - resolution: {integrity: sha512-yANWAN2DUcBtuus5Cpd+SKROzXHs2iVXFZt/Ykrfz6SAXqacLX25NZpltE+39ceMexYF4TtEadjuSTw8+3wX4g==} - engines: {node: '>=4'} - gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} @@ -1459,17 +1421,10 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@3.3.10: - resolution: {integrity: sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==} - ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} - inflight@1.0.6: - resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} - deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. - inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -1607,9 +1562,6 @@ packages: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - minimatch@3.1.5: - resolution: {integrity: sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==} - minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -1681,10 +1633,6 @@ packages: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} engines: {node: '>=8'} - path-is-absolute@1.0.1: - resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} - engines: {node: '>=0.10.0'} - path-key@3.1.1: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} @@ -1692,10 +1640,6 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-type@3.0.0: - resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==} - engines: {node: '>=4'} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -1714,10 +1658,6 @@ packages: resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} - pify@3.0.0: - resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==} - engines: {node: '>=4'} - pify@4.0.1: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} @@ -1826,9 +1766,6 @@ packages: siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} - signal-exit@3.0.7: - resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -1839,10 +1776,6 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - slash@1.0.0: - resolution: {integrity: sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg==} - engines: {node: '>=0.10.0'} - slash@3.0.0: resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} engines: {node: '>=8'} @@ -1895,14 +1828,6 @@ packages: resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} engines: {node: '>= 0.4'} - temp-dir@1.0.0: - resolution: {integrity: sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==} - engines: {node: '>=4'} - - tempy@0.2.1: - resolution: {integrity: sha512-LB83o9bfZGrntdqPuRdanIVCPReam9SOZKW0fOy5I9X3A854GGWi0tjCqoXEk84XIEYBc/x9Hq3EFop/H5wJaw==} - engines: {node: '>=4'} - term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -1978,10 +1903,6 @@ packages: unified@8.4.2: resolution: {integrity: sha512-JCrmN13jI4+h9UAyKEoGcDZV+i1E7BLFuG7OsaDvTXI5P0qhHX+vZO/kOhz9jn8HGENDKbwSeB0nVOg4gVStGA==} - unique-string@1.0.0: - resolution: {integrity: sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg==} - engines: {node: '>=4'} - unist-util-is@3.0.0: resolution: {integrity: sha512-sVZZX3+kspVNmLWBPAB6r+7D9ZgAFPNWm66f7YNb420RlQSbn+n8rG8dGZSkrER7ZIXGQYNm5pqC3v3HopH24A==} @@ -2923,14 +2844,8 @@ snapshots: argparse@2.0.1: {} - array-union@1.0.2: - dependencies: - array-uniq: 1.0.3 - array-union@2.1.0: {} - array-uniq@1.0.3: {} - assertion-error@2.0.1: {} async-lock@1.4.1: {} @@ -2941,8 +2856,6 @@ snapshots: bail@1.0.5: {} - balanced-match@1.0.2: {} - base64-js@1.5.1: {} before-after-hook@4.0.0: {} @@ -2953,11 +2866,6 @@ snapshots: bottleneck@2.19.5: {} - brace-expansion@1.1.14: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - braces@3.0.3: dependencies: fill-range: 7.1.1 @@ -3010,8 +2918,6 @@ snapshots: commondir@1.0.1: {} - concat-map@0.0.1: {} - convert-source-map@2.0.0: {} crc-32@1.2.2: {} @@ -3022,8 +2928,6 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - crypto-random-string@1.0.0: {} - dataloader@1.4.0: {} decompress-response@6.0.0: @@ -3042,10 +2946,6 @@ snapshots: diff3@0.0.3: {} - dir-glob@2.2.2: - dependencies: - path-type: 3.0.0 - dir-glob@3.0.1: dependencies: path-type: 4.0.0 @@ -3176,23 +3076,10 @@ snapshots: locate-path: 5.0.0 path-exists: 4.0.0 - fixturez@1.1.0: - dependencies: - fs-extra: 5.0.0 - globby: 7.1.1 - signal-exit: 3.0.7 - tempy: 0.2.1 - for-each@0.3.5: dependencies: is-callable: 1.2.7 - fs-extra@5.0.0: - dependencies: - graceful-fs: 4.2.11 - jsonfile: 4.0.0 - universalify: 0.1.2 - fs-extra@7.0.1: dependencies: graceful-fs: 4.2.11 @@ -3205,7 +3092,7 @@ snapshots: jsonfile: 4.0.0 universalify: 0.1.2 - fs.realpath@1.0.0: {} + fs-fixture@2.13.0: {} fsevents@2.3.3: optional: true @@ -3234,15 +3121,6 @@ snapshots: dependencies: is-glob: 4.0.3 - glob@7.2.3: - dependencies: - fs.realpath: 1.0.0 - inflight: 1.0.6 - inherits: 2.0.4 - minimatch: 3.1.5 - once: 1.4.0 - path-is-absolute: 1.0.1 - globby@11.1.0: dependencies: array-union: 2.1.0 @@ -3252,15 +3130,6 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - globby@7.1.1: - dependencies: - array-union: 1.0.2 - dir-glob: 2.2.2 - glob: 7.2.3 - ignore: 3.3.10 - pify: 3.0.0 - slash: 1.0.0 - gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -3287,15 +3156,8 @@ snapshots: ieee754@1.2.1: {} - ignore@3.3.10: {} - ignore@5.3.2: {} - inflight@1.0.6: - dependencies: - once: 1.4.0 - wrappy: 1.0.2 - inherits@2.0.4: {} is-alphabetical@1.0.4: {} @@ -3415,10 +3277,6 @@ snapshots: mimic-response@3.1.0: {} - minimatch@3.1.5: - dependencies: - brace-expansion: 1.1.14 - minimist@1.2.8: {} minimisted@2.0.1: @@ -3498,16 +3356,10 @@ snapshots: path-exists@4.0.0: {} - path-is-absolute@1.0.1: {} - path-key@3.1.1: {} path-parse@1.0.7: {} - path-type@3.0.0: - dependencies: - pify: 3.0.0 - path-type@4.0.0: {} pathe@2.0.3: {} @@ -3518,8 +3370,6 @@ snapshots: picomatch@4.0.4: {} - pify@3.0.0: {} - pify@4.0.1: {} possible-typed-array-names@1.1.0: {} @@ -3704,8 +3554,6 @@ snapshots: siginfo@2.0.0: {} - signal-exit@3.0.7: {} - signal-exit@4.1.0: {} simple-concat@1.0.1: {} @@ -3716,8 +3564,6 @@ snapshots: once: 1.4.0 simple-concat: 1.0.1 - slash@1.0.0: {} - slash@3.0.0: {} smob@1.6.1: {} @@ -3764,13 +3610,6 @@ snapshots: supports-preserve-symlinks-flag@1.0.0: {} - temp-dir@1.0.0: {} - - tempy@0.2.1: - dependencies: - temp-dir: 1.0.0 - unique-string: 1.0.0 - term-size@2.2.1: {} terser@5.46.2: @@ -3839,10 +3678,6 @@ snapshots: trough: 1.0.5 vfile: 4.2.1 - unique-string@1.0.0: - dependencies: - crypto-random-string: 1.0.0 - unist-util-is@3.0.0: {} unist-util-remove-position@1.1.4: diff --git a/src/run.test.ts b/src/run.test.ts index a3616f47..ff1b268c 100644 --- a/src/run.test.ts +++ b/src/run.test.ts @@ -1,8 +1,7 @@ -import fs from "node:fs/promises"; import path from "node:path"; import type { Changeset } from "@changesets/types"; import writeChangeset from "@changesets/write"; -import fixturez from "fixturez"; +import { createFixture } from "fs-fixture"; import { beforeEach, describe, expect, it, vi } from "vitest"; import { Git } from "./git.ts"; import { setupOctokit } from "./octokit.ts"; @@ -36,14 +35,58 @@ let mockedGithubMethods = { }; let mockedGraphql = vi.fn(); -let f = fixturez(import.meta.dirname); +const nodeModulesDir = path.join(import.meta.dirname, "..", "node_modules"); + +function createSimpleProjectFixture() { + return createFixture({ + node_modules: (api) => api.symlink(nodeModulesDir), + ".changeset/config.json": JSON.stringify({}), + "packages/pkg-a/package.json": JSON.stringify({ + name: "changesets-dev-simple-project-pkg-a", + version: "1.0.0", + dependencies: { + "changesets-dev-simple-project-pkg-b": "1.0.0", + }, + }), + "packages/pkg-b/package.json": JSON.stringify({ + name: "changesets-dev-simple-project-pkg-b", + version: "1.0.0", + }), + "package.json": JSON.stringify({ + name: "simple-project", + version: "1.0.0", + private: true, + workspaces: ["packages/*"], + }), + }); +} + +function createIgnoredPackageFixture() { + return createFixture({ + node_modules: (api) => api.symlink(nodeModulesDir), + ".changeset/config.json": JSON.stringify({ + ignore: ["changesets-dev-ignored-package-pkg-a"], + }), + "packages/pkg-a/package.json": JSON.stringify({ + name: "changesets-dev-ignored-package-pkg-a", + version: "1.0.0", + dependencies: { + "changesets-dev-ignored-package-pkg-b": "1.0.0", + }, + }), + "packages/pkg-b/package.json": JSON.stringify({ + name: "changesets-dev-ignored-package-pkg-b", + version: "1.0.0", + }), + "package.json": JSON.stringify({ + name: "ignored-package", + version: "1.0.0", + private: true, + workspaces: ["packages/*"], + }), + }); +} -const linkNodeModules = async (cwd: string) => { - await fs.symlink( - path.join(import.meta.dirname, "..", "node_modules"), - path.join(cwd, "node_modules"), - ); -}; const writeChangesets = (changesets: Changeset[], cwd: string) => { return Promise.all(changesets.map((commit) => writeChangeset(commit, cwd))); }; @@ -54,8 +97,8 @@ beforeEach(() => { describe("version", () => { it("creates simple PR", async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -93,8 +136,8 @@ describe("version", () => { }); it('creates a draft PR when prDraft is "create"', async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -129,8 +172,8 @@ describe("version", () => { }); it("only includes bumped packages in the PR body", async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -164,8 +207,8 @@ describe("version", () => { }); it("doesn't include ignored package that got a dependency update in the PR body", async () => { - let cwd = f.copy("ignored-package"); - await linkNodeModules(cwd); + await using fixture = await createIgnoredPackageFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -199,8 +242,8 @@ describe("version", () => { }); it("does not include changelog entries if full message exceeds size limit", async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -258,8 +301,8 @@ fluminis divesque vulnere aquis parce lapsis rabie si visa fulmineis. }); it("does not include any release information if a message with simplified release info exceeds size limit", async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [] })); @@ -317,8 +360,8 @@ fluminis divesque vulnere aquis parce lapsis rabie si visa fulmineis. }); it('updates an existing PR via GraphQL without converting it to draft when prDraft is "create"', async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [{ number: 123, node_id: "PR_kwDOA" }], @@ -351,8 +394,8 @@ fluminis divesque vulnere aquis parce lapsis rabie si visa fulmineis. }); it('updates an existing PR via GraphQL and converts it to draft when prDraft is "always"', async () => { - let cwd = f.copy("simple-project"); - await linkNodeModules(cwd); + await using fixture = await createSimpleProjectFixture(); + const cwd = fixture.path; mockedGithubMethods.pulls.list.mockImplementationOnce(() => ({ data: [{ number: 123, node_id: "PR_kwDOA" }], diff --git a/types/fixturez.d.ts b/types/fixturez.d.ts deleted file mode 100644 index 64b7a34d..00000000 --- a/types/fixturez.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -type Opts = { - glob?: string | Array; - root?: string; - cleanup?: boolean; -}; - -declare module "fixturez" { - export default function ( - cwd: string, - opts?: Opts, - ): { - find: (a: string) => string; - temp: () => string; - copy: (a: string) => string; - cleanup: () => any; - }; -}