Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Sep 12, 2023
1 parent 8b544be commit 574d977
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 26 deletions.
25 changes: 4 additions & 21 deletions build/preview-build/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71940,21 +71940,6 @@ module.exports.implForWrapper = function (wrapper) {
}).call(this);


/***/ }),

/***/ 1249:
/***/ ((module) => {

function webpackEmptyContext(req) {
var e = new Error("Cannot find module '" + req + "'");
e.code = 'MODULE_NOT_FOUND';
throw e;
}
webpackEmptyContext.keys = () => ([]);
webpackEmptyContext.resolve = webpackEmptyContext;
webpackEmptyContext.id = 1249;
module.exports = webpackEmptyContext;

/***/ }),

/***/ 9491:
Expand Down Expand Up @@ -72301,9 +72286,6 @@ __nccwpck_require__.d(__webpack_exports__, {
var core = __nccwpck_require__(2186);
// EXTERNAL MODULE: ./node_modules/@actions/exec/lib/exec.js
var lib_exec = __nccwpck_require__(1514);
// EXTERNAL MODULE: external "fs"
var external_fs_ = __nccwpck_require__(7147);
var external_fs_default = /*#__PURE__*/__nccwpck_require__.n(external_fs_);
// EXTERNAL MODULE: ./node_modules/resolve-from/index.js
var resolve_from = __nccwpck_require__(4417);
var resolve_from_default = /*#__PURE__*/__nccwpck_require__.n(resolve_from);
Expand Down Expand Up @@ -72537,7 +72519,6 @@ async function installPackage(name, version, manager) {




// import { assertEasVersion, createBuild, EasBuild } from '../eas';
// import { createIssueComment, hasPullContext, pullContext } from '../github';

Expand Down Expand Up @@ -72631,8 +72612,10 @@ async function installFingerprintAsync(input) {
*/
function importFingerprint(fingerprintLibRoot) {
try {
console.log('ooxx fs exist', external_fs_default().existsSync('/opt/hostedtoolcache/@expo/fingerprint/0.2.0/x64/node_modules/@expo/fingerprint/build/index.js'));
return __nccwpck_require__(1249)(resolve_from_default()(fingerprintLibRoot, '@expo/fingerprint'));
// use dynamicRequire hack to prevent using the ncc require shim
// eslint-disable-next-line no-new-func
const dynamicRequire = new Function('module', 'return require(module)');
return dynamicRequire(resolve_from_default()(fingerprintLibRoot, '@expo/fingerprint'));
}
catch (e) {
if (e instanceof Error) {
Expand Down
9 changes: 4 additions & 5 deletions src/actions/preview-build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,10 @@ async function installFingerprintAsync(input: ReturnType<typeof previewBuildInpu
*/
function importFingerprint(fingerprintLibRoot: string): typeof Fingerprint {
try {
console.log(
'ooxx fs exist',
fs.existsSync('/opt/hostedtoolcache/@expo/fingerprint/0.2.0/x64/node_modules/@expo/fingerprint/build/index.js')
);
return require(resolveFrom(fingerprintLibRoot, '@expo/fingerprint'));
// use dynamicRequire hack to prevent using the ncc require shim
// eslint-disable-next-line no-new-func
const dynamicRequire = new Function('module', 'return require(module)');
return dynamicRequire(resolveFrom(fingerprintLibRoot, '@expo/fingerprint'));
} catch (e: unknown) {
if (e instanceof Error) {
throw new Error(`Failed to import @expo/fingerprint from ${fingerprintLibRoot}: ${e.stack}`);
Expand Down

0 comments on commit 574d977

Please sign in to comment.