bun link fixture

This commit is contained in:
Jarred Sumner
2022-08-07 23:28:10 -07:00
parent 73a18c99e6
commit 05bca1e4e4
11 changed files with 266 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
node_modules
*.bunlockb

View File

@@ -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);

BIN
test/fixtures/bun-link-pkg-fixture/bun.lockb vendored Executable file

Binary file not shown.

30
test/fixtures/bun-link-pkg-fixture/package-lock.json generated vendored Normal file
View File

@@ -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=="
}
}
}

View File

@@ -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"
}
}

View File

@@ -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.\*

View File

@@ -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.

Binary file not shown.

View File

@@ -0,0 +1 @@
console.log("Hello via Bun!");

View File

@@ -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"
}
}

View File

@@ -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"]
}
}