Skip to content

Conversation

@Reversean
Copy link
Member

Closes #136

Created and configured packages/svelte workspace as module for implementing Svelte integration utilities in future.

@Reversean Reversean marked this pull request as ready for review December 12, 2025 07:55
{
"name": "@hawk.so/svelte",
"version": "1.0.0",
"description": "Svelte/SvelteKit integration for hawk.javascript SDK",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"description": "Svelte/SvelteKit integration for hawk.javascript SDK",
"description": "Svelte/SvelteKit integration for Hawk Error Tracker",

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@@ -0,0 +1,3 @@
# Hawk SDK for Svelte

This package is a wrapper around `@hawk.so/javascript` for better integration with SvelteKit applications.
Copy link
Member

Choose a reason for hiding this comment

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

provide install & usage instructions instead

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

"name": "@hawk.so/javascript",
"type": "commonjs",
"version": "3.2.11",
"private": true,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure that this is a correct options in current setup, because @hawk.so/javascript is not a private package.

Copy link
Member Author

@Reversean Reversean Dec 17, 2025

Choose a reason for hiding this comment

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

@Reversean Reversean force-pushed the feature/svelte-integration-base branch from 5771ae4 to c2abe1d Compare December 17, 2025 20:36
@Reversean Reversean requested a review from neSpecc December 17, 2025 20:38
Comment on lines 6 to 7
// Just verification that main sources may be used in current workspace
// TODO: should be replaced with actual code during further implementation
Copy link
Member

Choose a reason for hiding this comment

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

Are these docs still actual?

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought there would be something else here to make Hawk work in svelte, but it looks like just HawkCatcher is enough, so I think these comments are no longer needed.

@@ -0,0 +1,9 @@
/**
* @hawk.so/javascript-svelte
* Svelte/SvelteKit integration for Hawk.so JavaScript error tracker
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* Svelte/SvelteKit integration for Hawk.so JavaScript error tracker
* Svelte/SvelteKit integration for Hawk Error Tracker

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

"build": "vite build"
},
"dependencies": {
"@hawk.so/javascript": "file:../.."
Copy link
Member

Choose a reason for hiding this comment

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

seems strange, is it production ready?

Copy link
Member Author

Choose a reason for hiding this comment

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

Not sure if the new version is ok?

@@ -0,0 +1,23 @@
# Hawk JavaScript Catcher: Svelte Integration
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
# Hawk JavaScript Catcher: Svelte Integration
# Hawk SDK for Svelte

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Install package:

```shell
npm install @hawk.so/javascript --save
Copy link
Member

Choose a reason for hiding this comment

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

why not @hawk.so/svelte?

Copy link
Member Author

Choose a reason for hiding this comment

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

My mistake, changed to suggested variant.


## Usage

Install package:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Install package:
**1. Install package:**

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.


Svelte is supported out of the box. Initialize HawkCatcher in app's client hooks.

Create or update `src/hooks.client.ts`:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Create or update `src/hooks.client.ts`:
**2. Create or update `src/hooks.client.ts`:**

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

Create or update `src/hooks.client.ts`:

```ts
import HawkCatcher from '@hawk.so/javascript';
Copy link
Member

Choose a reason for hiding this comment

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

same

Suggested change
import HawkCatcher from '@hawk.so/javascript';
import Hawk from '@hawk.so/svelte';
new Hawk({...})

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

build: {
lib: {
entry: path.resolve(__dirname, 'src', 'index.ts'),
name: 'HawkSvelte',
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
name: 'HawkSvelte',
name: 'Hawk',

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@Reversean Reversean force-pushed the feature/svelte-integration-base branch 2 times, most recently from 5ea753a to 46191a0 Compare December 26, 2025 09:41
@Reversean Reversean changed the base branch from master to refactor/javascript-workspace December 26, 2025 10:36
@Reversean Reversean force-pushed the refactor/javascript-workspace branch from 7423619 to 38bf990 Compare December 26, 2025 13:13
- Create packages/svelte with TypeScript and Vite configuration
- Configure workspace
- Add minimal package structure with build support
@Reversean Reversean force-pushed the feature/svelte-integration-base branch from 46191a0 to 9fe6394 Compare December 26, 2025 13:24
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.

Svelte/SvelteKit integration package

3 participants