Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ses): Shim compatible with Hermes compiler #2334

Open
wants to merge 117 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 110 commits
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
f5848ef
feat(ses): strip async generators for Hermes
leotm May 28, 2024
ef479f2
refactor(ses): remove comment
leotm Jun 2, 2024
eb55777
refactor(ses): convert async arrow functions for Hermes
leotm Jun 2, 2024
888caa9
refactor(ses): WIP
leotm Jun 11, 2024
13c72e5
fix output paths
legobeat Jun 11, 2024
7bff3fc
refactor ses/scripts/bundle.js
legobeat Jun 11, 2024
9578cc8
chore: template in ses version in comment
legobeat Jun 11, 2024
4857978
chore: relocate BUILD_TYPES
legobeat Jun 11, 2024
644db02
refactor: WIP
leotm Jun 11, 2024
1bd528f
refactor(ses): WIP
leotm Jun 25, 2024
a87fbb8
fix(ses): WIP
leotm Jun 28, 2024
6b6ee3b
refactor(ses): permit try/catch condition for Hermes
leotm Jul 2, 2024
0e8de23
refactor(ses): tame fn constructors try/catch condition for Hermes
leotm Jul 2, 2024
94ac76b
fix(ses): lint
leotm Jul 2, 2024
f18e876
refactor(ses): revert bundling new Hermes shim
leotm Jul 2, 2024
17ff216
refactor(ses): revert publishing new Hermes shim
leotm Jul 2, 2024
d32b262
refactor(ses): remove remaining stale Hermes files
leotm Jul 2, 2024
50780cb
refactor(ses): remove stale comment
leotm Jul 2, 2024
a5ff96b
refactor(ses): improve try/catch comments (catch)
leotm Jul 3, 2024
2066510
refactor(ses): revert tests
leotm Jul 3, 2024
b674db0
refactor(ses): remove comment
leotm Jul 3, 2024
1c52786
refactor(ses): get-anonymous-intrinsics try/catch
leotm Jul 19, 2024
f66bf78
fix(ses): lint
leotm Jul 19, 2024
a017db0
refactor(ses): restore permits.js
leotm Jul 19, 2024
e40555c
feat(ses): console.info when skipping async generators
leotm Jul 22, 2024
8c9031a
feat(ses): improve console.info when skipping async generators
leotm Jul 22, 2024
0ecf0b8
refactor(ses): remove eslint-disable
leotm Jul 22, 2024
4b1b5e6
feat(ses): add AsyncGeneratorFunctionInstance to commons
leotm Jul 22, 2024
2c76a2b
refactor(ses): use AsyncGeneratorFunctionInstance from commons
leotm Jul 23, 2024
a5aedbe
refactor(ses): remove dupe comments
leotm Jul 23, 2024
6c1b445
refactor(ses): asyncTrampoline as standard async fn for Hermes
leotm Jul 23, 2024
375c01b
test(ses): add hermes smoke test
leotm Jul 24, 2024
bb2c2c8
test(ses): add hermes compiler test script
leotm Jul 24, 2024
61123b1
test(ses): add hermes runtime test script
leotm Jul 24, 2024
d373214
test(ses): add hermes-test CI job
leotm Jul 24, 2024
6909484
fix(ses): format
leotm Jul 24, 2024
56a31b0
fix(ses): fix CI tar extraction
leotm Jul 24, 2024
d8f35bb
fix(ses): lint
leotm Jul 24, 2024
61700f8
fix(ses): use wget
leotm Jul 24, 2024
e556090
fix(ses): update CI ';' to '&&'
leotm Jul 24, 2024
284fbdf
refactor(ses): use Node 20 only in CI matrix
leotm Jul 25, 2024
dc79e11
refactor(ses): remove dupe CI node ver step
leotm Jul 25, 2024
62975be
fix(ses): Hermes CI tar file extract step
leotm Jul 25, 2024
4936b6a
fix(ses): Hermes scripts not found
leotm Jul 25, 2024
26921fa
fix(ses): Hermes scripts CLI location
leotm Jul 25, 2024
528236f
fix(ses): Hermes smoke test
leotm Jul 25, 2024
b02ced1
test(ses): add hermes-engine-cli (v0.12.0) as dev dep
leotm Jul 31, 2024
48fd5cc
test(ses): create shellscript to run hermesc on any OS
leotm Jul 31, 2024
8878833
test(ses): fix Hermes smoke test resolveHook
leotm Jul 31, 2024
8bd257a
test(ses): update Hermes smoke test
leotm Jul 31, 2024
a6b4ff3
test(ses): add shellscript to setup Hermes .bin symlinks on any OS
leotm Aug 2, 2024
78ea7c9
test(ses): add hermesc.sh comment
leotm Aug 2, 2024
e4f32a1
test(ses): cat ses and test, use in hermesc.sh
leotm Aug 2, 2024
887077c
test(ses): format test
leotm Aug 2, 2024
519ba25
test(ses): update test async arrow fn to non-arrow
leotm Aug 2, 2024
b5f8b95
test(ses): update package.json hermesc script to run .sh
leotm Aug 2, 2024
6764a40
test(ses): update comment
leotm Aug 13, 2024
3b6bbf1
test(ses): disable Hermes VM test
leotm Aug 13, 2024
56af377
test(ses): pin hermes-engine-cli
leotm Aug 13, 2024
1b968d2
test(ses): add script to run sh to create Hermes bin symlinks
leotm Aug 13, 2024
85acfec
test(ses): move smoke test calls below
leotm Aug 14, 2024
0b1ca82
chore(ses): remove wget/extract hermes-cli-linux from CI
leotm Aug 14, 2024
984bbcf
test(ses): merge Hermes compiler and VM sh
leotm Aug 14, 2024
b3bdf26
chore(ses): improve Hermes test logs
leotm Aug 14, 2024
7c2bc13
test(ses): cleanup after running Hermes tests
leotm Aug 14, 2024
ed958ab
Revert "refactor(ses): asyncTrampoline as standard async fn for Hermes"
leotm Aug 14, 2024
76d1c37
Revert "refactor(ses): convert async arrow functions for Hermes"
leotm Aug 14, 2024
c1b9051
feat(ses): add makeBundle Hermes async ArrowFunctionExpression transform
leotm Aug 14, 2024
27f766d
fix(ses): Hermes transform typedoc TS errors
leotm Aug 14, 2024
d7744b1
refactor(ses): update Hermes transform
leotm Aug 15, 2024
1fe6a56
refactor(ses): obj assign async arrow fn
leotm Aug 15, 2024
e4af84a
refactor(ses): update AsyncGeneratorFunctionInstance export
leotm Aug 19, 2024
1ed84e1
refactor(ses): update Hermes transform
leotm Aug 19, 2024
a6c0300
feat(ses): update Hermes transform to error on 'this' expression
leotm Aug 20, 2024
bea3ad4
Revert "refactor(ses): update AsyncGeneratorFunctionInstance export"
leotm Aug 21, 2024
35f8116
refactor(ses): update Hermes transform
leotm Aug 21, 2024
f2d6691
feat(ses): bundle only Hermes cjs on env var
leotm Aug 27, 2024
eb87783
feat(ses): add Hermes cjs bundle as export (exp)
leotm Aug 27, 2024
23945e4
fix(ses): update CI to build Hermes shim before compiler test
leotm Aug 27, 2024
69c08ee
refactor(ses): fix Hermes transform typedoc TS errors
leotm Aug 27, 2024
3df7ab2
test(ses): update CI
leotm Aug 27, 2024
e90d3bc
refactor(ses): update SES bundling for Hermes
leotm Aug 27, 2024
f82307a
fix(ses): update SES package.json scripts
leotm Aug 27, 2024
849248f
fix(ses): Hermes bundling Object.assign
leotm Aug 27, 2024
7b4ef2b
fix(ses): shellscript
leotm Aug 27, 2024
7349278
fix(ses): Hermes bundling moduleTransforms
leotm Aug 27, 2024
ebb88c1
refactor(ses): update bundle.js
leotm Aug 27, 2024
d8942d2
refactor(ses): fix bundle.js typedoc TS error
leotm Aug 27, 2024
126b437
Merge branch 'master' into ses-hermes
leotm Aug 28, 2024
977925e
refactor(ses): update bundle.js
leotm Aug 28, 2024
5dc71f9
refactor(ses): use @endo/env-options vs process.env
leotm Aug 30, 2024
7317d10
refactor(ses): update CI.yml
leotm Aug 30, 2024
bec0121
refactor(ses): remove unused script from conflict res
leotm Sep 2, 2024
bec2c4d
feat(ses): update export name
leotm Sep 2, 2024
c8e6b55
chore(ses): run Hermes CI on Node 18, 20 and 22
leotm Sep 9, 2024
7e4f681
chore(ses): bump Hermes CI actions/setup-node from v3 to v4
leotm Sep 9, 2024
143bf93
Merge branch 'master' into ses-hermes
leotm Sep 9, 2024
58bf929
fix(ses): bundle moduleTransforms TS2322
leotm Sep 9, 2024
e6d5d7f
refactor(ses): reorder hermesc args
leotm Sep 9, 2024
e4a4f8c
fix(ses): hermes VM hbc path prefix/folder
leotm Sep 9, 2024
63645cf
fix(ses): update `console` to `print` for Hermes VM
leotm Sep 9, 2024
cdd2dad
chore(ses): bump Hermes CI actions/checkout from v3 to v4
leotm Sep 9, 2024
5374cfc
refactor(ses): stricten commons async gen fn instance error cond
leotm Sep 11, 2024
df5a0e8
chore(ses): remove Hermes CI Node matrix and use 22.x
leotm Sep 11, 2024
75bc6f1
chore(ses): correct Hermes script output
leotm Sep 17, 2024
8d2a152
refactor(ses): add terse type to bundle script
leotm Sep 17, 2024
eb7f63a
chore(ses): remove redundant node version output CI step
leotm Sep 17, 2024
56e4660
refactor(ses): use text encoder/decoder default values (utf-8)
leotm Sep 17, 2024
431bff3
refactor(ses): update Hermes transform from async to sync
leotm Sep 18, 2024
af3a420
refactor(ses): remove hermes bin symlinks script
leotm Sep 18, 2024
7bef992
chore(ses): unpin hermes-engine-cli in package.json
leotm Sep 19, 2024
0bff9a0
refactor(ses): note @babel/traverse todo for `node -r esm` compat
leotm Sep 19, 2024
a8e6593
refactor(ses): commons async gen fn instance to avoid name dance
leotm Sep 23, 2024
6e1cb49
refactor(ses): commons async gen fn instance consistent return
leotm Sep 23, 2024
f543b16
fix(ses): commons async gen fn instance catch condition on Hermes VM
leotm Sep 23, 2024
2dc851c
refactor(ses): document Error.prototype.jsEngine in commons
leotm Sep 23, 2024
9112d45
refactor(ses): commons async gen fn instance update comment
leotm Sep 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,41 @@ jobs:
- name: Run yarn test262
run: exit 0 # TODO remove test262 from required tests for CI

