Skip to content

Commit

Permalink
fix issue with errors and babel/runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthemanuel committed Nov 9, 2022
1 parent f236a3d commit 4912d23
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scripts/binary/binary-cleanup.js
Expand Up @@ -52,7 +52,7 @@ const getDependencyPathsToKeep = async (buildAppDir) => {
require.resolve('webpack-dev-server', { paths: [buildAppDir] }),
require.resolve('html-webpack-plugin-4', { paths: [buildAppDir] }),
require.resolve('html-webpack-plugin-5', { paths: [buildAppDir] }),
// This is a dynamic import swizzle that needs to happen in the reporter
// These involve dynamic requires that are not resolved by esbuild. They need to be kept in the binary.
require.resolve('mocha-7.0.1', { paths: [buildAppDir] }),
// These dependencies are completely dynamic using the pattern `require(`./${name}`)` and will not be pulled in by esbuild but still need to be kept in the binary.
...['ibmi',
Expand Down Expand Up @@ -125,9 +125,11 @@ const cleanup = async (buildAppDir) => {

// 3. Remove all dependencies that are in the snapshot but not in the list of kept dependencies from the binary
await Promise.all(potentiallyRemovedDependencies.map(async (dependency) => {
// marionette-client requires all of its dependencies in a very non-standard dynamic way. We will keep anything in marionette-client
if (!keptDependencies.includes(dependency.slice(2)) && !dependency.includes('marionette-client')) {
await fs.remove(path.join(buildAppDir, dependency.replace(/.ts$/, '.js')))
const typeScriptlessDependency = dependency.replace(/\.ts$/, '.js')

// marionette-client and babel/runtime require all of their dependencies in a very non-standard dynamic way. We will keep anything in marionette-client and babel/runtime
if (!keptDependencies.includes(typeScriptlessDependency.slice(2)) && !typeScriptlessDependency.includes('marionette-client') && !typeScriptlessDependency.includes('@babel/runtime')) {
await fs.remove(path.join(buildAppDir, typeScriptlessDependency))
}
}))

Expand Down

4 comments on commit 4912d23

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4912d23 Nov 9, 2022

Choose a reason for hiding this comment

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

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.1/linux-arm64/ryanm/fix/improve-binary-cleanup-to-look-at-binary-rather-than-monorepo-4912d23d55522ee5749bd7ab4abb61f49f80ab5b/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4912d23 Nov 9, 2022

Choose a reason for hiding this comment

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

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.1/linux-x64/ryanm/fix/improve-binary-cleanup-to-look-at-binary-rather-than-monorepo-4912d23d55522ee5749bd7ab4abb61f49f80ab5b/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4912d23 Nov 9, 2022

Choose a reason for hiding this comment

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

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.1/darwin-arm64/ryanm/fix/improve-binary-cleanup-to-look-at-binary-rather-than-monorepo-4912d23d55522ee5749bd7ab4abb61f49f80ab5b/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 4912d23 Nov 9, 2022

Choose a reason for hiding this comment

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

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release platform-specific build at https://on.cypress.io/installing-cypress#Install-pre-release-version.

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/11.0.1/darwin-x64/ryanm/fix/improve-binary-cleanup-to-look-at-binary-rather-than-monorepo-4912d23d55522ee5749bd7ab4abb61f49f80ab5b/cypress.tgz

Please sign in to comment.