From 05bca1e4e4c55fbfc4f620649bc9894c993e0fa2 Mon Sep 17 00:00:00 2001 From: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Date: Sun, 7 Aug 2022 23:28:10 -0700 Subject: [PATCH] bun link fixture --- test/fixtures/bun-link-pkg-fixture/.gitignore | 2 + .../bun-link-pkg-fixture.js | 12 ++ test/fixtures/bun-link-pkg-fixture/bun.lockb | Bin 0 -> 1196 bytes .../bun-link-pkg-fixture/package-lock.json | 30 ++++ .../bun-link-pkg-fixture/package.json | 11 ++ .../bun-link-to-pkg-fixture/.gitignore | 169 ++++++++++++++++++ .../bun-link-to-pkg-fixture/README.md | 15 ++ .../bun-link-to-pkg-fixture/bun.lockb | Bin 0 -> 1655 bytes .../fixtures/bun-link-to-pkg-fixture/index.js | 1 + .../bun-link-to-pkg-fixture/package.json | 12 ++ .../bun-link-to-pkg-fixture/tsconfig.json | 14 ++ 11 files changed, 266 insertions(+) create mode 100644 test/fixtures/bun-link-pkg-fixture/.gitignore create mode 100755 test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js create mode 100755 test/fixtures/bun-link-pkg-fixture/bun.lockb create mode 100644 test/fixtures/bun-link-pkg-fixture/package-lock.json create mode 100644 test/fixtures/bun-link-pkg-fixture/package.json create mode 100644 test/fixtures/bun-link-to-pkg-fixture/.gitignore create mode 100644 test/fixtures/bun-link-to-pkg-fixture/README.md create mode 100755 test/fixtures/bun-link-to-pkg-fixture/bun.lockb create mode 100644 test/fixtures/bun-link-to-pkg-fixture/index.js create mode 100644 test/fixtures/bun-link-to-pkg-fixture/package.json create mode 100644 test/fixtures/bun-link-to-pkg-fixture/tsconfig.json diff --git a/test/fixtures/bun-link-pkg-fixture/.gitignore b/test/fixtures/bun-link-pkg-fixture/.gitignore new file mode 100644 index 0000000000..6455d29a68 --- /dev/null +++ b/test/fixtures/bun-link-pkg-fixture/.gitignore @@ -0,0 +1,2 @@ +node_modules +*.bunlockb diff --git a/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js b/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js new file mode 100755 index 0000000000..ce5ae872bf --- /dev/null +++ b/test/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js @@ -0,0 +1,12 @@ +#!/usr/bin/env node + +// package.json name is bun-link-pkg-fixture-1 to ensure we don't rely on dir name +const _ = require("lodash"); + +if (_.isBoolean(true)) { + console.log("Success"); + process.exit(0); +} + +console.error("Fail"); +process.exit(1); diff --git a/test/fixtures/bun-link-pkg-fixture/bun.lockb b/test/fixtures/bun-link-pkg-fixture/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..ed0f623d9806abf083c4d9c7bfe5f8e6cd09805d GIT binary patch literal 1196 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p+m+A-hQ zt%|PMGe2Q6p1h{uw#I~TIgxK79h_6$_)HdT7GVJ@0s@d)5a57N4D3+40ZL226oC0+ z3=9o9`6-FT84L_|PxQ8iUfA>cz@swTxt4xc7>_{ot|+@I08;#*^g$LQkbd)+j}=4{ z0!&bIfp##M0qp@fP!Nbk328)<2ib#c7b^cB|373&Bz=@H85tnvA{))JKa*MTUG>!G z!n?wnl^zG%>s~zF!7VXw=9Rbag(I~a%Y4@zvC|1TCL0sld-VL~xYMoMLM5L&sQnjD zkIwI(nD2$;pa)EP>>#rXki<4TPzH;26h6pGfX2`qD9vS4T$HSrnO9trn3JOiOCEY5 zMX9NF3PuJB#hF#9`Dr=|CJKo;ndy1?Xqi05ypRnwz+6 zKyEU`>LhSx&CJWzEyzySP0Oq(DJ@FXHOwd}DJZtm*Dp#<&nzw}s?^IX$jvI&%P&gT Xhj>6=7s}9uI$y6Oy$TWyVXiwg; literal 0 HcmV?d00001 diff --git a/test/fixtures/bun-link-pkg-fixture/package-lock.json b/test/fixtures/bun-link-pkg-fixture/package-lock.json new file mode 100644 index 0000000000..6296eb120a --- /dev/null +++ b/test/fixtures/bun-link-pkg-fixture/package-lock.json @@ -0,0 +1,30 @@ +{ + "name": "bun-link-pkg-fixture-1", + "version": "0.0.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "bun-link-pkg-fixture-1", + "version": "0.0.0", + "dependencies": { + "lodash": "4.17.21" + }, + "bin": { + "bun-link-pkg-fixture": "bun-link-pkg-fixture.js" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + } + }, + "dependencies": { + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + } + } +} diff --git a/test/fixtures/bun-link-pkg-fixture/package.json b/test/fixtures/bun-link-pkg-fixture/package.json new file mode 100644 index 0000000000..6688478424 --- /dev/null +++ b/test/fixtures/bun-link-pkg-fixture/package.json @@ -0,0 +1,11 @@ +{ + "name": "bun-link-pkg-fixture-1", + "version": "0.0.0", + "dependencies": { + "lodash": "4.17.21" + }, + "main": "bun-link-pkg-fixture.js", + "bin": { + "bun-link-pkg-fixture": "bun-link-pkg-fixture.js" + } +} diff --git a/test/fixtures/bun-link-to-pkg-fixture/.gitignore b/test/fixtures/bun-link-to-pkg-fixture/.gitignore new file mode 100644 index 0000000000..f81d56eaa3 --- /dev/null +++ b/test/fixtures/bun-link-to-pkg-fixture/.gitignore @@ -0,0 +1,169 @@ +# Based on https://raw.githubusercontent.com/github/gitignore/main/Node.gitignore + +# Logs + +logs +_.log +npm-debug.log_ +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) + +report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json + +# Runtime data + +pids +_.pid +_.seed +\*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover + +lib-cov + +# Coverage directory used by tools like istanbul + +coverage +\*.lcov + +# nyc test coverage + +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) + +.grunt + +# Bower dependency directory (https://bower.io/) + +bower_components + +# node-waf configuration + +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) + +build/Release + +# Dependency directories + +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) + +web_modules/ + +# TypeScript cache + +\*.tsbuildinfo + +# Optional npm cache directory + +.npm + +# Optional eslint cache + +.eslintcache + +# Optional stylelint cache + +.stylelintcache + +# Microbundle cache + +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history + +.node_repl_history + +# Output of 'npm pack' + +\*.tgz + +# Yarn Integrity file + +.yarn-integrity + +# dotenv environment variable files + +.env +.env.development.local +.env.test.local +.env.production.local +.env.local + +# parcel-bundler cache (https://parceljs.org/) + +.cache +.parcel-cache + +# Next.js build output + +.next +out + +# Nuxt.js build / generate output + +.nuxt +dist + +# Gatsby files + +.cache/ + +# Comment in the public line in if your project uses Gatsby and not Next.js + +# https://nextjs.org/blog/next-9-1#public-directory-support + +# public + +# vuepress build output + +.vuepress/dist + +# vuepress v2.x temp and cache directory + +.temp +.cache + +# Docusaurus cache and generated files + +.docusaurus + +# Serverless directories + +.serverless/ + +# FuseBox cache + +.fusebox/ + +# DynamoDB Local files + +.dynamodb/ + +# TernJS port file + +.tern-port + +# Stores VSCode versions used for testing VSCode extensions + +.vscode-test + +# yarn v2 + +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.\* diff --git a/test/fixtures/bun-link-to-pkg-fixture/README.md b/test/fixtures/bun-link-to-pkg-fixture/README.md new file mode 100644 index 0000000000..ac47fd7972 --- /dev/null +++ b/test/fixtures/bun-link-to-pkg-fixture/README.md @@ -0,0 +1,15 @@ +# bun-link-to-pkg-fixture + +To install dependencies: + +```bash +bun install +``` + +To run: + +```bash +bun run index.ts +``` + +This project was created using `bun init` in bun v0.1.7. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. diff --git a/test/fixtures/bun-link-to-pkg-fixture/bun.lockb b/test/fixtures/bun-link-to-pkg-fixture/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..d148ae18aeff6d416ca729e81c69577ff9f048c9 GIT binary patch literal 1655 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p-Zn$FV3 z`?mKM=N>$eUX--|T#lQij*`ag;lzsv-3=YH@ z7#jS6JTV{*WHWFA>CeTMS1+#kvefR0-qz3ydtO(+Nk7{m^je7#t_#Ar!64MY2Q&>P zuHbMlAH;sKCXx|E7eM(iZ4L}lVD&KjU@l8wlLw0{KxqaB2;Tup!+gX9)t?G9&lUx~Ufg&7{Hcr9{3WknFRL%g*?xIvcw2KH``Yz$kC)t^ zTh64I`70KSw~)<;`C)_Yy?mHbm^?^K0~*LDpfs0FaZ$2fW?pegVor`8EUD{-6s4xx zDHs_j6lYeY=BMc>m?$LXWTxlkr*T0{{SO5o9>{zcA4Ee`P$mXSLoj#4%wq#GVE%)N zfzm9x*bi7jVu7gQvMDt-vIBYnhi5?gL3SBH)!PuM52OdA7laF-diKHfMjM&MmRbM< z(F|^{A!;DP@;59$b1=pk=o#u6FfdpHO%ws~aGV9)aTZXMu0v^H_yPT4h|3!c z;6gGpFI%@HU$-DTT{kVWqNKDa6(n3zS&&+s1C+CZD?(DCYlux0o0zU)MoCFQv6a4l qQEGZ-aY<37US2_NR literal 0 HcmV?d00001 diff --git a/test/fixtures/bun-link-to-pkg-fixture/index.js b/test/fixtures/bun-link-to-pkg-fixture/index.js new file mode 100644 index 0000000000..2a5e4b80cc --- /dev/null +++ b/test/fixtures/bun-link-to-pkg-fixture/index.js @@ -0,0 +1 @@ +console.log("Hello via Bun!"); diff --git a/test/fixtures/bun-link-to-pkg-fixture/package.json b/test/fixtures/bun-link-to-pkg-fixture/package.json new file mode 100644 index 0000000000..952d8bb306 --- /dev/null +++ b/test/fixtures/bun-link-to-pkg-fixture/package.json @@ -0,0 +1,12 @@ +{ + "name": "bun-link-to-pkg-fixture", + "module": "index.js", + "type": "module", + "devDependencies": { + "bun-types": "^0.1.0" + }, + "dependencies": { + "bun-link-pkg-fixture": "link:bun-link-pkg-fixture-1", + "bun-link-pkg-fixture-1": "link:bun-link-pkg-fixture-1" + } +} \ No newline at end of file diff --git a/test/fixtures/bun-link-to-pkg-fixture/tsconfig.json b/test/fixtures/bun-link-to-pkg-fixture/tsconfig.json new file mode 100644 index 0000000000..feee4b5845 --- /dev/null +++ b/test/fixtures/bun-link-to-pkg-fixture/tsconfig.json @@ -0,0 +1,14 @@ +{ + "compilerOptions": { + "lib": ["ESNext"], + "module": "esnext", + "target": "esnext", + "moduleResolution": "node", + + // so that if your project isn't using TypeScript, it still has autocomplete + "allowJs": true, + + // "bun-types" is the important part + "types": ["bun-types"] + } +}