Files
bun.sh/src/runtime.js
Dylan Conway 54e7a6f57a typescript decorators round 2 (#1445)
* __decorateClass, __decorateParam, lit test, wiptest test

* decorator factories test

* parameter decorator test

* test for decorators with constructor parameter properties

* Fix issue with `CryptoKey` and `SubtleCrypto` constructors

* Limit concurrency for GitHub Actions due to issues with cache poisoning
If multiple actions are running, sometimes the cache is poisoned from another action. We need to fix this, but this is an interim measure to make actions less flaky

* Make these tests better

* Move this to dependencies so the .a files upload

* Fixup

* temporary fix

* Limit concurrency for MacOS Object actions

* try againn

* againn

* Make `"tls"` an explicit object we pass instead of implicit top-level options

cc @Electroid @colinhacks

* Update server.zig

* Prefer `BUN_PORT` over `PORT`

* Fix typo in homebrew action

* Run homebrew action when release is edited

* Check published_at instead of draft in GitHub action

* Implement `process.release`

* Add missing dependencies to `make devcontainer`

* Allow overriding node polyfills via `BUN_OVERRIDE_MODULE_PATH`

* Add a stub for io_darwin on linux

cc @sno2 hopefully this helps but i'm not sure

* Add missing `break`

* Download more RAM

* feat(core): optimize zig slice (#1408)

* feat(core): optimize zig slice

* address concerns

* Remove webcrypto from vendor-without-check

* Update default tsconfig (#1418)

Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>

* Enable `BUN_OVERRIDE_MODULE_PATH` in `bun wiptest`

* Upgrade WebKit

* space

* Support getting cached values and pending activity in the bindings generator

* Remove ✂️ function

* constructor creation, initializers, handle static and computed fields with decorators

* Updating libuwebsockets C API (#1423)

* fix for repeated regex match calls and fix for '^' in character classes (#1419)

* tests and formatting

* fix for ^ in character class

* formatting

* test for repeated match and exec calls

* create oniguruma regex for each exec/test

* check errorCode from creating oniguruma regexp and always return {} on failure

* oops

* call onig_initialize once

* fix incorrect escaping, removed unnecessary oniguruma settings

* tests for "-" and "^" in character classes

* free regex object before returns

* force gc for some tests

* Update React fizz server (#1432)

* Update fizz server

* Use production build

Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>

* more decorator tests

* optional setup function for loading elements, simulate clicks in lit test

* fix createWriteStream (#1433)

* fix createWriteStream

* remove comment

* Update build docs and commands for dev containers (#1438)

* Update build documentation for dev containers

* Add devcontainer-rebuild make target

* Add make devcontainer-sh target

* Fix missing .PHONY for vendor-without-check (#1437)

* Fix check for ninja on Debian/Ubuntu (#1436)

Even though the package is named ninja-build, the ninja binary is still
named ninja, so use `which ninja` to check for it

* Fix #1410

woops

* await on DOMContentLoaded for elements instead of setup function

* avoid lowering class if no decorators

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Ashcon Partovi <ashcon@partovi.net>
Co-authored-by: Carter Snook <cartersnook04@gmail.com>
Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com>
Co-authored-by: João Paquim <jpaquim@users.noreply.github.com>
2022-11-01 21:25:30 -07:00

249 lines
6.8 KiB
JavaScript

var $$mod$ = Symbol.for;
var __create = Object.create;
var __descs = Object.getOwnPropertyDescriptors;
var __defProp = Object.defineProperty;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
// We're disabling Object.freeze because it breaks CJS => ESM and can cause
// issues with Suspense and other things that expect the CJS module namespace
// to be mutable when the ESM module namespace is NOT mutable
// var __objectFreezePolyfill = new WeakSet();
// globalThis.Object.freeze = function freeze(obj) {
// __objectFreezePolyfill.add(obj);
// return obj;
// };
// globalThis.Object.isFrozen = function isFrozen(obj) {
// return __objectFreezePolyfill.has(obj);
// };
export var __markAsModule = (target) =>
__defProp(target, "__esModule", { value: true, configurable: true });
// lazy require to prevent loading one icon from a design system
export var $$lzy = (target, module, props) => {
for (let key in props) {
if (!__hasOwnProp.call(target, key))
__defProp(target, key, {
get: () => module()[props[key]],
enumerable: true,
configurable: true,
});
}
return target;
};
export var __toModule = (module) => {
return __reExport(
__markAsModule(
__defProp(
module != null ? __create(__getProtoOf(module)) : {},
"default",
module && module.__esModule && "default" in module
? { get: () => module.default, enumerable: true, configurable: true }
: { value: module, enumerable: true, configurable: true }
)
),
module
);
};
var tagSymbol = Symbol.for("CommonJSTransformed");
var cjsRequireSymbol = Symbol.for("CommonJS");
export var __commonJS = (cb, name) => {
var mod;
var origExports;
var has_run = false;
const requireFunction = function load() {
if (has_run) {
return mod.exports;
}
has_run = true;
cb(((mod = { exports: {} }), mod), mod.exports);
var mod_exports = (origExports = mod.exports);
const kind = typeof mod_exports;
if ((kind === "object" || kind === "function") && !mod_exports[tagSymbol]) {
const extensible = Object.isExtensible(mod_exports);
if (!extensible) {
// slow path: it's a function we need to wrap
// example: webpack
if (kind === "function") {
mod_exports = function () {
return origExports.apply(this, arguments);
};
Object.setPrototypeOf(mod_exports, __getProtoOf(origExports));
Object.defineProperties(
mod_exports,
Object.getOwnPropertyDescriptors(origExports)
);
} else {
mod_exports = __create(
__getProtoOf(mod_exports),
Object.getOwnPropertyDescriptors(mod_exports)
);
}
}
Object.defineProperty(mod_exports, tagSymbol, {
value: true,
enumerable: false,
configurable: false,
});
if (!("default" in mod_exports)) {
Object.defineProperty(mod_exports, "default", {
get() {
return origExports;
},
set(v) {
if (v === mod.exports) return;
origExports = v;
return true;
},
// enumerable: false is important here
enumerable: false,
configurable: true,
});
}
if (!extensible) {
// can only be frozen if it's not extensible
if (Object.isFrozen(origExports)) {
Object.freeze(mod_exports);
} else {
Object.preventExtensions(mod_exports);
}
}
}
return mod_exports;
};
requireFunction[cjsRequireSymbol] = 1;
return requireFunction;
};
export var __cJS2eSM = __commonJS;
export var __internalIsCommonJSNamespace = (namespace) =>
namespace != null &&
typeof namespace === "object" &&
((namespace.default && namespace.default[cjsRequireSymbol]) ||
namespace[cjsRequireSymbol]);
// require()
export var __require = (namespace) => {
if (__internalIsCommonJSNamespace(namespace)) {
return namespace.default();
}
return namespace;
};
// require().default
// this currently does nothing
// get rid of this wrapper once we're more confident we do not need special handling for default
__require.d = (namespace) => {
return namespace;
};
export var $$m = __commonJS;
export var __name = (target, name) => {
Object.defineProperty(target, "name", {
value: name,
enumerable: false,
configurable: true,
});
return target;
};
// ESM export -> CJS export
// except, writable incase something re-exports
export var __export = (target, all) => {
for (var name in all)
__defProp(target, name, {
get: all[name],
enumerable: true,
configurable: true,
set: (newValue) => (all[name] = () => newValue),
});
};
export var __exportValue = (target, all) => {
for (var name in all) {
__defProp(target, name, {
get: () => all[name],
set: (newValue) => (all[name] = newValue),
enumerable: true,
configurable: true,
});
}
};
export var __exportDefault = (target, value) => {
__defProp(target, "default", {
get: () => value,
set: (newValue) => (value = newValue),
enumerable: true,
configurable: true,
});
};
export var __reExport = (target, module, desc) => {
if ((module && typeof module === "object") || typeof module === "function")
for (let key of __getOwnPropNames(module))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, {
get: () => module[key],
configurable: true,
enumerable:
!(desc = __getOwnPropDesc(module, key)) || desc.enumerable,
});
return target;
};
function hasAnyProps(obj) {
for (let key in obj) return true;
return false;
}
function mergeDefaultProps(props, defaultProps) {
var result = __create(defaultProps, __descs(props));
for (let key in defaultProps) {
if (result[key] !== undefined) continue;
result[key] = defaultProps[key];
}
return result;
}
export var __merge = (props, defaultProps) => {
return !hasAnyProps(defaultProps)
? props
: !hasAnyProps(props)
? defaultProps
: mergeDefaultProps(props, defaultProps);
};
export var __decorateClass = (decorators, target, key, kind) => {
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
for (var i = decorators.length - 1, decorator; i >= 0; i--)
if (decorator = decorators[i])
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
if (kind && result)
__defProp(target, key, result);
return result;
};
export var __decorateParam = (index, decorator) => (target, key) => decorator(target, key, index);