test-hermes:
name: test-hermes

# begin macro
leotm marked this conversation as resolved.
Show resolved Hide resolved

runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v4

# without this, setup-node errors on mismatched yarn versions
- run: corepack enable

- name: Use Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: yarn

- name: Install dependencies
run: yarn install --immutable

# end macro

- name: Run yarn build
run: yarn build

- name: Run SES/Hermes smoke test
run: cd packages/ses && yarn test:hermes

viable-release:
name: viable-release

Expand Down
14 changes: 12 additions & 2 deletions packages/ses/package.json
leotm marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -55,24 +55,33 @@
"default": "./dist/ses.cjs"
}
},
"./hermes": {
"require": {
"types": "./dist/types.d.cts",
"default": "./dist/ses-hermes.cjs"
}
},
"./tools.js": "./tools.js",
"./assert-shim.js": "./assert-shim.js",
"./lockdown-shim.js": "./lockdown-shim.js",
"./compartment-shim.js": "./compartment-shim.js",
"./package.json": "./package.json"
},
"scripts": {
"build": "node scripts/bundle.js",
"build:vanilla": "node scripts/bundle.js",
"build:hermes": "SES_BUILD_TYPE=hermes node scripts/bundle.js",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will fail in powershell (if it matters)

consider util.parseArgs() instead of env vars

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

finally setup dev'ing on windows again woo (winget github.cli, git.git, open.nodejs, set exec policy RemoteSigned, corepack enable 💥)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any idea why it's working for me?

image

"build": "yarn build:vanilla && yarn build:hermes",
"clean": "rm -rf dist",
"cover": "c8 ava",
"demo": "python3 -m http.server",
"lint": "yarn lint:types && yarn lint:eslint",
"lint-fix": "eslint --fix .",
"lint:eslint": "eslint .",
"lint:types": "tsc",
"prepare": "npm run clean && npm run build",
"prepare": "yarn clean && yarn build",
"qt": "ava",
"test": "tsd && ava",
"test:hermes": "./scripts/hermes.sh",
"postpack": "git clean -f '*.d.ts*' '*.tsbuildinfo'"
},
"dependencies": {
Expand All @@ -91,6 +100,7 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"hermes-engine-cli": "0.12.0",
leotm marked this conversation as resolved.
Show resolved Hide resolved
leotm marked this conversation as resolved.
Show resolved Hide resolved
"prettier": "^3.2.5",
"sinon": "^15.1.0",
"terser": "^5.16.6",
Expand Down
65 changes: 47 additions & 18 deletions packages/ses/scripts/bundle.js
leotm marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
/** @import {ModuleTransforms} from '../../compartment-mapper/types.js' */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: conflict with #2310; this would want to be SyncModuleTransforms instead.

also, if you're reaching in to compartment-mapper from ses (which it appears creates a cyclic dependency), it seems like compartment-mapper (or somewhere else) might want to be where this script lives.


/* global process */
import '../index.js';
import '../test/lockdown-safe.js';
import fs from 'fs';
import { makeBundle } from '@endo/compartment-mapper/bundle.js';
import { minify } from 'terser';
import { fileURLToPath, pathToFileURL } from 'url';
import { getEnvironmentOption as getenv } from '@endo/env-options';
import { hermesTransforms } from './hermesTransforms.js';

const resolve = (rel, abs) => fileURLToPath(new URL(rel, abs).toString());
const root = new URL('..', import.meta.url).toString();
Expand All @@ -15,40 +19,60 @@ const write = async (target, content) => {
await fs.promises.writeFile(location, content);
};

const main = async () => {
/**
* @param {object} [options]
* @param {string} [options.buildType] Suffix used to build special bundles (e.g. 'hermes')
*/
const writeBundle = async ({ buildType } = {}) => {
const text = await fs.promises.readFile(
fileURLToPath(`${root}/package.json`),
'utf8',
);
const packageJson = JSON.parse(text);
const version = packageJson.version;

/** @type ModuleTransforms */
const moduleTransforms = {};

let bundleFilePaths = [
'dist/ses.cjs',
'dist/ses.mjs',
'dist/ses.umd.js',
'dist/lockdown.cjs',
'dist/lockdown.mjs',
'dist/lockdown.umd.js',
];
let terseFilePaths = ['dist/ses.umd.min.js', 'dist/lockdown.umd.min.js'];

if (buildType === 'hermes') {
bundleFilePaths = ['dist/ses-hermes.cjs'];
terseFilePaths = [];
Object.assign(moduleTransforms, hermesTransforms);
}

leotm marked this conversation as resolved.
Show resolved Hide resolved
const bundle = await makeBundle(
read,
pathToFileURL(resolve('../index.js', import.meta.url)).toString(),
{ moduleTransforms },
);
const versionedBundle = `// ses@${version}\n${bundle}`;

const { code: terse } = await minify(versionedBundle, {
mangle: false,
keep_classnames: true,
});
assert.string(terse);

console.log(`-- Building '${buildType}' version of SES --`);
console.log(`Bundle size: ${versionedBundle.length} bytes`);
console.log(`Minified bundle size: ${terse.length} bytes`);

await fs.promises.mkdir('dist', { recursive: true });
/** @type {string|undefined} */
let terse;
leotm marked this conversation as resolved.
Show resolved Hide resolved
if (terseFilePaths.length) {
const { code } = await minify(versionedBundle, {
mangle: false,
keep_classnames: true,
});
terse = code;
assert.string(terse);
console.log(`Minified bundle size: ${terse.length} bytes`);
}

const bundleFilePaths = [
'dist/ses.cjs',
'dist/ses.mjs',
'dist/ses.umd.js',
'dist/lockdown.cjs',
'dist/lockdown.mjs',
'dist/lockdown.umd.js',
];
const terseFilePaths = ['dist/ses.umd.min.js', 'dist/lockdown.umd.min.js'];
await fs.promises.mkdir('dist', { recursive: true });

await Promise.all([
...bundleFilePaths.map(dest => write(dest, versionedBundle)),
leotm marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -81,6 +105,11 @@ const main = async () => {
console.log(`Copied ${sourceDTS} to ${destDTS}`);
};

const main = async () => {
const buildType = getenv('SES_BUILD_TYPE', 'vanilla');
await writeBundle({ buildType });
};

main().catch(err => {
console.error('Error running main:', err);
process.exitCode = 1;
Expand Down
47 changes: 47 additions & 0 deletions packages/ses/scripts/hermes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

OS="$(uname -s)"

case "$OS" in
Linux*)
OS_DIR="linux64-bin"
;;
Darwin*)
OS_DIR="osx-bin"
;;
CYGWIN*|MINGW*|MSYS*)
OS_DIR="win64-bin"
;;
*)
echo "Unsupported OS: $OS"
exit 1
;;
esac

# Paths relative to 'packages/ses'
HERMESC="../../node_modules/hermes-engine-cli/$OS_DIR/hermesc"
HERMES="../../node_modules/hermes-engine-cli/$OS_DIR/hermes"

echo "Concatenating: dist/ses-hermes.cjs + test/hermes-smoke.js"
cat dist/ses-hermes.cjs test/hermes-smoke.js > test/hermes-smoke-dist.js
echo "Generated: test/hermes-smoke-dist.js"

# Errors on async arrow functions and async generators
# Both are unsupported on Hermes
echo "Executing: test/hermes-smoke-dist.js on Hermes compiler"
$HERMESC test/hermes-smoke-dist.js -emit-binary -out test/hermes-smoke-dist.hbc
echo "Generated: test/hermes-smoke-dist.hbc"
echo "Hermes compiler done"

# TODO: Disabled until https://github.com/endojs/endo/issues/1891 complete
# echo "Executing generated bytecode file on Hermes VM"
# $HERMES -b test/hermes-smoke-dist.hbc
# echo "Hermes VM done"
echo "Skipping: Hermes VM"

echo "Hermes tests complete"

echo "Removing: test/hermes-smoke-dist.js"
rm test/hermes-smoke-dist.js
echo "Removing: test/hermes-smoke-dist.hbc"
rm test/hermes-smoke-dist.hbc
74 changes: 74 additions & 0 deletions packages/ses/scripts/hermesTransforms.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/* eslint-disable import/no-extraneous-dependencies */
import { parse } from '@babel/parser';
import babelGenerate from '@agoric/babel-generator';
import babelTraverse from '@babel/traverse';
import * as t from '@babel/types';

// @ts-expect-error TS2339 Property 'default' does not exist
const traverse = babelTraverse.default || babelTraverse;
const generate = babelGenerate.default || babelGenerate;
leotm marked this conversation as resolved.
Show resolved Hide resolved

const decoder = new TextDecoder();
const encoder = new TextEncoder();
leotm marked this conversation as resolved.
Show resolved Hide resolved

const asyncArrowEliminator = {
ArrowFunctionExpression(path) {
if (path.node.async) {
leotm marked this conversation as resolved.
Show resolved Hide resolved
let body = path.node.body;

path.traverse({
ThisExpression(innerPath) {
const { start } = innerPath.node.loc;
// throw path.buildCodeFrameError("..."); // https://github.com/babel/babel/issues/8617
throw Error(
`Hermes makeBundle Babel transform doesn't support 'this' keyword in async arrow functions.
at this (${path.state.filename}:${start.line}:${start.column})`,
);
},
// No need for an Identifier traversal on nodes matching 'arguments' to error on
// Since only non-arrow functions can access the `arguments` array-like object
});

// In case it's a ()=>expression style arrow function
if (!t.isBlockStatement(body)) {
body = t.blockStatement([t.returnStatement(body)]);
}

const functionExpression = t.functionExpression(
null,
path.node.params,
body,
path.node.generator,
path.node.async,
);

path.replaceWith(functionExpression);
}
},
};

export const hermesTransforms = {
mjs: (sourceBytes, specifier, location, _packageLocation, { sourceMap }) => {
leotm marked this conversation as resolved.
Show resolved Hide resolved
const transforms = {
...asyncArrowEliminator,
// Some transforms might be added based on the specifier later
};

const sourceString = decoder.decode(sourceBytes);

const ast = parse(sourceString, {
sourceType: 'module',
});

traverse(ast, transforms, null, { filename: location });

const { code } = generate(ast, {
// Nothing being done with sourcemaps as this point
retainLines: true,
compact: true,
verbatim: true,
});

return { bytes: encoder.encode(code), parser: 'mjs', sourceMap };
},
};
29 changes: 29 additions & 0 deletions packages/ses/src/commons.js
Original file line number Diff line number Diff line change
Expand Up @@ -378,3 +378,32 @@ export const FERAL_STACK_GETTER = feralStackGetter;
* @type {((newValue: any) => void) | undefined}
*/
export const FERAL_STACK_SETTER = feralStackSetter;

// Test for async generator function syntax support.
let AsyncGeneratorNewFunctionInstance;
try {
// Wrapping one in an new Function lets the `hermesc` binary file
// parse the Metro js bundle without SyntaxError, to generate the
// optimised Hermes bytecode bundle, when `gradlew` is called to
// assemble the release build APK for React Native prod Android apps.
// Delaying the error until runtime lets us customise lockdown behaviour.
AsyncGeneratorNewFunctionInstance = new FERAL_FUNCTION(
'return (async function* AsyncGeneratorFunctionInstance() {})',
)();
} catch (e) {
// @ts-expect-error ts(2339) Property 'jsEngine' does not exist on type 'Error'. However it exists on Hermes.
if (Error.prototype.jsEngine === 'hermes' && e.name === 'SyntaxError') {
leotm marked this conversation as resolved.
Show resolved Hide resolved
// Swallows Hermes error `async generators are unsupported` at runtime.
// @ts-expect-error ts(2554) Expected 0 arguments, but got 1. It refers to the Web API Window object, but on Hermes we expect 1 argument.
// eslint-disable-next-line no-undef
print('SES: Skipping async generators, unsupported on Hermes');
// Note: `console` is not a JS built-in, so Hermes engine throws:
// Uncaught ReferenceError: Property 'console' doesn't exist
// See: https://github.com/facebook/hermes/issues/675
// However React Native provides a `console` implementation:
// https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/Core/InitializeCore.js
} else {
throw e;
}
}
export const AsyncGeneratorFunctionInstance = AsyncGeneratorNewFunctionInstance;
leotm marked this conversation as resolved.
Show resolved Hide resolved
leotm marked this conversation as resolved.
Show resolved Hide resolved
Loading
Loading