dave caruso
969da088f5
fix(install): re-evaluate overrides when removed
2023-10-12 02:03:02 -07:00
dave caruso
2fbb95142a
feat(install): support npm overrides/yarn resolutions, one level deep only ( #6435 )
...
* disable zig fmt on generated ResolvedSourceTag.zig
* overrides
* it works
* ok
* a
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-10-12 00:44:15 -07:00
Dylan Conway
755e16d962
fix #6416 ( #6430 )
...
* make sure latest is checked after prerelease
* test and fix
* test for when latest matches prerelease
2023-10-11 20:41:12 -07:00
dave caruso
1bf28e0d77
feat(install): automatically migrate package-lock.json to bun.lockb ( #6352 )
...
* work so far
* stuff
* a
* basics work
* stuff
* yoo
* build lockfile
* correct
* f
* a
* install fixture havent tested
* i made it worse
* lol
* be more reasonable
* make the test easier to pass because bun install doesn't handle obscure lockfile edge cases :/
* a
* works now
* ok
* a
* a
* cool
* nah
* fix stuff
* l
* a
* idfk
* LAME
* prettier errors
* does this fix tests?
* Add more safety checks to Integrity
* Add another check
* More careful lifetime handling
* Fix linux debugger issue
* a
* tmp dir and snapshot test
---------
Co-authored-by: Jarred SUmner <jarred@jarredsumner.com >
2023-10-11 02:27:07 -07:00
Arden Sinclair
39446ebdb8
Fix lifecycle scripts not running on reinstallation ( #6376 )
...
* Include trusted dependencies in lockfile
* Add a remote dependency to lifecycle script test
2023-10-10 21:13:42 -07:00
Dylan Conway
05781dd91e
make peer dependencies install by default ( #6396 )
...
* peer dependencies
* default true
* add test
* cleanup
* some tests
* skip peer deps if they are non optional
* remove debug print, fix build
* iterate peer dependencies
2023-10-10 20:05:58 -07:00
Dylan Conway
96aa9c0a38
fix a couple install tests
2023-10-06 22:06:28 -07:00
Dylan Conway
46736d5ecb
format
2023-10-06 22:02:55 -07:00
Justin "J.R." Hill
5c37d5293c
test(bun install): cover http(s) non-github case ( #6190 )
2023-10-05 16:12:07 -07:00
Jake Boone
7ef4cd26ac
Use singular nouns when appropriate on install messages ( #2543 )
...
* Use singular nouns when appropriate on install messages
* Fix one more pluralization
* Fix bun-add tests for "1 package installed"
* Fix bun install/remove/update tests for "1 package installed"
2023-10-05 15:59:02 -07:00
Dylan Conway
4a2e1574e4
fix semver and repository host bugs ( #6312 )
...
* releases before prereleases
* handle different repo hosts
* remove log
* Update bun-install.test.ts
* test for `bun add`
* gitlab test
* use comptime hash map, another test case
* don't need length
* bump timeout, use tld
* infer git dependencies for https and ssh
2023-10-04 22:46:21 -07:00
Dylan Conway
98e9e9b112
Upgrade webkit ( #6277 )
...
* `reportExtraMemoryAllocated` parameters changed
* bump webkit
* Update Dockerfile
* format
2023-10-03 19:56:33 -07:00
Ashcon Partovi
9308e1bf09
Support bun run --if-present ( #6248 )
...
* Support --if-present
Closes #5670
* More robust tests, handle more cases
2023-10-03 17:39:45 -07:00
axel escalada
0ca9a7889a
Fix bunx command for github package #5974 ( #6042 )
...
* fix bunx command for github package
* refactor fmt package to use it when the path is seted
* use labeled block to assign const instead of use 'undefined'
2023-10-03 11:49:24 -07:00
Dylan Conway
745b6b94ee
Store workspace package versions ( #6258 )
...
* Store workspace package versions in the lockfile
* more logging
* wip
* keep information from workspace name array and cache
* hash key
* remove cache, compare workspaces with initially loaded
* uncomment sort
* remove comments
* remove allocation
* package json
* test `bun add <package>` without workspace prefix
* Update test/cli/install/bun-install.test.ts
Co-authored-by: Markus Staab <maggus.staab@googlemail.com >
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Markus Staab <maggus.staab@googlemail.com >
2023-10-03 02:17:21 -07:00
Ashcon Partovi
15880308b7
Fix bun install reading Github API from wrong environment variable ( #6247 )
...
* Fix `bun install` reading Github API from wrong environment variable
* Update src/install/install.zig
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-10-02 18:00:17 -07:00
axel escalada
e1117c6ae5
Add local tarball install #5812 ( #6118 )
...
* check if the value passed for add command is a local tarball and install it, test for local tarball
* use bunExe()
* use absolute path to copy tarball
* fmt ts
2023-09-28 19:07:51 -07:00
Justin "J.R." Hill
1d6d639352
fix(bun install): Handle vercel and github tarball path dependencies ( #6122 )
...
* fix(bun install): Handle vercel and github tarball path dependencies
* test(bun install): test tarball path with when
* Simplify github tarball detection
---------
Co-authored-by: bun <noreply@oven.sh >
2023-09-27 19:22:50 -07:00
Dylan Conway
4d2b442a33
Update bun-install.test.ts
2023-09-26 22:19:33 -07:00
Dylan Conway
0268807be2
fix workspace dependency install ( #6092 )
...
* handle `*`
* test
* always use the package name
* more tests
* install dependency in each
2023-09-26 21:53:14 -07:00
axel escalada
bbc70d2b73
Fix create command with template prefixed with @ char #6007 ( #6013 )
...
* fix create command with template prefixed with @ char
* add typescript test for create command
* format test
2023-09-25 05:22:47 -07:00
Jarred Sumner
3f463786a5
Correctly fix #5888 ( #6000 )
...
* Update our MultiArrayList
* More consistent CI
* Fix serialization issue
* Update bun.lockb
* Update bun.lockb
* fixup
* Fix `Bin{}`
* `bun update` should not cache the manifest
* Make bun install tests more consistent
* This differs by platform evidently
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-24 17:43:59 -07:00
Ai Hoshino
a5908e9f27
fix(lockfile): ensure all bytes of union are initialized before serialization. ( #5957 )
2023-09-23 20:09:45 -07:00
Ai Hoshino
1445775d64
fix(runtime): exclude unevaluated module in require.cache ( #5903 )
...
Close : #5898
2023-09-22 18:40:06 -07:00
dave caruso
25e69c71e7
Implement module.parent ( #5889 )
...
* Make module.parent work
* yay
* oops
* yay
2023-09-21 22:09:55 -07:00
Colin McDonnell
b218c40a5d
Hide env elapsed time when loglevel=info ( #5882 )
...
* Hide env elapsed time when loglevel=info
* Updates
* Update
* Fix test
2023-09-21 20:07:25 -07:00
dave caruso
b7951511a3
fix(run): interpret extensionless files as typescript ( #5711 )
...
* test
* gadsgsagdsa
* add better err msg
* r
* oops
* ok
2023-09-20 19:48:46 -07:00
Jonah Snider
67defd95af
[bun install] Add -E as alias of --exact ( #5104 )
...
* [bun install] Add `-E` as alias of `--exact`
* Add test for -E flag
2023-09-20 11:14:55 -07:00
Jarred Sumner
5d09a06100
Fix path used in bunx ( #5785 )
...
* Fix path used in bunx
* Add test
* Use a different package
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-20 01:00:29 -07:00
WingLim
ddb1189b2d
fix(cli): bun pm cache rm command not work ( #4571 )
...
* fix(cli): rm arg is in positionals[1]
* chore(cli): add cache remove test
* chore: remvoe unnecessary join
* chore: run formatter
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-09-19 16:54:54 -07:00
Jarred Sumner
8677ae9fb1
Get artifactory to work ( #5744 )
...
* Get artifactory to work
* Cleanup url normalization a ltitle more
* Clean up tests
* prettier
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-19 08:01:47 -07:00
Jarred Sumner
cc54b62fac
Encode slashes in package names in the registry manifest request ( #5716 )
...
* Encode slashes in package names in the registry manifest request
Co-Authored-By: Max Brosnahan <1177034+gingermusketeer@users.noreply.github.com >
* Update dummy.registry.ts
* Fix tests
* Add guide for Azure Artifacts
* Update azure-artifacts.md
* Update azure-artifacts.md
* Typo
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Max Brosnahan <1177034+gingermusketeer@users.noreply.github.com >
2023-09-18 23:27:02 -07:00
Julian
1b949d4f5a
bun run fix missing script error on empty file (#5025 )
...
* Fix empty file not found bug
* Add tests
* fix test
---------
Co-authored-by: Jeremy Funk <jeremy@kombo.dev >
Co-authored-by: dave caruso <me@paperdave.net >
2023-09-18 20:14:32 -07:00
Liz
0647216687
fix: provide empty string to 0 length process environment variables ( #5679 )
...
* fix: provide empty string to len 0 process env vars
For process loaded env vars, its a bug to give them the literal value '""'
if the provided length is 0.
* fix: add test and remove unneeded branch
Removes the redundant branch for empty env vars and adds a test for the
process specific case.
* fix: remove empty_string_value
Removes the constant in favor of using the empty values or passing the
literal "".
* style: format env.test.ts
2023-09-18 18:14:29 -07:00
Ai Hoshino
bab9889601
fix(config): support for registry url without trailing slash ( #5662 )
...
* fix(config): support for registry URLs without trailing slash
Close : #4589 , #5368
* Update src/bunfig.zig
* Update src/bunfig.zig
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-09-18 04:32:02 -07:00
Jarred Sumner
56c471a005
Make bun run --silent omit "error: "..." exited with code 1 ( #5459 )
...
* Make --silent behave as expected
* Make the "tsconfig.json extends" error a debug level
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-15 04:21:43 -07:00
dave caruso
4f8edb825f
fix(runtime): require cache should not include unevaluated ESM modules. ( #5233 )
2023-09-13 16:57:59 -07:00
Jarred Sumner
6e4f746ace
Fix some bugs blocking Turborepo from using bun run ( #5071 )
...
* Clean up some error handling when loading `tsconfig.json`
* [bun run] don't parse tsconfig.json for package.json scripts
* Make this error message better
* Bump
* Don't print build errors twice
* Handle quotes in error messages a little better
* Add a couple tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-09-12 03:35:29 -07:00
Dylan Conway
ca461f9e83
fix loading env from .env.production and friends ( #4630 )
...
* reload conditional vars
* test
* change `get` and `put` methods
* dont clone empty env variables
2023-09-11 17:19:21 -07:00
dave caruso
0fd0ad993b
fix(runtime): fix dns_resolver crash ( #4435 )
...
* fix incorrect c pointer
* format
* lets go
* random other test case fixed
* hanassagi patch
* Update dns_resolver.zig
* Revert "Update dns_resolver.zig"
This reverts commit 53eb338048 .
* See if the tests pass
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-09-01 15:27:59 -07:00
Julian
59edbe645c
bun install correctly join dependency URLs (#4421 )
...
* use WTF to join registry strings
* show dependency error messages, better join error
We actually report errors when enqueuing dependencies now. I also made
the join URLs error message read better. It'd be cleaner to handle it
all in one place, but there's currently no way to propagate the data up.
* starting on registry URL tests
* added more registry URL tests
* [install] prevent optional/peer deps from failing builds
Couldn't get the peer dependency test to work, but the code is there.
* ran prettier
* changed error note to use realname, updated tests
* ran prettier again...
2023-08-31 17:36:03 -07:00
Ai Hoshino
9334fbe9b4
fix(install): resolve semver matching with pre-release tags. ( #4412 )
...
Close : #4398
2023-08-30 18:49:09 -07:00
Alex Lam S.L
037463fc48
[install] fix stale root life-cycle script in lockfile ( #4411 )
...
fixes #4319
2023-08-30 17:35:28 -07:00
Ai Hoshino
910daeff27
Fix the crash when importing a module that does not exist. ( #4348 )
...
Close : #4240
2023-08-26 01:14:40 -07:00
Alex Lam S.L
213f5bef9d
[install] fix stale life-cycle scripts from lockfile ( #4307 )
...
fixes #4269
2023-08-24 17:18:51 -07:00
Alex Lam S.L
e115638cba
[install] fix crash when installing package that uses loose semver pre-release ( #4302 )
...
- also fix parsing of `1.2.3pre+build`
fixes #4266
2023-08-24 17:17:48 -07:00
Jarred Sumner
0486cea35a
bun --inspect (#4158 )
...
* Let the debugger to pause/resume the event loop
* Add initial support for Debug Adapter Protocol
* Add progress
* Update Worker.cpp
* Fix require("console") #3820 (#4073 )
* Fix #3820
* Add Module (#4074 )
* Set exports to {} in user-constructed CommonJSModuleRecords (#4076 )
* feat(bun/test): Implement "toSatisfy" & "toIncludeRepeated" (fwup) (#3651 )
* Fix merge issues
* oop
* make codegen
* Fix build issues
---------
Co-authored-by: dave caruso <me@paperdave.net >
* worker tests (#4058 )
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* feat(bun:test) add support for test.each() and describe.each() (#4047 )
* rename callback to func
* update testscope to handle function arguments
* works
* big cleanup
* works in debug, not release
* fix memory issue & update tests
* catch & str test
* write types for each() & switch tests to ts
* rm & typo
* move some code around & support describe
* review changes
* Fix one of the astro segfaults, also fix bun init version (#4079 )
* 4->16
* add assertions
* fix version stuff
* Remove unintentional logs from #4043
* Run prettier
* Update main-worker-file.js
* Update SIMDUTF (#4078 )
* Fix constructing buffer from a UTF16 string with the Latin1 encoding. (#4086 )
Close : #3914
* Add support for `bun --revision` (#4027 )
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
* Updates
* Update __global.zig
* remove non-node node-fallbacks (#4082 )
* remove non-node node-fallbacks.
* organize the imports
* Fix test
* Sync bun-polyfills branch (#4081 )
* bun-polyfills: initial impl. & baseline refactor
* move @types/ws dep from root to /test/
* bun-types: remove ReadableStream.forEach method
(this does not exist, probably added by mistake)
* bun-polyfills: remove extraneous stream utils
* bun-polyfills: add types syncing file
* bun-polyfills: re-arrange global polyfills
* bun-polyfills: fix FileBlob streams types again
* bun-polyfills: sync all of @types/node
* bun-polyfills: typeguard all current polyfills
* bun-polyfills: fix import paths
* bun-polyfills: switch to wasm impl. of farmhash
* bun-polyfills: support default import of bun obj
* bun-polyfills: transpiler placeholder file
* bun-polyfills: loaderless import.meta polyfill
* bun-polyfills: refactor import.meta polyfill
* bun-polyfills: repl entrypoint & todo list index
* bun-types: Add null to return type of Bun.which
* bun-types: match Bun.sha with Bun.hash.SHA512_256
* bun-polyfills: new "repl" package.json script
* bun-polyfills: full refactor of toplevel hashes
* bun-polyfills: these are fixed
* bun-types: NODE_ENV is optional
* bun-polyfills: fix Bun.env types
* bun-types+polyfills: fix HeapSnapshot.version type
* bun-polyfills: fix some web streams type conflicts
* bun-polyfills: update internal FileBlob.slice
* bun-polyfills: fix subproc stdin conversions
* bun-polyfills: better internal fileblob types
* bun-polyfills: try to sync global performance type
* bun-polyfills: working zig wasm polyfills setup
* bun-polyfills: update scripts
* bun-polyfills: fix wasm file location resolution
* bun-polyfills: goodbye farmhash (replaced by zig)
* bun-polyfills: move all Bun.hash polyfills to zig
* bun-polyfills: reimpl. seeding of seeded hashes
* bun-polyfills: impl. undocumented murmur32v2
* bun-polyfills: switch zighash from jsdoc to .d.ts
* bun-types: partial fix of Hash types
* bun-polyfills: documented Hash.murmur32v2
* bun-polyfills: misc updates
* bun-polyfills: enable sourcemaps
* bun-polyfills: handle empty inputs to hash funcs
* bun-types: narrow down hash func types
* bun-polyfills: remove unnecessary bigint casts
* bun-polyfills: impl. Bun.isMainThread
* bun-polyfills: impl. Bun.sleep and fix sleepSync
* bun-polyfills: impl. indexOfLine
* bun-polyfills: impl. Bun.peek.status
* bun-types: fix hashing test
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* Add remix guide
* Fix title
* add util.formatWithOptions (#4090 )
* Add formatWithOptions
* tests and tweaks
* adjust
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* bun test: format description of test.each (#4092 )
* bun test: format description
* add tests for tests
* only
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
* Fixes #4062 (#4106 )
* Fixes #4062
* Update encoding.zig
* Use faster C++ impl
* Update wtf-bindings.cpp
* undo
* Fixup
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* zig fmt
* Update remix guide
* fs.zig: create temp files with 0o700, not 0o007 (#4107 )
* Handle thundering herd of setInterval (#4109 )
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* Fix memory leak in base64url (#4111 )
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
* run files without extensions (#4113 )
* run script without extension
* process stdio write fix
* don't check for trailing slash, var stream
* More lazily initialize these static strings
* Remove assertion
* wip
* Add --inspect flag
* Deprecate loading `node_modules.bun`
* realpath
* regenerate schema
* More
* more
* Update cli.zig
* Debugger JS loads
* have fun
* Most of the code
* Its starting to work.
* more progress
* win some, lose some
* Update dap.ts
* Async Context Tracking
* untested websocket
* Emit Console messages
* Error handling
* errors
* Make profiling work better
* [clap] CLI arguments with optional values ignore positional params
In `bun --inspect foo.js`, `foo.js` should not be the value of `--inspect`. It is a positional parameter. `--inspect=foo`
* Support multiple simultaneous clients, automatically unpause on disconnect
* regenerate
* Update Makefile
* Update WebKit
* Update cli.zig
* Update InternalModuleRegistry+createInternalModuleById.h
* BaseURL
* Update WebKit
* Add web-inspector-bun
* Update build.ts
* formatting, mostly
* Update debugger.ts
* Update InternalModuleRegistryConstants.h
* wrap
* Update test
* Update test
---------
Co-authored-by: Ashcon Partovi <ashcon@partovi.net >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Tiramify (A.K. Daniel) <94789999+TiranexDev@users.noreply.github.com >
Co-authored-by: Jacques <25390037+jecquas@users.noreply.github.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Ai Hoshino <ambiguous404@gmail.com >
Co-authored-by: Yash Sharma <yashosharma@gmail.com >
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com >
Co-authored-by: jhmaster <32803471+jhmaster2000@users.noreply.github.com >
Co-authored-by: Adhityaa Chandrasekar <github@adtac.in >
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2023-08-16 19:40:20 -07:00
Ai Hoshino
b94433ce86
Fix using uninitialized variable when formatting config_path. ( #4129 )
...
Close : #4128
2023-08-11 22:14:08 -07:00
Jacques
e65535cc05
bun test: format description of test.each ( #4092 )
...
* bun test: format description
* add tests for tests
* only
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-10 13:29:53 -07:00
Jarred Sumner
6718950a39
Fix test
2023-08-10 12:08:05 -07:00