0x#13
Open
Dargon789 wants to merge 144 commits into
Open
Conversation
Updates Yarn to the latest version. yarn self-update https://classic.yarnpkg.com/en/docs/cli/self-update Important: self-update is not available. See policies for enforcing versions within a project In order to update your version of Yarn, you can run one of the following commands: npm install --global yarn - if you’ve installed Yarn via npm (recommended) curl --compressed -o- -L https://yarnpkg.com/install.sh | bash if you’re on Unix otherwise, check the docs of the installer you’ve used to install Yarn Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Updates Yarn to the latest version. yarn self-update https://classic.yarnpkg.com/en/docs/cli/self-update Important: self-update is not available. See policies for enforcing versions within a project In order to update your version of Yarn, you can run one of the following commands: npm install --global yarn - if you’ve installed Yarn via npm (recommended) curl --compressed -o- -L https://yarnpkg.com/install.sh | bash if you’re on Unix otherwise, check the docs of the installer you’ve used to install Yarn Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Author
|
@Mergifyio refresh |
✅ Pull request refreshed |
Author
|
@Mergifyio update |
☑️ Nothing to do, the required conditions are not metDetails
|
Author
|
@Mergifyio rebase |
Author
|
@Mergifyio refresh |
❌ Base branch update has failedDetailsGit reported the following error: |
✅ Pull request refreshed |
Author
|
@Mergifyio update |
☑️ Nothing to do, the required conditions are not metDetails
|
workspace logo production project
Author
|
@Mergifyio update |
Comment on lines
+316
to
+324
| --artifact-dir "$ARTIFACT_DIR" | ||
|
|
||
| - name: Sanity Check Binary | ||
| working-directory: ./npm | ||
| run: | | ||
| set -euo pipefail | ||
| TOOL='${{ matrix.tool }}' | ||
| PLATFORM='${{ matrix.os }}' | ||
| ARCH='${{ matrix.arch }}' |
Check failure
Code scanning / CodeQL
Artifact poisoning
Comment on lines
+362
to
+486
| case "$TOOL" in | ||
| (*[!a-zA-Z0-9_-]*|'') echo "ERROR: Invalid TOOL value: $TOOL" >&2; exit 1 ;; | ||
| esac | ||
| case "$PLATFORM" in | ||
| (*[!a-zA-Z0-9_-]*|'') echo "ERROR: Invalid PLATFORM value: $PLATFORM" >&2; exit 1 ;; | ||
| esac | ||
| case "$ARCH" in | ||
| (*[!a-zA-Z0-9_-]*|'') echo "ERROR: Invalid ARCH value: $ARCH" >&2; exit 1 ;; | ||
| esac | ||
|
|
||
| PACKAGE_DIR="./@foundry-rs/${TOOL}-${PLATFORM}-${ARCH}" | ||
| EXPECTED_PKG_NAME="${TOOL}-${PLATFORM}-${ARCH}" | ||
|
|
||
| # Ensure corresponding artifact directory exists in the isolated artifact dir | ||
| if [[ -z "${ARTIFACT_DIR:-}" ]]; then | ||
| echo "ERROR: ARTIFACT_DIR is not set; refusing to publish." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Ensure ARTIFACT_DIR is exactly the isolated directory we created earlier | ||
| EXPECTED_ARTIFACT_ROOT="${RUNNER_TEMP%/}/foundry_artifacts" | ||
| ABS_ARTIFACT_DIR="$(realpath "$ARTIFACT_DIR")" | ||
| ABS_EXPECTED_ARTIFACT_ROOT="$(realpath "$EXPECTED_ARTIFACT_ROOT")" | ||
| if [[ "$ABS_ARTIFACT_DIR" != "$ABS_EXPECTED_ARTIFACT_ROOT" ]]; then | ||
| echo "ERROR: ARTIFACT_DIR ($ABS_ARTIFACT_DIR) does not match expected isolated artifact root ($ABS_EXPECTED_ARTIFACT_ROOT); refusing to publish." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| EXPECTED_ARTIFACT_PATH="${ARTIFACT_DIR}/${EXPECTED_PKG_NAME}" | ||
| if [[ ! -d "$EXPECTED_ARTIFACT_PATH" ]]; then | ||
| echo "ERROR: Expected artifact directory not found at: $EXPECTED_ARTIFACT_PATH" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Resolve artifact path to an absolute path and ensure it stays within ARTIFACT_DIR | ||
| ABS_ARTIFACT_PATH="$(realpath "$EXPECTED_ARTIFACT_PATH")" | ||
| ABS_ARTIFACT_ROOT="$(realpath "$ARTIFACT_DIR")" | ||
| case "$ABS_ARTIFACT_PATH" in | ||
| "$ABS_ARTIFACT_ROOT"/*) ;; | ||
| *) | ||
| echo "ERROR: Resolved artifact path is outside isolated artifact root:" >&2 | ||
| echo " ABS_ARTIFACT_PATH=$ABS_ARTIFACT_PATH" >&2 | ||
| echo " ABS_ARTIFACT_ROOT=$ABS_ARTIFACT_ROOT" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| echo "Preparing to publish package from: $PACKAGE_DIR (artifact: $EXPECTED_ARTIFACT_PATH)" | ||
|
|
||
| if [[ ! -d "$PACKAGE_DIR" ]]; then | ||
| echo "ERROR: Package directory does not exist: $PACKAGE_DIR" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Resolve to an absolute path and ensure it stays within ./@foundry-rs | ||
| ABS_PACKAGE_DIR="$(realpath "$PACKAGE_DIR")" | ||
| ABS_EXPECTED_ROOT="$(realpath "./@foundry-rs")" | ||
| case "$ABS_PACKAGE_DIR" in | ||
| "$ABS_EXPECTED_ROOT"/*) ;; | ||
| *) | ||
| echo "ERROR: Resolved package directory is outside expected root:" >&2 | ||
| echo " ABS_PACKAGE_DIR=$ABS_PACKAGE_DIR" >&2 | ||
| echo " ABS_EXPECTED_ROOT=$ABS_EXPECTED_ROOT" >&2 | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| ls -la "$PACKAGE_DIR" | ||
|
|
||
| # Minimal sanity check: require a package.json before publishing | ||
| if [[ ! -f "$PACKAGE_DIR/package.json" ]]; then | ||
| echo "ERROR: package.json not found in $PACKAGE_DIR; refusing to publish." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| # If the artifact also contains a package.json, ensure it matches the source package | ||
| if [[ -f "$EXPECTED_ARTIFACT_PATH/package.json" ]]; then | ||
| # Extract name and version from both package.json files using jq if available; fall back to grep/sed | ||
| if command -v jq >/dev/null 2>&1; then | ||
| SRC_NAME="$(jq -r '.name // empty' < "$PACKAGE_DIR/package.json")" | ||
| SRC_VERSION="$(jq -r '.version // empty' < "$PACKAGE_DIR/package.json")" | ||
| ART_NAME="$(jq -r '.name // empty' < "$EXPECTED_ARTIFACT_PATH/package.json")" | ||
| ART_VERSION="$(jq -r '.version // empty' < "$EXPECTED_ARTIFACT_PATH/package.json")" | ||
| else | ||
| SRC_NAME="$(grep -m1 '"name"' "$PACKAGE_DIR/package.json" | sed -E 's/.*"name"[[:space:]]*:[[:space:]]*"([^"]*)".*/\1/')" | ||
| SRC_VERSION="$(grep -m1 '"version"' "$PACKAGE_DIR/package.json" | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]*)".*/\1/')" | ||
| ART_NAME="$(grep -m1 '"name"' "$EXPECTED_ARTIFACT_PATH/package.json" | sed -E 's/.*"name"[[:space:]]*:[[:space:]]*"([^"]*)".*/\1/')" | ||
| ART_VERSION="$(grep -m1 '"version"' "$EXPECTED_ARTIFACT_PATH/package.json" | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]*)".*/\1/')" | ||
| fi | ||
|
|
||
| if [[ -n "$SRC_NAME" && -n "$ART_NAME" && "$SRC_NAME" != "$ART_NAME" ]]; then | ||
| echo "ERROR: Artifact package name ($ART_NAME) does not match source package name ($SRC_NAME); refusing to publish." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| if [[ -n "$SRC_VERSION" && -n "$ART_VERSION" && "$SRC_VERSION" != "$ART_VERSION" ]]; then | ||
| echo "ERROR: Artifact package version ($ART_VERSION) does not match source package version ($SRC_VERSION); refusing to publish." >&2 | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| bun ./scripts/publish.mjs "$PACKAGE_DIR" | ||
|
|
||
| echo "Published @foundry-rs/${TOOL}-${PLATFORM}-${ARCH}" | ||
|
|
||
| publish-meta: | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| id-token: write | ||
| needs: publish-arch | ||
| name: Publish Meta Package | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
| RELEASE_VERSION: ${{ needs.publish-arch.outputs.RELEASE_VERSION }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Setup Bun | ||
| uses: oven-sh/setup-bun@3d267786b128fe76c2f16a390aa2448b815359f3 # v2 |
Check failure
Code scanning / CodeQL
Artifact poisoning
☑️ Nothing to do, the required conditions are not metDetails
|
|
|
||
| function hexString(data) { | ||
| if (typeof data === "string" || data instanceof String) { | ||
| if (data = data.match(/^[\s\uFEFF\xA0]*(0[Xx])?([0-9A-Fa-f]*)[\s\uFEFF\xA0]*$/)) { |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data
Author
|
@Mergifyio refresh |
✅ Pull request refreshed |
Author
|
@Mergifyio update |
☑️ Nothing to do, the required conditions are not metDetails
|
npm install -g corepack & corepack enable can use npm pnpm yarn group Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
* Add Vercel Web Analytics to Next.js (#93) ## Vercel Web Analytics Installation for VitePress Successfully installed and configured Vercel Web Analytics for the VitePress documentation site. ### Summary The project uses VitePress (not Next.js) for its documentation site. VitePress is a Vue-based static site generator, so the analytics integration differs from the Next.js approach described in the original request. I adapted the implementation for VitePress. ### Changes Made **Created:** - None (modified existing files only) **Modified:** 1. `site/package.json` - Added `@vercel/analytics` v1.6.1 as a dependency 2. `site/.vitepress/theme/index.ts` - Imported and initialized analytics using the `inject()` function from `@vercel/analytics` 3. `pnpm-lock.yaml` - Updated to reflect the new dependency ### Implementation Details For VitePress, the analytics are injected using the `inject()` function from `@vercel/analytics` in the theme's `enhanceApp` method. This is called during application initialization and ensures analytics tracking is enabled across all pages. **Code changes in `site/.vitepress/theme/index.ts`:** - Added import: `import { inject } from '@vercel/analytics'` - Added call to `inject()` in the `enhanceApp` function ### Package Manager The project uses **pnpm** as its package manager (version 10.22.0). The installation was done using `pnpm add @vercel/analytics`. ### Build & Testing Notes - Package successfully installed via pnpm - TypeScript syntax is valid (pre-existing TS config issues unrelated to this change) - The full build process requires significant memory (16GB) as configured in the build script - Changes follow VitePress best practices for adding analytics tracking ### Additional Context While the original request mentioned Next.js App Router/Pages Router, the actual project directory (`site/`) uses VitePress. The implementation has been adapted accordingly using the standard `@vercel/analytics` package's `inject()` method, which works with any JavaScript/TypeScript web application including VitePress. The analytics will automatically track page views once deployed to Vercel. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> * Update dependabot.yml (#110) Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Create workspace.xml * Create CNAME * Update config.yml (#120) Dargon789/sequence.js@802829c Update CircleCI configuration to point to the correct GitHub project and add a placeholder run step to the custom job. CI: Change CircleCI project environment variables link to reference the 'foundry' repository instead of 'hardhat-project'. Add a commented placeholder shell command step to the custom CircleCI job. Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Create defender-for-devops.yml (#122) * Create defender-for-devops.yml Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Potential fix for code scanning alert no. 28: Workflow does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update .github/workflows/defender-for-devops.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update .github/workflows/defender-for-devops.yml Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> * Update pull-request.yml (#124) Dargon789/hardhat-project@ddaec4f Update pull request workflow permissions and simplify jobs. CI: Adjust pull request workflow to set repository-level read and pull-request write permissions and remove redundant job-level permissions. Remove the preview publish job from the pull request workflow. Update Size job to use maintained versions/branches of checkout, pnpm action, and compressed-size GitHub actions. Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> * .idea\workspace.xml add Updated upstream --------- Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: googleworkspace-bot <googleworkspace-bot@google.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.