Skip to content

Conversation

@fraxken
Copy link
Member

@fraxken fraxken commented Jul 3, 2025

No description provided.

@fraxken fraxken requested review from PierreDemailly and Copilot July 3, 2025 11:12
@changeset-bot
Copy link

changeset-bot bot commented Jul 3, 2025

🦋 Changeset detected

Latest commit: 4ac9256

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@nodesecure/estree-ast-utils Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new joinArrayExpression utility alongside refactoring and consolidating the existing arrayExpressionToString logic into a single module. It updates exports, adjusts imports, and enhances tests and documentation to cover the new functionality.

  • Combined arrayExpressionToString and new joinArrayExpression into src/arrayExpression.ts
  • Updated exports/imports in src/index.ts and concatBinaryExpression.ts
  • Revised tests to cover joinArrayExpression and updated README & changelog

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/arrayExpression.ts New consolidated file exports both arrayExpressionToString & joinArrayExpression
src/index.ts Swapped old export to point at arrayExpression.ts, added utils/is.ts
src/concatBinaryExpression.ts Updated import path for arrayExpression helper
test/utils.ts Added getExpressionFromStatementIf helper for join tests
test/arrayExpression.spec.ts New tests for both utilities, removed duplicate old specs
README.md Updated signatures and details for both utilities
.changeset/purple-emus-appear.md Changelog entry for the new utility
Comments suppressed due to low confidence (1)

workspaces/estree-ast-utils/test/arrayExpression.spec.ts:55

  • [nitpick] Add a test for arrayExpressionToString with resolveCharCode: false to verify it yields raw number strings instead of converting to characters.
  test(`given an ArrayExpression with two numbers

@fraxken fraxken force-pushed the array-join-expr branch from 43766af to 4ac9256 Compare July 3, 2025 11:16
@fraxken fraxken merged commit 53b25a4 into master Jul 3, 2025
6 checks passed
@fraxken fraxken deleted the array-join-expr branch July 3, 2025 11:18
@github-actions github-actions bot mentioned this pull request Jul 3, 2025
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.

3 participants