Jarred Sumner
a369fc8c89
Implement import.meta.main ( #2556 )
...
* Implement `import.meta.main`
* Update main-test-1.js
* Update fs.test.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-04-04 16:49:33 -07:00
dave caruso
21f9fc828f
fix require.resolve with an empty options object #2370 ( #2371 )
...
* fix #2370 and import-meta test
* edit test to not allow transpiler optimization
2023-03-12 03:43:32 -07:00
Jarred Sumner
5528c0fa47
Backport std::forward change
2023-02-11 17:31:16 -08:00
Jarred Sumner
bd5b90fbf1
Fix lifetime issue in require.resolve
2023-01-17 23:41:17 -08:00
Jarred Sumner
e0eeb1c07e
workaround lifetime issue
2023-01-17 20:10:19 -08:00
Jarred Sumner
ced3226ffb
Update ImportMetaObject.cpp
2023-01-11 20:21:41 -08:00
Jarred Sumner
4a1470d26c
require.resolve in the runtime should use CommonJS export conditions
2023-01-11 14:22:31 -08:00
Jarred Sumner
e18863df1b
attempt (unsuccessfully) to improve c++ build time
2023-01-10 10:23:11 -08:00
Jarred Sumner
3c20290e49
[js parser] Fix bug where const {resolve} = require throws "require is not defined"
2022-12-15 21:48:38 -08:00
Jarred Sumner
6142715c06
Introduce import.meta.primordials for builtin JS
...
the `import.meta` object in Bun now has a `primordials` object which makes a handful of globals safe for access. Inside of bun: or node: modules, it is a special object (ownKeys is not implemented, so Object.keys() wont work on it)
- Array
- String
- `isPromise`
- `isCallable`
- `isConstructable`
- `tryGetById(foo, "bar')` which is like foo?.bar
- `arrayPush` which is like `Array.prototype.push`
- `Bun`
- `isAbortSignal`
cc @ThatOneBro @lawrencecchen
2022-11-03 00:18:26 -07:00
Jarred Sumner
1112eb75e3
[node:module] Implement _resolveFileName, stub _nodeModulePaths & _cache
...
Closes https://github.com/oven-sh/bun/issues/1111
2022-09-04 00:54:21 -07:00
Jarred Sumner
04cc1968db
Fix createRequire() in node:module
...
Fixes https://github.com/oven-sh/bun/issues/831
Fixes https://github.com/oven-sh/bun/issues/453
2022-09-03 21:48:06 -07:00
Jarred Sumner
4df0385c23
Update WebKit
2022-08-12 18:28:32 -07:00
Jarred Sumner
b36b7fee16
[node compat] Implement require.resolve
2022-08-09 01:41:13 -07:00
Jarred Sumner
e105cfcca8
Zig::ImportMeta
2022-07-01 03:22:23 -07:00