Skip to content

Conversation

@daniloc
Copy link
Collaborator

@daniloc daniloc commented May 27, 2025

This pull:

@daniloc daniloc requested a review from joshsny May 27, 2025 16:23
Copy link
Collaborator

@joshsny joshsny left a comment

Choose a reason for hiding this comment

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

Love it - left a couple small comments to address - looking forward getting this improvement shipped!


When we make improvements to this process, these are available instantly to all users of the wizard, no training delays or other ambiguity.

## Testing locally
Copy link
Collaborator

Choose a reason for hiding this comment

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

💖

Copy link
Collaborator

Choose a reason for hiding this comment

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

You can also use pnpm try if you don't want to rebuild each time :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh get this: doesn't work if we need to detect a version as in instrumentation-client. Gotta actually build and run it from the directory

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Unless I'm holding it wrong?

Copy link
Collaborator

Choose a reason for hiding this comment

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

sorry that was very poorly documented, you can do pnpm try --install-dir=e2e-tests/test-applications/nextjs-app-router-test-app for running in an app and that should work without a build :)

Copy link
Collaborator Author

@daniloc daniloc Jun 3, 2025

Choose a reason for hiding this comment

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

Okay that works!

if I drag and drop a folder into the CLI, as in

pnpm try --install-dir='/Users/daniloc/Documents/Dev/wizard/e2e-tests/test-applications/nextjs-app-router-test-app'

I get an error. an issue escaping the quotes that are auto populated maybe?

daniloc@DAir wizard % pnpm try --install-dir='/Users/daniloc/Documents/Dev/wizard/e2e-tests/test-applications/nextjs-app-router-test-app'

> @posthog/wizard@1.2.2 try /Users/daniloc/Documents/Dev/wizard
> ts-node bin.ts --install-dir\=/Users/daniloc/Documents/Dev/wizard/e2e-tests/test-applications/nextjs-app-router-test-app

┌  Welcome to the PostHog setup wizard ✨
│
■  Could not find package.json. Make sure to run the wizard in the root of your app!
│
└  Wizard setup cancelled.

Copy link
Collaborator

Choose a reason for hiding this comment

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

hmm does it work without the quotes?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

path resolution bug; will patch

@daniloc daniloc merged commit aed8bf1 into main Jun 3, 2025
6 checks passed
joshsny added a commit that referenced this pull request Jun 6, 2025
daniloc added a commit that referenced this pull request Oct 27, 2025
* Use history_change instead of a manual pageview function call

* Add docs for instrumentation-client and logic to select

* Update next wizard for instrumentation-client file

* Update readme with local testing guidance

* Move testing content

* Fix comment

* Prettier

* const (okay face)

* 😑

* Add instrumentation-client test app

* Update output message

* Remove stray import

* Allow absolute paths as --install-dir values

* Update readme

* Make it copyable

* well that didn’t help
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