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(gatsby-theme-bodiless, backend, hydration, layouts, tokens, ga4): Replace crypto-browserify with crypto-js #1955

Conversation

marcopagliarulo
Copy link
Collaborator

@marcopagliarulo marcopagliarulo commented Sep 9, 2022

Changes

Crypto-browserify is not under active maintenance (last release 5 years ago). It bring outdated dependencies and multiple version of the same package inside the client bundle.

Replace crypto-browserify with crypto-js,

Test Instructions

File upload

  1. From edit interface pick any component with image
  2. Upload an image
  3. Check the image is uploaded properly generating the hash value as expected.

PLP GA4

  1. Open PLP with GA4 enabled on static site
  2. Filter the Products
  3. Verify that the event pushed contains the item_list_id with the proper hash generated

withoutHydration

  1. Open any page on static site having at least one component withoutHydration
  2. verify the ID on the component is the same after load and on the static HTML

flowContainer Item creation

  1. From edit interface add any component to flow container
  2. Check the UUID is generated properly inside the JSON files.

Move files to public

  1. Build the site
  2. Verify that gatsby has properly copied the files to the public folder.

DefaultContent

  1. Build a site with more than one Default Content directory created by createDefaultContentPlugins
  2. Verify that all the defautl content are available

Tokens

  1. On test site, add a component to the tokens page and enable/disable tokens
  2. Verify that the component is reloaded properly every time a token is applied/removed.

Related Issues

Fixes #1954

wodenx
wodenx previously approved these changes Sep 12, 2022
@vercel
Copy link

vercel bot commented Mar 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bodiless-js ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 5, 2023 5:35pm

@marcopagliarulo marcopagliarulo changed the title [DRAFT] feat(gatsby-theme-bodiless): Replace crypto-browserify with crypto-js feat(gatsby-theme-bodiless, backend, hydration, layouts, tokens, ga4): Replace crypto-browserify with crypto-js [Canary] Mar 16, 2023
@marcopagliarulo marcopagliarulo force-pushed the feature/replace-crypto-with-crypto-js branch from 0cac0ec to df34636 Compare March 16, 2023 12:41
@github-actions
Copy link

github-actions bot commented Mar 16, 2023

Playwright Test Results

196 tests   181 ✔️  42m 53s ⏱️
  14 suites    15 💤
    2 files        0

Results for commit e8d8dd8.

♻️ This comment has been updated with latest results.

@marcopagliarulo marcopagliarulo force-pushed the feature/replace-crypto-with-crypto-js branch from df34636 to ba78186 Compare March 23, 2023 19:38
@vercel
Copy link

vercel bot commented Mar 23, 2023

Someone is attempting to deploy a commit to the JNJ Demo Account Team on Vercel.

A member of the Team first needs to authorize it.

wodenx
wodenx previously approved these changes Apr 4, 2023
@marcopagliarulo marcopagliarulo changed the title feat(gatsby-theme-bodiless, backend, hydration, layouts, tokens, ga4): Replace crypto-browserify with crypto-js [Canary] feat(gatsby-theme-bodiless, backend, hydration, layouts, tokens, ga4): Replace crypto-browserify with crypto-js Apr 4, 2023
VancheeZze
VancheeZze previously approved these changes Apr 5, 2023
packages/bodiless-backend/src/fileHelper.js Outdated Show resolved Hide resolved
packages/gatsby-theme-bodiless/create-node.js Outdated Show resolved Hide resolved
VancheeZze
VancheeZze previously approved these changes Apr 5, 2023
@@ -64,6 +64,7 @@ jobs:
env:
APPLITOOLS_API_KEY: ${{ secrets.APPLITOOLS_API_KEY }}
run: |
export APPLITOOLS_BATCH_NAME="${{ github.event.pull_request.title }} (${{ github.event.pull_request.number }})"
Copy link
Contributor

Choose a reason for hiding this comment

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

@marcopagliarulo what's this about>

@@ -0,0 +1,63 @@
/**
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Because fileHelper.js uses MD5, I wrote a test for it which was not covered by any test

@marcopagliarulo marcopagliarulo merged commit bb211c7 into johnsonandjohnson:main Apr 6, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants