-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Updated typescript config with import aliases #25459
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThis PR replaces numerous relative import paths with TypeScript path aliases across the e2e test suite and helpers, updates e2e/tsconfig.json to enable baseUrl and add paths mappings, and narrows tsconfig exclude to only node_modules. It adds an ESLint plugin and rule for banning relative imports and adds that devDependency in e2e/package.json. A few localized code edits include non-null assertions (e.g., Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Files/areas to pay extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (4)
e2e/tests/admin/members/impersonation.test.ts (1)
1-3: Alias imports + non-null assertion look good; consider an explicit invariantThe switch to
@helpers/pages,@data-factory, and@helpers/playwrightis consistent with the alias strategy and shouldn’t affect behavior. Thename!non-null assertion matches the assumption thatmemberFactory.createalways yields a member with a name.If there’s any chance
namecould be missing in future factory changes, you might consider making that invariant explicit (for example, by passing anameintocreatehere or assertingexpect(name).toBeDefined()before using it) to keep failures clearer.Also applies to: 18-18
e2e/tests/admin/members/filter-actions.test.ts (1)
1-4: Alias imports for members filter tests are correct; consider alias conventionsUsing
@helpers/playwright,@data-factory, and@admin-pageshere aligns with the new alias setup and should behave the same as the previous relative imports.One minor consistency thought: this file imports
MembersPagefrom@admin-pages, wherease2e/tests/admin/members/impersonation.test.tsimportsMembersPagefrom@helpers/pages. If both aliases target the same underlying module, it might be worth settling on one convention for admin pages to reduce cognitive overhead; if they’re intentionally distinct, this is fine as-is.e2e/tests/public/portal-loading.test.ts (1)
1-1: Minor formatting: Add space after comma.Missing space after
HomePage,in the import statement.Apply this diff:
-import {HomePage,SignInPage, SignUpPage} from '@helpers/pages'; +import {HomePage, SignInPage, SignUpPage} from '@helpers/pages';e2e/tests/admin/members/members.test.ts (1)
82-82: Potential undefined values from destructuring.Lines 82 and 104 destructure properties that may be undefined, yet non-null assertions are used later. Consider adding explicit checks or default values.
For line 82, consider:
const {name = 'Test Member', email, note = 'Test note'} = memberFactory.build({ email: '[email protected]', name: 'Test Member' });For line 104, since the member is created (not built), verify that the factory guarantees the
namefield is set.Also applies to: 104-104
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (29)
e2e/helpers/pages/admin/members/member-details-page.ts(1 hunks)e2e/tests/admin/analytics/growth.test.ts(1 hunks)e2e/tests/admin/analytics/location.test.ts(1 hunks)e2e/tests/admin/analytics/newsletters.test.ts(1 hunks)e2e/tests/admin/analytics/overview.test.ts(1 hunks)e2e/tests/admin/analytics/post-analytics/growth.test.ts(1 hunks)e2e/tests/admin/analytics/post-analytics/overview.test.ts(1 hunks)e2e/tests/admin/analytics/utm-tracking.test.ts(1 hunks)e2e/tests/admin/analytics/web-traffic.test.ts(1 hunks)e2e/tests/admin/members/export.test.ts(1 hunks)e2e/tests/admin/members/filter-actions.test.ts(1 hunks)e2e/tests/admin/members/impersonation.test.ts(2 hunks)e2e/tests/admin/members/members.test.ts(8 hunks)e2e/tests/admin/posts/post-preview.test.ts(1 hunks)e2e/tests/admin/posts/post-settings.test.ts(1 hunks)e2e/tests/admin/posts/posts.test.ts(1 hunks)e2e/tests/admin/reset-password.test.ts(1 hunks)e2e/tests/admin/settings/labs-search.test.ts(1 hunks)e2e/tests/admin/settings/publication-language.test.ts(1 hunks)e2e/tests/admin/tags/editor.test.ts(1 hunks)e2e/tests/admin/tags/list.test.ts(1 hunks)e2e/tests/admin/two-factor-auth.test.ts(1 hunks)e2e/tests/admin/whats-new.test.ts(1 hunks)e2e/tests/post-factory.test.ts(1 hunks)e2e/tests/public/homepage.test.ts(1 hunks)e2e/tests/public/member-signup-types.test.ts(1 hunks)e2e/tests/public/member-signup.test.ts(1 hunks)e2e/tests/public/portal-loading.test.ts(1 hunks)e2e/tsconfig.json(2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: niranjan-uma-shankar
Repo: TryGhost/Ghost PR: 24557
File: apps/admin-x-settings/src/components/settings/general/TimeZone.tsx:7-7
Timestamp: 2025-08-01T12:44:07.467Z
Learning: In Ghost development, PRs may depend on unpublished changes from SDK packages. When this occurs, TypeScript compilation errors for missing exports are expected and documented in the PR description until the dependency packages are published and updated. This is normal workflow for cross-repository feature development.
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.
Applied to files:
e2e/tests/admin/members/export.test.tse2e/tests/public/member-signup-types.test.tse2e/tests/admin/members/filter-actions.test.tse2e/tests/admin/two-factor-auth.test.tse2e/tests/admin/tags/list.test.tse2e/tests/admin/posts/posts.test.tse2e/tests/admin/settings/publication-language.test.tse2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.
Applied to files:
e2e/tests/admin/members/export.test.tse2e/tests/admin/reset-password.test.tse2e/tests/admin/analytics/growth.test.tse2e/tests/public/homepage.test.tse2e/tests/public/member-signup-types.test.tse2e/tests/admin/posts/post-settings.test.tse2e/tests/admin/analytics/post-analytics/overview.test.tse2e/tests/admin/posts/post-preview.test.tse2e/tests/admin/members/filter-actions.test.tse2e/tests/admin/analytics/utm-tracking.test.tse2e/tests/admin/two-factor-auth.test.tse2e/tests/public/member-signup.test.tse2e/tests/admin/analytics/location.test.tse2e/tests/admin/analytics/post-analytics/growth.test.tse2e/tests/admin/members/impersonation.test.tse2e/tests/admin/analytics/web-traffic.test.tse2e/tests/admin/tags/editor.test.tse2e/tests/admin/tags/list.test.tse2e/tests/admin/posts/posts.test.tse2e/tests/admin/members/members.test.tse2e/tests/admin/settings/publication-language.test.tse2e/tests/admin/settings/labs-search.test.tse2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-05-29T10:37:26.369Z
Learnt from: ErisDS
Repo: TryGhost/Ghost PR: 23588
File: ghost/core/test/e2e-api/admin/backup.test.js:136-148
Timestamp: 2025-05-29T10:37:26.369Z
Learning: In the Ghost test framework, when testing CSV exports via the admin API, the response `body` field is empty while the actual CSV data is provided through the `text` field. Tests should use `expectEmptyBody()` and then validate the CSV content via `.expect(({text}) => ...)` - this is not contradictory behavior.
Applied to files:
e2e/tests/admin/members/export.test.tse2e/tests/admin/posts/post-settings.test.tse2e/tests/admin/posts/posts.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in Ghost's ActivityPub module are thoroughly tested in `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`, which covers `generatePendingActivityId`, `isPendingActivity`, and `generatePendingActivity` functions.
Applied to files:
e2e/tests/admin/members/export.test.tse2e/tests/admin/reset-password.test.tse2e/tests/admin/analytics/growth.test.tse2e/tests/public/member-signup-types.test.tse2e/tests/admin/posts/post-settings.test.tse2e/tests/admin/analytics/post-analytics/overview.test.tse2e/tests/admin/members/filter-actions.test.tse2e/tests/admin/analytics/utm-tracking.test.tse2e/tests/public/member-signup.test.tse2e/tests/admin/analytics/post-analytics/growth.test.tse2e/tests/admin/members/impersonation.test.tse2e/tests/admin/analytics/web-traffic.test.tse2e/tests/admin/tags/editor.test.tse2e/tests/admin/tags/list.test.tse2e/tests/admin/posts/posts.test.tse2e/tests/admin/members/members.test.tse2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.
Applied to files:
e2e/tests/admin/analytics/post-analytics/overview.test.tse2e/tests/admin/analytics/utm-tracking.test.tse2e/tests/admin/analytics/post-analytics/growth.test.tse2e/tests/admin/analytics/web-traffic.test.tse2e/tests/admin/tags/editor.test.tse2e/tests/admin/analytics/overview.test.ts
📚 Learning: 2025-10-21T13:04:40.040Z
Learnt from: jonatansberg
Repo: TryGhost/Ghost PR: 24967
File: apps/admin/vite.config.ts:1-8
Timestamp: 2025-10-21T13:04:40.040Z
Learning: In Vite config files (vite.config.ts, vite.config.js), __dirname can be used directly even when the package.json has "type": "module". Vite handles config file transpilation in a way that makes __dirname available, so no ESM shim (fileURLToPath/dirname) is needed.
Applied to files:
e2e/tsconfig.json
🔇 Additional comments (29)
e2e/tests/public/member-signup.test.ts (1)
1-5: LGTM! Import aliases properly configured.All path mappings in
e2e/tsconfig.jsonare correctly set up, and the refactored imports align with the configured paths. This clean migration from relative to alias-based imports maintains full backward compatibility with proper TypeScript resolution.e2e/tests/admin/posts/posts.test.ts (1)
1-3: Import alias configuration verified and working correctly.All three import aliases are properly configured in
e2e/tsconfig.jsonand resolve to valid paths:
@data-factory→e2e/data-factory/index.ts✓@helpers/pages→e2e/helpers/pages/✓@helpers/playwright→e2e/helpers/playwright/✓The refactoring improves code maintainability with no issues identified.
e2e/tests/admin/whats-new.test.ts (1)
1-2: LGTM! Aliases are correctly configured.The import migration to module aliases is clean and properly supported. Verified that
e2e/tsconfig.jsoncorrectly defines@admin-pages→./helpers/pages/admin/indexand@helpers/*→./helpers/*, with all target files and exports in place. This pattern is already in use across multiple test files in the codebase.e2e/tests/admin/posts/post-preview.test.ts (1)
1-3: ✓ Alias configuration verified. Code changes approved.The imports in this file are correctly configured. All three aliases are properly defined in
e2e/tsconfig.json:
@admin-pagesmaps to./helpers/pages/admin/index@data-factorymaps to./data-factory/index.ts@helpers/*maps to./helpers/*(supporting@helpers/playwright)The migration is essentially complete, with only two setup/teardown files (
e2e/tests/global.setup.tsande2e/tests/global.teardown.ts) still using relative imports—likely by design.e2e/tests/public/member-signup-types.test.ts (1)
1-8: LGTM! Import alias refactoring is properly configured and verified.The migration from relative paths to semantic module aliases improves maintainability and resilience to file restructuring. All path aliases in
e2e/tsconfig.jsonare correctly configured with matching target files verified to exist:
@admin-pages,@public-pages,@portal-pages→ page helper index files@helpers/*→ helpers directory with wildcard support@data-factory→ factory index fileAll seven imports in the test file resolve correctly.
e2e/tests/admin/two-factor-auth.test.ts (1)
1-3: All import aliases are correctly configured and valid.Verification confirms that:
@admin-pagesresolves toe2e/helpers/pages/admin/index.tsand exportsAnalyticsOverviewPage,LoginPage, andLoginVerifyPage@helpers/services/email/mail-pitresolves correctly and exportsEmailClient,EmailMessage, andMailPit@helpers/playwrightresolves toe2e/helpers/playwright/index.tsand exports bothtestandexpectfrom the Playwright fixtureThe TypeScript path configuration in
e2e/tsconfig.jsonis properly set up with correctbaseUrlandpathsmappings. No issues found.e2e/tests/admin/posts/post-settings.test.ts (1)
1-3: Import alias refactoring verified—all path mappings resolve correctly.The migration from relative to module aliases is sound. The
tsconfig.jsonpath mappings are properly configured:
@helpers/*→./helpers/*(resolves both@helpers/pagesand@helpers/playwright)@data-factory→./data-factory/index.tsAll target directories exist with correct exports, and
@faker-js/fakeris present ine2e/package.json. The test logic remains unchanged and the imports will resolve correctly.e2e/tests/admin/tags/editor.test.ts (1)
1-2: Import alias migration for tags tests looks goodUsing
@admin-pagesfor admin tag page objects and@helpers/playwrightfor the test wrapper matches the alias strategy in this PR and doesn’t change runtime behavior.e2e/helpers/pages/admin/members/member-details-page.ts (1)
34-34: Formatting-only blank line change is fineThe added blank line between the subscription toggles and save-related locators is cosmetic and has no functional impact.
e2e/tests/admin/reset-password.test.ts (1)
1-2: Reset-password imports correctly switched to aliasesAdmin page objects, email helpers, and the Playwright wrapper are now imported via the configured aliases, mirroring the previous relative structure without changing test behavior.
Also applies to: 4-5
e2e/tests/admin/settings/labs-search.test.ts (1)
1-2: LGTM! Clean migration to module aliases.The import updates are consistent with the project-wide shift to path aliasing. The aliases are clear and improve readability over deep relative paths.
e2e/tests/admin/analytics/utm-tracking.test.ts (1)
1-3: LGTM! Alias imports simplify module resolution.The migration consolidates multiple page object and helper imports using clear aliases, making dependencies more explicit.
e2e/tests/admin/analytics/overview.test.ts (1)
5-7: LGTM! Consistent alias usage.Import paths updated to match the project-wide aliasing standard. No functional changes.
e2e/tests/admin/analytics/newsletters.test.ts (1)
1-3: LGTM! Service imports properly aliased.The alias migration includes service utilities under
@helpers/services/*, maintaining a clear organizational structure.e2e/tests/admin/analytics/post-analytics/growth.test.ts (1)
6-7: LGTM! Import aliases applied correctly.Multiple page objects consolidated under
@admin-pages, simplifying dependency management.e2e/tests/post-factory.test.ts (1)
1-3: LGTM! Data factory imports properly aliased.Both runtime and type imports correctly use
@data-factory, maintaining consistency across import types.e2e/tests/public/homepage.test.ts (1)
1-2: LGTM! Public page imports correctly aliased.Appropriate use of
@public-pagesfor public-facing page objects, maintaining clear separation from admin pages.e2e/tests/admin/analytics/location.test.ts (1)
1-2: LGTM! Import alias migration is clean.The migration from relative imports to path aliases (
@admin-pages,@helpers/playwright) improves code readability and maintainability without affecting runtime behavior.e2e/tests/public/portal-loading.test.ts (1)
1-2: Import alias migration looks good.The transition to path aliases (
@helpers/pages,@helpers/playwright) maintains consistency with the project-wide alias strategy.e2e/tests/admin/analytics/growth.test.ts (1)
1-2: LGTM! Clean alias migration.Import paths successfully migrated to aliases without any functional changes.
e2e/tests/admin/settings/publication-language.test.ts (1)
1-3: LGTM! Comprehensive alias migration.Successfully migrates all three import categories (
@admin-pages,@data-factory,@helpers/playwright) demonstrating consistent adoption of the path alias system.e2e/tests/admin/analytics/web-traffic.test.ts (1)
1-2: LGTM! Import migration is correct.Path alias adoption aligns with the broader refactoring across analytics test files.
e2e/tests/admin/analytics/post-analytics/overview.test.ts (1)
6-7: LGTM! Multi-import alias migration.The import statement correctly uses path aliases for multiple page objects and test utilities.
e2e/tests/admin/members/members.test.ts (2)
1-3: LGTM! Import alias migration is correct.The migration to path aliases (
@helpers/pages,@data-factory,@helpers/playwright) is consistent with the project-wide refactoring.
20-20: Non-null assertions are justified—the factory always guarantees non-null values.The MemberFactory's
buildDefaultMember()method always generates non-null values for bothname(viafaker.person.firstName()+faker.person.lastName()) andnote(viafaker.lorem.sentence()). While the Member interface defines these fields as nullable (string | null), the factory implementation ensures they're never null at runtime. The test case callsmemberFactory.build({email: '...'})without overriding these fields, so they retain their guaranteed non-null default values.Likely an incorrect or invalid review comment.
e2e/tsconfig.json (2)
30-37: Path alias configuration verified successfully.All path mappings resolve correctly:
- ✓ @admin-pages →
e2e/helpers/pages/admin/index- ✓ @public-pages →
e2e/helpers/pages/public/index- ✓ @portal-pages →
e2e/helpers/pages/portal/index- ✓ @helpers/* →
e2e/helpers/(environment, playwright, pages, utils, services)- ✓ @data-factory →
e2e/data-factory/index.ts
115-115: Theexcludefield narrowing is not problematic.The
includefield explicitly specifies what gets compiled:["helpers/**/*", "tests/**/*", "data-factory/**/*", "types.d.ts"]. When TypeScript evaluates bothincludeandexclude, it first applies the include patterns to create the compilation list, then removes items matching exclude. This means the explicitincludefield controls what actually gets compiled, regardless of how theexcludefield is configured. Theexclude: ["node_modules"]is a standard safety measure. No unintended files are currently included in compilation, and the configuration follows TypeScript best practices.e2e/tests/admin/tags/list.test.ts (2)
2-4: Path aliases are properly configured in tsconfig.json.Verification confirms that tsconfig.json includes all required path mappings for the imports used in this file:
@admin-pages→./helpers/pages/admin/index@data-factory→./data-factory/index.ts@helpers/*→./helpers/*(covers@helpers/playwright)
1-4: Module alias imports are correctly configured.All alias paths defined in e2e/tsconfig.json correctly resolve to their target modules:
@admin-pages→e2e/helpers/pages/admin/index.ts@data-factory→e2e/data-factory/index.ts@helpers/playwright→e2e/helpers/playwright/index.tsThe baseUrl is properly set to
./, and all target paths exist. TypeScript module resolution is correctly configured.
| import {expect, test} from '@helpers/playwright'; | ||
|
|
||
| import {MemberFactory, createMemberFactory} from '../../../data-factory'; | ||
| import {MembersPage} from '../../../helpers/pages'; | ||
| import {MemberFactory, createMemberFactory} from '@data-factory'; | ||
| import {MembersPage} from '@helpers/pages'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Verify the @helpers/pages import path.
Lines 3-4 import from @data-factory and @helpers/pages. Most other admin tests in this PR import page objects from @admin-pages, but this uses @helpers/pages for MembersPage. This might be intentional if there's a different export structure, but please confirm this is the correct alias.
🏁 Script executed:
#!/bin/bash
# Verify MembersPage is exported from the correct alias location
# Check if MembersPage exists in both locations or just one
echo "Checking for MembersPage exports:"
rg -n "export.*MembersPage" e2e/helpers/pages/Length of output: 129
🏁 Script executed:
#!/bin/bash
# Check TypeScript/alias configuration to understand path mappings
echo "=== Looking for tsconfig or path alias configuration ==="
find e2e -name "tsconfig*.json" -o -name "jest.config.*" | head -20
echo ""
echo "=== Checking for path aliases in tsconfig.json (if exists) ==="
fd -n "tsconfig.json$" | xargs cat 2>/dev/null | grep -A 20 '"paths"'
echo ""
echo "=== Checking if @admin-pages alias exists and what it exports ==="
rg -n "export.*MembersPage" --type ts | grep -i admin
echo ""
echo "=== Verify the imports in the test file itself ==="
cat e2e/tests/admin/members/export.test.ts | head -10Length of output: 964
🏁 Script executed:
#!/bin/bash
# Read tsconfig to understand path aliases
echo "=== Path aliases in e2e/tsconfig.json ==="
cat e2e/tsconfig.json | grep -A 30 '"paths"'
echo ""
echo "=== Check for @admin-pages usage in other admin tests ==="
rg -n "@admin-pages" e2e/tests/admin/ -A 2
echo ""
echo "=== Check what @helpers/pages actually exports ==="
ls -la e2e/helpers/pages/Length of output: 8563
🏁 Script executed:
#!/bin/bash
echo "=== e2e/helpers/pages/index.ts ==="
cat e2e/helpers/pages/index.ts
echo ""
echo "=== e2e/helpers/pages/admin/index.ts ==="
cat e2e/helpers/pages/admin/index.ts
echo ""
echo "=== Check if MembersPage is exported from admin/index.ts ==="
grep -n "MembersPage" e2e/helpers/pages/admin/index.tsLength of output: 514
🏁 Script executed:
#!/bin/bash
echo "=== e2e/helpers/pages/admin/members/index.ts ==="
cat e2e/helpers/pages/admin/members/index.tsLength of output: 119
Change the import from @helpers/pages to @admin-pages for consistency.
Both paths technically work due to re-exports, but all other admin tests consistently import page objects from @admin-pages (verified across 15+ admin test files). Using @helpers/pages here breaks the established convention and should be aligned with the pattern used throughout the codebase.
Change line 4 from:
import {MembersPage} from '@helpers/pages';
to:
import {MembersPage} from '@admin-pages';
🤖 Prompt for AI Agents
In e2e/tests/admin/members/export.test.ts around lines 1 to 4, the import for
MembersPage uses the inconsistent path '@helpers/pages'; update that import to
use the admin convention by changing it to import MembersPage from
'@admin-pages' so the file matches other admin tests and the established
codebase pattern.
e2e/tests/admin/tags/list.test.ts
Outdated
| import {TagFactory, createPostFactory,createTagFactory} from '../../../data-factory'; | ||
| import {expect, test} from '../../../helpers/playwright'; | ||
| import {TagEditorPage, TagsPage} from '@admin-pages'; | ||
| import {TagFactory, createPostFactory,createTagFactory} from '@data-factory'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix missing space in import statement.
Line 3 has a formatting inconsistency where there's a missing space after the comma between createPostFactory and createTagFactory.
-import {TagFactory, createPostFactory,createTagFactory} from '@data-factory';
+import {TagFactory, createPostFactory, createTagFactory} from '@data-factory';📝 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.
| import {TagFactory, createPostFactory,createTagFactory} from '@data-factory'; | |
| import {TagFactory, createPostFactory, createTagFactory} from '@data-factory'; |
🤖 Prompt for AI Agents
In e2e/tests/admin/tags/list.test.ts around line 3, the import statement "import
{TagFactory, createPostFactory,createTagFactory} from '@data-factory';" is
missing a space after the comma between createPostFactory and createTagFactory;
update the import to include the space so it reads "... createPostFactory,
createTagFactory ..." to match formatting and linting rules.
There was a problem hiding this 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 (3)
e2e/helpers/playwright/fixture.ts (1)
2-8: Consider using consistent alias for admin pages.The import paths have been successfully migrated to aliases. However, there's an inconsistency in how admin pages are imported:
- This file uses
@/helpers/pages/admin(line 2)- Other files like
e2e/tests/admin/reset-password.test.tsuse@/admin-pagesBoth resolve correctly, but for consistency, consider standardizing on
@/admin-pagessince it's explicitly defined in tsconfig.json for this purpose.e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-web-traffic-page.ts (1)
1-1: Consider using the direct import path for consistency.This file imports AdminPage from
@/admin-pages(barrel export), while other page object files in the same module import from@/helpers/pages/admin/admin-page(direct path). For consistency within the page objects module, consider using the direct import path.Apply this diff for consistency:
-import {AdminPage} from '@/admin-pages'; +import {AdminPage} from '@/helpers/pages/admin/admin-page';e2e/tests/admin/members/members.test.ts (1)
20-21: Non-null assertions on member name/note and explicit save button click are reasonable
- The added
!onname/noteassumesMemberFactory.build/createalways supplies these fields for the flows in this file. Given that, the assertions are fine and keepfillMemberDetailsand thegetMemberByName/getMemberEmailhelpers strongly typed. If there’s any scenario where the factory may intentionally produce null/undefined names or notes, you could later switch to explicit fallbacks or refine the factory’s typing, but that’s not required for this PR.- In the “cannot create a member with invalid email” test, using
saveButton.click()instead ofsave()correctly avoids waiting for a “Saved” state that should never appear when validation fails, making the test more robust.Overall, the behavioral intent of the tests is preserved and slightly improved while aligning with the updated page object API.
Also applies to: 26-27, 37-38, 55-56, 64-65, 77-78, 89-90, 108-109
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (73)
e2e/data-factory/factories/member-factory.ts(1 hunks)e2e/data-factory/factories/post-factory.ts(1 hunks)e2e/data-factory/factories/tag-factory.ts(1 hunks)e2e/data-factory/factories/user-factory.ts(1 hunks)e2e/data-factory/persistence/adapters/api.ts(1 hunks)e2e/data-factory/persistence/adapters/knex.ts(2 hunks)e2e/eslint.config.js(3 hunks)e2e/helpers/environment/service-managers/ghost-manager.ts(1 hunks)e2e/helpers/environment/service-managers/mysql-manager.ts(1 hunks)e2e/helpers/environment/service-managers/portal-manager.ts(1 hunks)e2e/helpers/environment/service-managers/tinybird-manager.ts(1 hunks)e2e/helpers/pages/admin/admin-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/analytics-growth-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/analytics-locations-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/analytics-newsletters-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/analytics-overview-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/analytics-web-traffic-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-growth-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-page.ts(1 hunks)e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-web-traffic-page.ts(1 hunks)e2e/helpers/pages/admin/members/member-details-page.ts(2 hunks)e2e/helpers/pages/admin/members/members-page.ts(1 hunks)e2e/helpers/pages/admin/posts/post/post-editor-page.ts(1 hunks)e2e/helpers/pages/admin/posts/posts-page.ts(1 hunks)e2e/helpers/pages/admin/settings/sections/integrations-section.ts(1 hunks)e2e/helpers/pages/admin/settings/sections/labs-section.ts(1 hunks)e2e/helpers/pages/admin/settings/sections/publications-section.ts(1 hunks)e2e/helpers/pages/admin/settings/sections/staff-section.ts(1 hunks)e2e/helpers/pages/admin/settings/settings-page.ts(1 hunks)e2e/helpers/pages/admin/tags/tag-details-page.ts(1 hunks)e2e/helpers/pages/admin/tags/tags-page.ts(1 hunks)e2e/helpers/pages/admin/whats-new/whats-new-banner.ts(1 hunks)e2e/helpers/pages/admin/whats-new/whats-new-menu.ts(1 hunks)e2e/helpers/pages/base-page.ts(1 hunks)e2e/helpers/pages/portal/portal-page.ts(1 hunks)e2e/helpers/pages/public/public-page.ts(1 hunks)e2e/helpers/playwright/fixture.ts(1 hunks)e2e/helpers/playwright/flows/login.ts(1 hunks)e2e/helpers/playwright/flows/signup.ts(1 hunks)e2e/helpers/services/members-import/members-import-service.ts(2 hunks)e2e/helpers/services/settings/settings-service.ts(1 hunks)e2e/helpers/utils/setup-user.ts(1 hunks)e2e/package.json(1 hunks)e2e/tests/admin/analytics/growth.test.ts(1 hunks)e2e/tests/admin/analytics/location.test.ts(1 hunks)e2e/tests/admin/analytics/newsletters.test.ts(1 hunks)e2e/tests/admin/analytics/overview.test.ts(1 hunks)e2e/tests/admin/analytics/post-analytics/growth.test.ts(1 hunks)e2e/tests/admin/analytics/post-analytics/overview.test.ts(1 hunks)e2e/tests/admin/analytics/utm-tracking.test.ts(1 hunks)e2e/tests/admin/analytics/web-traffic.test.ts(1 hunks)e2e/tests/admin/members/export.test.ts(1 hunks)e2e/tests/admin/members/filter-actions.test.ts(1 hunks)e2e/tests/admin/members/impersonation.test.ts(2 hunks)e2e/tests/admin/members/members.test.ts(8 hunks)e2e/tests/admin/posts/post-preview.test.ts(1 hunks)e2e/tests/admin/posts/post-settings.test.ts(1 hunks)e2e/tests/admin/posts/posts.test.ts(1 hunks)e2e/tests/admin/reset-password.test.ts(1 hunks)e2e/tests/admin/settings/labs-search.test.ts(1 hunks)e2e/tests/admin/settings/publication-language.test.ts(1 hunks)e2e/tests/admin/tags/editor.test.ts(1 hunks)e2e/tests/admin/tags/list.test.ts(1 hunks)e2e/tests/admin/two-factor-auth.test.ts(1 hunks)e2e/tests/admin/whats-new.test.ts(1 hunks)e2e/tests/global.setup.ts(1 hunks)e2e/tests/global.teardown.ts(1 hunks)e2e/tests/post-factory.test.ts(1 hunks)e2e/tests/public/homepage.test.ts(1 hunks)e2e/tests/public/member-signup-types.test.ts(1 hunks)e2e/tests/public/member-signup.test.ts(1 hunks)e2e/tests/public/portal-loading.test.ts(1 hunks)e2e/tsconfig.json(2 hunks)
✅ Files skipped from review due to trivial changes (4)
- e2e/helpers/pages/admin/analytics/analytics-newsletters-page.ts
- e2e/helpers/services/members-import/members-import-service.ts
- e2e/helpers/environment/service-managers/ghost-manager.ts
- e2e/helpers/pages/admin/settings/sections/staff-section.ts
🚧 Files skipped from review as they are similar to previous changes (19)
- e2e/tests/admin/posts/post-settings.test.ts
- e2e/tests/admin/tags/list.test.ts
- e2e/tests/admin/analytics/post-analytics/overview.test.ts
- e2e/tests/admin/analytics/utm-tracking.test.ts
- e2e/tests/post-factory.test.ts
- e2e/tests/admin/posts/posts.test.ts
- e2e/tests/public/portal-loading.test.ts
- e2e/tests/admin/members/impersonation.test.ts
- e2e/tests/public/member-signup-types.test.ts
- e2e/tests/admin/analytics/overview.test.ts
- e2e/tests/admin/whats-new.test.ts
- e2e/tests/admin/analytics/post-analytics/growth.test.ts
- e2e/tests/admin/analytics/location.test.ts
- e2e/tests/public/member-signup.test.ts
- e2e/tests/admin/members/filter-actions.test.ts
- e2e/tests/admin/analytics/growth.test.ts
- e2e/tests/admin/members/export.test.ts
- e2e/tests/admin/two-factor-auth.test.ts
- e2e/tests/admin/settings/labs-search.test.ts
🧰 Additional context used
🧠 Learnings (9)
📓 Common learnings
Learnt from: niranjan-uma-shankar
Repo: TryGhost/Ghost PR: 24557
File: apps/admin-x-settings/src/components/settings/general/TimeZone.tsx:7-7
Timestamp: 2025-08-01T12:44:07.467Z
Learning: In Ghost development, PRs may depend on unpublished changes from SDK packages. When this occurs, TypeScript compilation errors for missing exports are expected and documented in the PR description until the dependency packages are published and updated. This is normal workflow for cross-repository feature development.
📚 Learning: 2025-11-05T16:42:12.989Z
Learnt from: rob-ghost
Repo: TryGhost/Ghost PR: 25356
File: apps/admin/test-utils/fixtures/query-client.tsx:17-35
Timestamp: 2025-11-05T16:42:12.989Z
Learning: In apps/admin/test-utils/fixtures/query-client.tsx, the createTestQueryClient function is intentionally duplicated from admin-x-framework to reduce external dependencies in the admin app's test utilities.
Applied to files:
e2e/helpers/pages/admin/analytics/analytics-overview-page.tse2e/tests/admin/reset-password.test.tse2e/helpers/pages/admin/posts/post/post-editor-page.tse2e/helpers/pages/admin/whats-new/whats-new-menu.tse2e/tests/admin/posts/post-preview.test.tse2e/helpers/pages/admin/members/members-page.tse2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-09-11T20:38:41.537Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 24891
File: e2e/helpers/pages/portal/SignUpSuccessPage.ts:61-67
Timestamp: 2025-09-11T20:38:41.537Z
Learning: In Playwright, page.$() is deprecated and should be replaced with page.locator(). When checking element visibility with Locator.isVisible(), the method returns false both when the element doesn't exist and when it exists but isn't visible, eliminating the need for separate null checks that were required with ElementHandle.
Applied to files:
e2e/helpers/pages/admin/tags/tag-details-page.tse2e/helpers/pages/admin/settings/sections/integrations-section.tse2e/helpers/pages/admin/whats-new/whats-new-menu.tse2e/helpers/pages/admin/settings/sections/labs-section.tse2e/helpers/pages/public/public-page.tse2e/helpers/pages/admin/analytics/analytics-locations-page.tse2e/helpers/pages/admin/whats-new/whats-new-banner.tse2e/helpers/pages/portal/portal-page.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in the Ghost ActivityPub module are covered by tests in the file `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`.
Applied to files:
e2e/tests/admin/reset-password.test.tse2e/tests/admin/tags/editor.test.tse2e/tests/admin/posts/post-preview.test.tse2e/helpers/playwright/fixture.tse2e/tests/admin/analytics/web-traffic.test.tse2e/tests/public/homepage.test.tse2e/tests/admin/members/members.test.tse2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-03-13T09:00:20.205Z
Learnt from: mike182uk
Repo: TryGhost/Ghost PR: 22471
File: apps/admin-x-activitypub/src/utils/pending-activity.ts:13-71
Timestamp: 2025-03-13T09:00:20.205Z
Learning: The pending activity utilities in Ghost's ActivityPub module are thoroughly tested in `apps/admin-x-activitypub/test/unit/utils/pending-activity.ts`, which covers `generatePendingActivityId`, `isPendingActivity`, and `generatePendingActivity` functions.
Applied to files:
e2e/tests/admin/reset-password.test.tse2e/tests/admin/tags/editor.test.tse2e/helpers/playwright/fixture.tse2e/tests/admin/analytics/web-traffic.test.tse2e/tests/admin/members/members.test.tse2e/tests/admin/settings/publication-language.test.ts
📚 Learning: 2025-05-27T18:08:00.458Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 23546
File: compose.yml:58-59
Timestamp: 2025-05-27T18:08:00.458Z
Learning: The Ghost Docker Compose setup has two independent profiles: `ghost` profile (v0, runs all apps in a single container) and `split` profile (work in progress, runs Ghost server, admin, and frontend apps in separate services). The `split` profile will eventually replace `ghost` as the default.
Applied to files:
e2e/helpers/environment/service-managers/portal-manager.tse2e/helpers/environment/service-managers/mysql-manager.ts
📚 Learning: 2025-11-03T12:33:31.093Z
Learnt from: kevinansfield
Repo: TryGhost/Ghost PR: 25320
File: apps/admin/src/layout/app-sidebar/NavHeader.tsx:10-10
Timestamp: 2025-11-03T12:33:31.093Z
Learning: The Ghost admin apps (apps/admin/**) do not use SSR, so accessing browser APIs like `navigator`, `window`, or `document` at module load time is safe and does not require typeof guards.
Applied to files:
e2e/tests/admin/tags/editor.test.tse2e/helpers/playwright/fixture.tse2e/tests/admin/analytics/web-traffic.test.ts
📚 Learning: 2025-05-27T18:08:00.458Z
Learnt from: cmraible
Repo: TryGhost/Ghost PR: 23546
File: compose.yml:58-59
Timestamp: 2025-05-27T18:08:00.458Z
Learning: Services that are dependencies for both Ghost Docker Compose profiles (`ghost` and `split`) need to include both profiles in their `profiles` configuration to ensure they start correctly under either profile.
Applied to files:
e2e/helpers/environment/service-managers/mysql-manager.ts
📚 Learning: 2025-10-21T13:04:40.040Z
Learnt from: jonatansberg
Repo: TryGhost/Ghost PR: 24967
File: apps/admin/vite.config.ts:1-8
Timestamp: 2025-10-21T13:04:40.040Z
Learning: In Vite config files (vite.config.ts, vite.config.js), __dirname can be used directly even when the package.json has "type": "module". Vite handles config file transpilation in a way that makes __dirname available, so no ESM shim (fileURLToPath/dirname) is needed.
Applied to files:
e2e/tsconfig.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Setup
- GitHub Check: Setup
- GitHub Check: Build & Push
🔇 Additional comments (50)
e2e/helpers/pages/admin/analytics/analytics-growth-page.ts (1)
1-2: Approve import refactoring - path aliases correctly configured.The alias-based imports are correctly configured. Verification confirms:
- tsconfig.json has the required
@/helpers/*path mapping configured- Both target modules exist at the expected locations
- Imports resolve correctly with baseUrl configured as
./e2e/tests/global.setup.ts (1)
1-1: LGTM - Clean alias import migration.The path alias simplifies the import and aligns with the project-wide refactoring to use centralized module resolution.
e2e/helpers/pages/base-page.ts (1)
3-3: LGTM - Consistent alias import.The alias-based import for
appConfigis consistent with the broader migration and improves module resolution clarity.e2e/helpers/pages/admin/settings/settings-page.ts (1)
1-1: LGTM - Improved import clarity.Replacing the relative path with an alias eliminates path traversal and makes the import more maintainable.
e2e/helpers/pages/admin/settings/sections/labs-section.ts (1)
1-1: LGTM - Much cleaner than deep relative paths.The alias import is a significant improvement over
../../../base-page, making the import intention clear and reducing brittleness during file moves.e2e/helpers/pages/admin/settings/sections/integrations-section.ts (1)
1-1: LGTM - Consistent with other section imports.The alias import pattern is consistent with other settings sections and improves maintainability.
e2e/tests/global.teardown.ts (1)
1-1: LGTM - Consistent with global.setup.ts.The alias import mirrors the pattern used in
global.setup.ts, maintaining consistency across the test lifecycle hooks.e2e/helpers/pages/admin/analytics/analytics-web-traffic-page.ts (1)
1-1: LGTM - Clear module resolution path.The alias import makes the AdminPage location explicit and consistent with other analytics page imports.
e2e/helpers/services/settings/settings-service.ts (1)
1-1: LGTM - Significant path simplification.The alias import dramatically simplifies the path from the deeply nested
../../../data-factory/persistence/adapters/http-clientto@/data-factory, making the dependency relationship clearer.e2e/helpers/pages/portal/portal-page.ts (1)
1-1: LGTM! Clean refactor to alias-based import.The import path update from relative to alias (
@/helpers/pages/base-page) improves code maintainability and clarity.e2e/data-factory/factories/member-factory.ts (1)
1-3: LGTM! Consistent alias usage.The migration to alias imports (
@/data-factory) aligns with the project-wide refactoring and improves import clarity.e2e/helpers/environment/service-managers/portal-manager.ts (1)
3-3: LGTM! Import path refactored to alias.The change to
@/helpers/environment/docker-composeimproves consistency with the project's new import strategy.e2e/helpers/pages/admin/settings/sections/publications-section.ts (1)
1-1: LGTM! Alias import applied correctly.The refactoring to
@/helpers/pages/base-pageis consistent with the broader migration effort.e2e/helpers/environment/service-managers/mysql-manager.ts (1)
3-3: LGTM! Import refactored to alias.The migration to
@/helpers/environment/docker-composemaintains consistency across service managers.e2e/helpers/playwright/flows/signup.ts (1)
2-3: LGTM! Multiple imports refactored to aliases.The updates to
@/helpers/pages/publicand@/helpers/pages/portalimprove readability and align with the project's import strategy.e2e/tests/admin/analytics/newsletters.test.ts (1)
1-3: LGTM! Test imports updated to aliases.The refactoring to
@/admin-pages,@/helpers/services/members-import, and@/helpers/playwrightmakes the test imports cleaner and more maintainable.e2e/data-factory/factories/tag-factory.ts (1)
1-3: LGTM! Factory imports migrated to alias.The consistent use of
@/data-factoryfor bothFactoryand utility functions aligns with the project-wide refactoring effort.e2e/eslint.config.js (1)
5-5: ESLint no-relative-imports plugin wiring matches the alias strategyImporting
eslint-plugin-no-relative-import-paths, registering it underplugins, and configuringno-relative-import-paths/no-relative-import-pathswithallowSameFolder: true,rootDir: './', andprefix: '@'is consistent with the new alias usage and should enforce the intended constraints on relative imports.Please ensure the updated config passes the e2e ESLint run in CI so we know the plugin is resolved correctly and doesn’t conflict with existing overrides.
Also applies to: 34-36, 50-53
e2e/helpers/pages/admin/admin-page.ts (1)
1-1: AdminPage now imports BasePage via alias (no behavior change)Switching to
@/helpers/pages/base-pagekeeps this page object aligned with the new alias scheme without changing runtime behavior.e2e/tests/admin/tags/editor.test.ts (1)
1-2: Tag editor tests updated to use alias-based importsUsing
@/admin-pagesfor page objects and@/helpers/playwrightfor the test harness keeps these tests consistent with the new alias configuration while preserving their behavior.e2e/helpers/pages/admin/tags/tags-page.ts (1)
1-1: TagsPage now extends AdminPage via alias pathUpdating the AdminPage import to
@/helpers/pages/admin/admin-pagematches the alias usage across admin page objects and doesn’t alter the page’s logic.e2e/helpers/pages/admin/tags/tag-details-page.ts (1)
1-1: TagDetailsPage AdminPage import aligned with alias-based structureThe switch to
@/helpers/pages/admin/admin-pagealigns this file with the shared alias pattern; all locators and methods remain unchanged.e2e/helpers/pages/admin/posts/posts-page.ts (1)
1-1: LGTM! Import path updated to use path alias.The import path change from relative to alias-based resolution aligns with the PR objective to standardize module imports across the e2e test suite.
e2e/helpers/pages/admin/posts/post/post-editor-page.ts (1)
1-2: LGTM! Import paths updated to use path aliases.The migration from relative imports to alias-based imports for AdminPage and BasePage is consistent with the project-wide standardization effort.
e2e/tsconfig.json (2)
30-37: LGTM! Path mappings configured correctly.The baseUrl and paths configuration properly enables the alias-based imports used throughout the e2e test suite. The mappings cover all necessary module categories:
- Page objects (@/admin-pages, @/public-pages, @/portal-pages)
- Helpers (@/helpers/*)
- Data factory (@/data-factory)
115-115: LGTM! Narrowed exclude is safe with explicit include.Limiting the exclude to only
node_modulesis appropriate since theincludearray already explicitly defines which directories to process (helpers, tests, data-factory, types.d.ts).e2e/helpers/playwright/flows/login.ts (1)
1-1: LGTM! Import path updated to use path alias.The migration from relative import to
@/helpers/pagesalias is consistent with the project-wide standardization effort.e2e/helpers/environment/service-managers/tinybird-manager.ts (1)
5-6: LGTM! Import paths updated to use path aliases.The migration from relative imports to alias-based imports for DockerCompose and ensureDir utilities is consistent with the project-wide standardization effort.
e2e/tests/admin/reset-password.test.ts (1)
1-5: LGTM! Import paths updated to use path aliases.The migration from relative imports to alias-based imports is consistent with the PR objective. The use of
@/admin-pagesfor page objects and@/helpers/*for utilities follows the configured path mappings in tsconfig.json.e2e/data-factory/persistence/adapters/api.ts (1)
2-2: LGTM! Import path updated to use path alias.The migration from relative import to
@/data-factoryalias is consistent with the tsconfig path mapping that resolves to./data-factory/index.ts.e2e/helpers/pages/public/public-page.ts (1)
1-1: LGTM! Clean alias import.The import path has been successfully updated to use the TypeScript path alias, improving import clarity and maintainability.
e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-page.ts (1)
1-1: LGTM! Alias import correctly applied.The AdminPage import now uses the path alias, consistent with the project-wide migration.
e2e/helpers/pages/admin/analytics/analytics-overview-page.ts (1)
1-2: LGTM! Both imports updated to aliases.Both AdminPage and BasePage now use path aliases, maintaining consistency across the codebase.
e2e/data-factory/factories/user-factory.ts (1)
1-1: LGTM! Factory import uses alias.The import successfully migrates to the @/data-factory alias pattern.
e2e/helpers/pages/admin/analytics/analytics-locations-page.ts (1)
1-1: LGTM! Alias import applied.The AdminPage import correctly uses the path alias.
e2e/helpers/pages/admin/whats-new/whats-new-banner.ts (1)
1-1: LGTM! Import updated to alias.The AdminPage import now uses the path alias, maintaining consistency.
e2e/tests/public/homepage.test.ts (1)
1-2: LGTM! Test imports updated to aliases.Both imports now use path aliases (@/public-pages and @/helpers/playwright), making the test module resolution clearer and more maintainable.
e2e/package.json (1)
37-37: I need to fix the jq syntax error and retry the npm registry query. Let me run corrected scripts:I found conflicting version information. Let me verify which version is actually latest:
Version 1.6.1 is valid and has no known security vulnerabilities.
Version 1.6.1 is published on npm and is publicly available with 0 dependencies and 70 dependents. The GitHub security advisory query found no known vulnerabilities for this package. The version constraint
^1.6.1is appropriate for development dependencies, allowing compatible minor and patch updates while maintaining stability.e2e/data-factory/factories/post-factory.ts (1)
1-3: LGTM! Clean migration to path aliases.The import paths have been correctly updated to use the
@/data-factoryalias, making imports clearer and more maintainable.e2e/helpers/pages/admin/analytics/post-analytics/post-analytics-growth-page.ts (1)
1-1: LGTM! Import alias correctly applied.The AdminPage import has been properly updated to use the path alias.
e2e/helpers/pages/admin/whats-new/whats-new-menu.ts (1)
1-1: LGTM! Consistent alias usage.Import path properly updated to use the alias.
e2e/helpers/pages/admin/members/members-page.ts (1)
1-2: LGTM! Multiple imports cleanly migrated to aliases.Both AdminPage and BasePage imports have been correctly updated to use path aliases.
e2e/tests/admin/posts/post-preview.test.ts (1)
1-3: LGTM! Test imports properly migrated to aliases.All test imports have been correctly updated to use the appropriate path aliases, with barrel exports used for page objects and utilities.
e2e/helpers/utils/setup-user.ts (1)
2-2: LGTM! Data factory import correctly aliased.The import has been properly updated to use the
@/data-factoryalias.e2e/tests/admin/settings/publication-language.test.ts (1)
1-3: LGTM! Test imports cleanly migrated to aliases.All imports have been correctly updated to use path aliases, with appropriate use of barrel exports for page objects and utilities.
e2e/tests/admin/analytics/web-traffic.test.ts (1)
1-2: Alias imports for analytics web-traffic test look goodUsing
@/admin-pagesand@/helpers/playwrightkeeps the test consistent with the new alias-based structure; no behavioral changes introduced.e2e/helpers/pages/admin/members/member-details-page.ts (2)
1-2: MemberDetailsPage now correctly uses alias-based importsImporting
AdminPageandBasePagevia@/helpers/pages/...aligns this page object with the alias configuration used elsewhere in e2e helpers.
34-35: Whitespace change is fine and improves groupingThe added blank line between
newsletterSubscriptionTogglesand the save-related locators slightly improves readability by separating content locators from action buttons.e2e/data-factory/persistence/adapters/knex.ts (1)
1-71: KnexPersistenceAdapter now sources PersistenceAdapter via alias without behavior changesSwitching
PersistenceAdapterto import from@/data-factorykeeps this adapter aligned with the new alias scheme while preserving the existing CRUD behavior around Knex; the contract and method semantics remain the same.e2e/tests/admin/members/members.test.ts (1)
1-3: Members e2e tests successfully migrated to alias importsUsing
@/helpers/pages,@/data-factory, and@/helpers/playwrightmatches the alias strategy elsewhere in the e2e suite and keeps imports concise and consistent.
what
why