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.

package.json Outdated
"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
- Create packages/svelte with TypeScript and Vite configuration
- Configure workspace to use local @hawk.so/javascript sources
- Add minimal package structure with build support
@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?

@@ -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

"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?

@@ -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

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?


## 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:**


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`:**

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({...})

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',

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