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

fix: issue with loading typescript and v8 snapshot #24684

Merged
merged 2 commits into from Nov 15, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions .circleci/config.yml
Expand Up @@ -27,7 +27,7 @@ mainBuildFilters: &mainBuildFilters
branches:
only:
- develop
- 'ryanm/fix/migrating-to-11-from-9-typescript'
- 'ryanm/fix/typescript-issue'

# usually we don't build Mac app - it takes a long time
# but sometimes we want to really confirm we are doing the right thing
Expand All @@ -36,7 +36,7 @@ macWorkflowFilters: &darwin-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/migrating-to-11-from-9-typescript', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/typescript-issue', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -45,7 +45,7 @@ linuxArm64WorkflowFilters: &linux-arm64-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/migrating-to-11-from-9-typescript', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/typescript-issue', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand All @@ -63,7 +63,7 @@ windowsWorkflowFilters: &windows-workflow-filters
when:
or:
- equal: [ develop, << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/migrating-to-11-from-9-typescript', << pipeline.git.branch >> ]
- equal: [ 'ryanm/fix/typescript-issue', << pipeline.git.branch >> ]
- matches:
pattern: "-release$"
value: << pipeline.git.branch >>
Expand Down Expand Up @@ -130,7 +130,7 @@ commands:
- run:
name: Check current branch to persist artifacts
command: |
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "ryanm/fix/migrating-to-11-from-9-typescript" ]]; then
if [[ "$CIRCLE_BRANCH" != "develop" && "$CIRCLE_BRANCH" != "ryanm/fix/typescript-issue" ]]; then
echo "Not uploading artifacts or posting install comment for this branch."
circleci-agent step halt
fi
Expand Down
8 changes: 7 additions & 1 deletion packages/packherd-require/src/loader.ts
Expand Up @@ -898,8 +898,14 @@ export class PackherdModuleLoader {
parent = this._createModule(fullPath, parent, moduleUri)
}

const originalRequireResolve = require.resolve

require.resolve = Object.assign(
(moduleUri: string, _options?: { paths?: string[] }) => {
(moduleUri: string, options?: { paths?: string[] }) => {
if (options && options.paths) {
ryanthemanuel marked this conversation as resolved.
Show resolved Hide resolved
return originalRequireResolve(moduleUri, options)
}

return this.tryResolve(moduleUri, parent).fullPath
},
{
Expand Down