-
Notifications
You must be signed in to change notification settings - Fork 0
npm updates #227
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
Merged
Merged
npm updates #227
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a83d5a0
npm updates
michaelbonner 4b57ce6
Add playwright test
michaelbonner 9541a71
Prevent warnings about missing postcss config
michaelbonner 8fdc67f
Put all css in a layer
michaelbonner a9b7ec2
Try npm run
michaelbonner c0be13d
Fix syntax error
michaelbonner ba58f45
add baseurl
michaelbonner 6c61bbc
increase playwright webserver timeout
michaelbonner 406e98f
Update timeout to 5 mins
michaelbonner 9e8c82a
Add missing env
michaelbonner File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| PUBLIC_POSTHOG_API_KEY= | ||
| PUBLIC_POSTHOG_API_KEY= | ||
| PUBLIC_POSTHOG_ENABLED=false | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Playwright Tests | ||
| on: | ||
| push: | ||
| branches: [master] | ||
| pull_request: | ||
| branches: [master] | ||
| jobs: | ||
| test: | ||
| timeout-minutes: 60 | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: oven-sh/setup-bun@v2 | ||
| - name: Install dependencies | ||
| run: bun install | ||
| - name: Install Playwright Browsers | ||
| run: bunx playwright install --with-deps | ||
| - name: Set environment variables | ||
| run: | | ||
| echo "PUBLIC_POSTHOG_ENABLED=false" >> $GITHUB_ENV | ||
| echo "PUBLIC_POSTHOG_API_KEY=null" >> $GITHUB_ENV | ||
| - name: Run Playwright tests | ||
| run: bunx playwright test | ||
| - uses: actions/upload-artifact@v4 | ||
| if: ${{ !cancelled() }} | ||
| with: | ||
| name: playwright-report | ||
| path: playwright-report/ | ||
| retention-days: 30 | ||
| - name: Print SvelteKit logs | ||
| if: failure() | ||
| run: cat .svelte-kit/output/server/log.txt || true |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| import { expect, test } from '@playwright/test'; | ||
|
|
||
| test('can load all pages', async ({ page }) => { | ||
| await page.goto('/'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/screenshot-maker'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/pagespeed-testing'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/github-repositories-viewer-app'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/git-branch-name-raycast-extension'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/i-made-an-extension'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/getting-started-as-a-web-developer-in-2022'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/blog/set-up-some-aliases'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/uses'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
|
|
||
| await page.goto('/policies'); | ||
| await expect(page.locator('h1')).toBeVisible(); | ||
| }); |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| import { defineConfig } from '@playwright/test'; | ||
|
|
||
| export default defineConfig({ | ||
| webServer: { | ||
| command: 'bun run build && bun run preview', | ||
| port: 4173, | ||
| timeout: 5 * 60 * 1000 // 5 minutes | ||
| }, | ||
| testDir: 'e2e', | ||
| outputDir: 'playwright-report', | ||
| use: { baseURL: 'http://localhost:4173' } | ||
| }); |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| module.exports = {}; |
This file was deleted.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
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.
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.
🛠️ Refactor suggestion
Default-off toggle can back-fire if the variable is missing
In
+layout.svelteanalytics are enabled unlessPUBLIC_POSTHOG_ENABLED === 'false'.If this line is absent from a real
.envfile (easy to forget when onboarding or in CI) PostHog will be turned on unintentionally. Safer pattern:and flip the check in the Svelte file to
=== 'true'.This prevents accidental PII leakage and makes the intent crystal-clear.
📝 Committable suggestion
🧰 Tools
🪛 dotenv-linter (3.3.0)
[warning] 2-2: [EndingBlankLine] No blank line at the end of the file
🤖 Prompt for AI Agents