Skip to content

Conversation

MatteoGabriele
Copy link
Owner

@MatteoGabriele MatteoGabriele commented Sep 5, 2025

Updated exports in index.ts to re-export all types from '@/types/settings' and '@/types/gtag' for broader type availability.

closes #631

Updated exports in index.ts to re-export all types from '@/types/settings' and '@/types/gtag' for broader type availability.
Copy link

coderabbitai bot commented Sep 5, 2025

Warning

Rate limit exceeded

@MatteoGabriele has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 44 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ab17723 and c28efd0.

📒 Files selected for processing (2)
  • .circleci/config.yml (2 hunks)
  • src/index.ts (1 hunks)

Walkthrough

Replaced a single named type export in src/index.ts with two type-only re-exports: export type * from "@/types/settings" and export type * from "@/types/gtag". No runtime/value exports were changed. Updated CircleCI config (.circleci/config.yml) to parameterize the node image via a new node_image pipeline parameter, switch job docker images to that parameter, change pnpm cache keys to use pnpm-lock.yaml, add corepack/pnpm store steps, and add a new workflows block along with expanded release steps (git user, npm auth, semantic-release).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Assessment against linked issues

Objective (issue#) Addressed Explanation
Export GtagEcommerceParams / export ecommerce-related types (#631)
Provide rationale or notes for removal of convenience methods like purchase (#631) No documentation or code comments added that explain the rationale; unclear from code changes alone.

Out-of-scope changes

Code Change (file_path) Explanation
Add pipeline parameter node_image and change job docker images to << pipeline.parameters.node_image >> (.circleci/config.yml) CI/automation changes unrelated to exporting types requested in #631.
Replace dependency cache keys, add corepack/pnpm store steps and change cache paths (.circleci/config.yml) CI performance/packaging changes not related to the type-export objective.
Add workflows block and expanded release steps including git user config, npm auth, and npx semantic-release (.circleci/config.yml) Release automation changes unrelated to the type export objective.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/expose-types

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.circleci/config.yml (4)

3-5: Anchor defined but unused; switch to a pipeline parameter or anchor the full image string.

YAML anchors can’t be interpolated inside strings, so &node_version won’t help with cimg/node:<version>. Prefer a pipeline parameter, or anchor the complete image string.

Option A (preferred: pipeline parameter):

-# Define Node.js version as a variable
-node_version: &node_version "22.15.1"
+parameters:
+  node_image:
+    type: string
+    default: "cimg/node:22.15.1"

Then update job images to << pipeline.parameters.node_image >> (see separate diff below).


22-22: DRY the Docker image declaration using the pipeline parameter.

Apply this diff after adding the parameters block:

-      - image: cimg/node:22.15.1
+      - image: << pipeline.parameters.node_image >>

Repeat for all jobs in these lines.

Also applies to: 30-30, 38-38, 46-46, 54-54, 62-62


9-17: Harden pnpm setup and improve cache keys for faster, reproducible installs.

  • Enable Corepack to ensure pnpm availability on Node 22.
  • Use the lockfile for cache keys; cache the pnpm store for better reuse.
       - restore_cache:
           keys:
-            - v1-dependencies-{{ checksum "package.json" }}
+            - v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
             - v1-dependencies-
+      - run: corepack enable
+      - run: pnpm config set store-dir ~/.pnpm-store
       - run: pnpm install
       - save_cache:
           paths:
-            - node_modules
-          key: v1-dependencies-{{ checksum "package.json" }}
+            - node_modules
+            - ~/.pnpm-store
+          key: v1-dependencies-{{ checksum "pnpm-lock.yaml" }}

43-43: Fix YAML trailing whitespace (lint error).

Remove the trailing spaces on this blank line to satisfy yamllint.

-        
+
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between bedd6df and 7d51f7f.

📒 Files selected for processing (1)
  • .circleci/config.yml (2 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.circleci/config.yml

[error] 43-43: trailing spaces

(trailing-spaces)

🔇 Additional comments (1)
.circleci/config.yml (1)

22-22: Docker tag cimg/node:22.15.1 exists on Docker Hub—no changes required.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
.circleci/config.yml (3)

15-17: Pin pnpm version via corepack to ensure reproducible installs.

Without a pinned version, pnpm may drift when images change.

If package.json lacks packageManager, add an explicit pin step:

       - run: corepack enable
+      - run: corepack use pnpm@9
       - run: pnpm config set store-dir ~/.pnpm-store

And prefer frozen lockfile:

-      - run: pnpm install
+      - run: pnpm install --frozen-lockfile

71-80: Harden NPM auth handling and clean up credentials.

Set strict perms on ~/.npmrc and remove it after release to minimize exposure in the runner filesystem.

Apply:

       - run:
           name: Configure NPM Authentication
           command: |
-            echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
+            umask 077
+            echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
       - run: npx semantic-release
+      - run:
+          name: Cleanup NPM credentials
+          when: always
+          command: rm -f ~/.npmrc

48-48: Trim trailing whitespace to satisfy yamllint.

Remove trailing spaces on this line (and the following blank line if it contains spaces).

-      - run: pnpm run typecheck··
+      - run: pnpm run typecheck
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Knowledge Base: Disabled due to Reviews > Disable Knowledge Base setting

📥 Commits

Reviewing files that changed from the base of the PR and between 7d51f7f and ab17723.

📒 Files selected for processing (1)
  • .circleci/config.yml (1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.circleci/config.yml

[warning] 20-20: wrong indentation: expected 12 but found 13

(indentation)


[error] 48-48: trailing spaces

(trailing-spaces)

🔇 Additional comments (3)
.circleci/config.yml (3)

3-7: Nice: parameterized Node image for pipeline flexibility.

This makes image bumps trivial via a single parameter.


27-68: Consistent use of the parameterized image across jobs looks good.

Reduces drift between verify/build/test/release environments.


82-105: Confirm default branch filter for release.

Release is gated to master. If the default branch is main, this will never trigger.

If needed, update:

-              only: master
+              only: main

Comment on lines 13 to 23
- v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
- v1-dependencies-
- run: corepack enable
- run: pnpm config set store-dir ~/.pnpm-store
- run: pnpm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- node_modules
- ~/.pnpm-store
key: v1-dependencies-{{ checksum "pnpm-lock.yaml" }}

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix mis-indentation under save_cache.paths (breaks YAML lint; may confuse CircleCI parser).

Yamllint flagged the list indentation. Align the list items under paths: uniformly.

Apply:

       - save_cache:
         paths:
-            - node_modules
-             - ~/.pnpm-store
+          - node_modules
+          - ~/.pnpm-store
         key: v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
- v1-dependencies-
- run: corepack enable
- run: pnpm config set store-dir ~/.pnpm-store
- run: pnpm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- node_modules
- ~/.pnpm-store
key: v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
- v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
- v1-dependencies-
- run: corepack enable
- run: pnpm config set store-dir ~/.pnpm-store
- run: pnpm install
- save_cache:
paths:
- node_modules
- ~/.pnpm-store
key: v1-dependencies-{{ checksum "pnpm-lock.yaml" }}
🧰 Tools
🪛 YAMLlint (1.37.1)

[warning] 20-20: wrong indentation: expected 12 but found 13

(indentation)

🤖 Prompt for AI Agents
In .circleci/config.yml around lines 13 to 23 the list items under
save_cache.paths are mis-indented (one dash is indented differently), which
breaks YAML linting; fix by aligning all path list entries to the same
indentation level directly beneath the `paths:` key (each item should start with
a single hyphen at the same column and consistent spacing), ensure node_modules
and ~/.pnpm-store are each on their own properly indented lines and that the
surrounding keys keep consistent indentation.

@MatteoGabriele MatteoGabriele merged commit 54ebdba into master Sep 6, 2025
6 checks passed
@MatteoGabriele MatteoGabriele deleted the feat/expose-types branch September 6, 2025 12:19
MatteoGabriele pushed a commit that referenced this pull request Sep 6, 2025
# [3.6.0](v3.5.2...v3.6.0) (2025-09-06)

### Features

* export all types ([#634](#634)) ([54ebdba](54ebdba))
@MatteoGabriele
Copy link
Owner Author

🎉 This PR is included in version 3.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GtagEcommerceParams not exported
1 participant