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

Enhancement: Moved from react to Vite #64

Closed
wants to merge 2 commits into from

Conversation

Ocolus1
Copy link
Contributor

@Ocolus1 Ocolus1 commented May 1, 2023

No description provided.

@Ocolus1 Ocolus1 linked an issue May 1, 2023 that may be closed by this pull request
@Ocolus1 Ocolus1 requested a review from Divide-By-0 May 1, 2023 10:09
@socket-security
Copy link

New dependency changes detected. Learn more about Socket for GitHub ↗︎


🚨 Potential security issues found in this pull request. To accept the risk, merge this PR and you will not be notified again.

Bot Commands

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of package-name@version specifiers. e.g. @SocketSecurity ignore [email protected] bar@* or ignore all packages with @SocketSecurity ignore-all

📜 Install scripts

Install scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.

Packages should not be running non-essential scripts during install and there are often solutions to problems people solve with install scripts that can be run at publish time instead.

Package Script field Source
[email protected] (added) postinstall package.json via [email protected]
[email protected] (added) postinstall package.json via [email protected]
Pull request alert summary
Issue Status
Install scripts ⚠️ 2 issues
Native code ✅ 0 issues
Bin script shell injection ✅ 0 issues
Unresolved require ✅ 0 issues
Invalid package.json ✅ 0 issues
HTTP dependency ✅ 0 issues
Git dependency ✅ 0 issues
Potential typo squat ✅ 0 issues
Known Malware ✅ 0 issues
Telemetry ✅ 0 issues
Protestware/Troll package ✅ 0 issues

📊 Modified Dependency Overview:

➕ Added Package Capability Access +/- Transitive Count Publisher
[email protected] eval, network, filesystem, shell +30 griko
[email protected] eval, network, shell +31 puruvj
[email protected] eval, shell +15 pd4d10
[email protected] eval, filesystem, shell, environment +58 pahen
[email protected] None +2 caoxie
[email protected] eval, filesystem +2 aleclarson
@vitejs/[email protected] None +3 vitebot

🚮 Removed packages: [email protected]

@Divide-By-0
Copy link
Member

Your yarn.lock checksum here is wrong:
checksum: 03909c769b2fa2c210b0a9ef17c7132824de0aa247626a02864a35d966350e9d2769121e1fab96ce2c81284a956694afb1e2819738e784c889ed6c0fe0d305ab

Please use

"snarkjs@https://github.com/sampritipanda/snarkjs.git#fef81fc51d17a734637555c6edbd585ecda02d9e":
  version: 0.5.0
  resolution: "snarkjs@https://github.com/sampritipanda/snarkjs.git#commit=fef81fc51d17a734637555c6edbd585ecda02d9e"
  dependencies:
    "@iden3/binfileutils": 0.0.11
    bfj: ^7.0.2
    blake2b-wasm: ^2.4.0
    circom_runtime: 0.1.21
    ejs: ^3.1.6
    fastfile: 0.0.20
    ffjavascript: 0.2.56
    js-sha3: ^0.8.0
    localforage: ^1.10.0
    logplease: ^1.2.15
    r1csfile: 0.0.41
  bin:
    snarkjs: build/cli.cjs
  checksum: f2050f0135d50d459ea0edddf3e394e833a2d28c6648e5889b2f896814865e5c60606e978a8a106bd5bfe7e27501c315f249db5b71895d5e7e6e9a87bfcd55ab
  languageName: node
  linkType: hard

in your yarn.lock instead to pass tests @Ocolus1

@Divide-By-0
Copy link
Member

Divide-By-0 commented May 1, 2023

There's still errors: command not found: react-scripts. See the circleci log details!

@Ocolus1
Copy link
Contributor Author

Ocolus1 commented May 1, 2023

@Divide-By-0 react-scripts was removed intentionally, the test will not pass. It was necessary to convert to Vite.

@Divide-By-0
Copy link
Member

Divide-By-0 commented May 2, 2023

Try these edits in package.json and test to ensure the scripts work for instance: @Ocolus1

    "start": "vite",
    "build": "tsc && vite build",
    "serve": "vite preview",
    "both-build": "vite build && next build",
    "next-build": "next build",
    "test": "jest --runInBand --testPathIgnorePatterns='e2e|src/contracts/lib' --reporters=default --reporters=jest-junit",
    "test:browserstack": "browserstack-node-sdk jest src/ --runInBand --testPathIgnorePatterns='e2e|src/contracts/lib' --reporters=default --reporters=jest-junit",
    "start-e2e-test-server": "serve -s build -p 3000",
    "test:e2e-ui": "CI=true jest --runInBand --testPathPattern='e2e-ui' --reporters=default --reporters=jest-junit",
    "test:e2e-zkp": "CI=true jest --runInBand --testPathPattern='e2e-dl-zkp' --reporters=default --reporters=jest-junit",
    "eject": "echo 'The eject command is not available in Vite.'"

For your snarkjs fork, you need to fork sampritipanda's fork, not the original.

@Divide-By-0
Copy link
Member

Divide-By-0 commented Jun 10, 2023

Closed by #76.

@Divide-By-0 Divide-By-0 deleted the 59-migrate-frontend-to-vite branch June 12, 2023 05:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate frontend to Vite
2 participants