aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/fixtures/bun-link-pkg-fixture/.gitignore2
-rwxr-xr-xtest/fixtures/bun-link-pkg-fixture/bun-link-pkg-fixture.js12
-rwxr-xr-xtest/fixtures/bun-link-pkg-fixture/bun.lockbbin0 -> 1196 bytes
-rw-r--r--test/fixtures/bun-link-pkg-fixture/package-lock.json30
-rw-r--r--test/fixtures/bun-link-pkg-fixture/package.json11
-rw-r--r--test/fixtures/bun-link-to-pkg-fixture/.gitignore169
-rw-r--r--test/fixtures/bun-link-to-pkg-fixture/README.md15
-rwxr-xr-xtest/fixtures/bun-link-to-pkg-fixture/bun.lockbbin0 -> 1655 bytes
-rw-r--r--test/fixtures/bun-link-to-pkg-fixture/index.js1
-rw-r--r--test/fixtures/bun-link-to-pkg-fixture/package.json12
-rw-r--r--test/fixtures/bun-link-to-pkg-fixture/tsconfig.json14
11 files changed, 266 insertions, 0 deletions
diff --git a/test/fixtures/bun-link-pkg-fixture/.gitignore b/test/fixtures/bun-link-pkg-fixture/.gitignore
new file mode 100644
index 000000000..6455d29a6
--- /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 000000000..ce5ae872b
--- /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 000000000..ed0f623d9
--- /dev/null
+++ b/test/fixtures/bun-link-pkg-fixture/bun.lockb
Binary files differ
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 000000000..6296eb120
--- /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 000000000..668847842
--- /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 000000000..f81d56eaa
--- /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 000000000..ac47fd797
--- /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 000000000..d148ae18a
--- /dev/null
+++ b/test/fixtures/bun-link-to-pkg-fixture/bun.lockb
Binary files differ
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 000000000..2a5e4b80c
--- /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 000000000..952d8bb30
--- /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 000000000..feee4b584
--- /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"]
+ }
+}