-
Notifications
You must be signed in to change notification settings - Fork 4
Draft: Javascript package decomposition #153
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
Draft
Reversean
wants to merge
5
commits into
master
Choose a base branch
from
refactor/javascript-package-decomposition
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b6e4b29
chore(yarn): yarn version upgraded to 4.12.0
Reversean 5220d8c
ci(workspaces): fix actions/setup-node to use correct versions of nod…
Reversean 669e280
refactor(javascript): add core package
Reversean 980285c
refactor(javascript): add browser package
Reversean e8010d5
refactor(javascript): remove javascript package
Reversean 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| nodeLinker: node-modules |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...ages/javascript/src/modules/fetchTimer.ts → packages/browser/src/modules/fetchTimer.ts
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
2 changes: 1 addition & 1 deletion
2
packages/javascript/src/modules/socket.ts → packages/browser/src/modules/socket.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,40 @@ | ||
| { | ||
| "name": "@hawk.so/core", | ||
| "version": "1.0.0", | ||
| "description": "Core utilities for Hawk.so error tracking SDKs", | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "main": "./dist/hawk-core.umd.js", | ||
| "module": "./dist/hawk-core.mjs", | ||
| "types": "dist/index.d.ts", | ||
| "exports": { | ||
| ".": { | ||
| "types": "./dist/index.d.ts", | ||
| "import": "./dist/hawk-core.mjs", | ||
| "require": "./dist/hawk-core.umd.js" | ||
| } | ||
| }, | ||
| "scripts": { | ||
| "build": "vite build" | ||
| }, | ||
| "repository": { | ||
| "type": "git", | ||
| "url": "git+https://github.com/codex-team/hawk.javascript.git", | ||
| "directory": "packages/core" | ||
| }, | ||
| "author": { | ||
| "name": "CodeX", | ||
| "email": "team@codex.so" | ||
| }, | ||
| "license": "AGPL-3.0-only", | ||
| "bugs": { | ||
| "url": "https://github.com/codex-team/hawk.javascript/issues" | ||
| }, | ||
| "homepage": "https://github.com/codex-team/hawk.javascript#readme", | ||
| "devDependencies": { | ||
| "@hawk.so/types": "0.5.2", | ||
| "vite": "^7.3.1", | ||
| "vite-plugin-dts": "^4.2.4" | ||
| } | ||
| } |
File renamed without changes.
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 @@ | ||
| /** | ||
| * @hawk.so/core | ||
| * | ||
| * Core utilities for Hawk.so error tracking SDKs | ||
| * Environment-agnostic code that can be used in browser and server environments | ||
| */ | ||
|
|
||
| export { EventRejectedError } from './errors'; | ||
| export { default as Sanitizer } from './modules/sanitizer'; | ||
| export { isErrorProcessed, markErrorAsProcessed } from './utils/event'; | ||
| export { validateUser, validateContext } from './utils/validation'; | ||
| export { default as log } from './utils/log'; |
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
File renamed without changes.
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
File renamed without changes.
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,11 @@ | ||
| { | ||
| "extends": "../../tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "dist", | ||
| "rootDir": "src", | ||
| "baseUrl": "." | ||
| }, | ||
| "include": [ | ||
| "src/**/*" | ||
| ] | ||
| } |
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,56 @@ | ||
| import path from 'path'; | ||
| import dts from 'vite-plugin-dts'; | ||
| import { defineConfig } from 'vite'; | ||
|
|
||
| import license from 'rollup-plugin-license'; | ||
|
|
||
| import * as pkg from './package.json'; | ||
|
|
||
| const NODE_ENV = process.argv.mode || 'development'; | ||
| const VERSION = pkg.version; | ||
|
|
||
| export default defineConfig(() => { | ||
| return { | ||
| build: { | ||
| copyPublicDir: false, | ||
| lib: { | ||
| entry: path.resolve(__dirname, 'src', 'index.ts'), | ||
| name: 'HawkCore', | ||
| fileName: 'hawk-core', | ||
| }, | ||
| rollupOptions: { | ||
| plugins: [ | ||
| license({ | ||
| thirdParty: { | ||
| allow: { | ||
| test: (dependency) => { | ||
| // Return false for unlicensed dependencies. | ||
| if (!dependency.license) { | ||
| return false; | ||
| } | ||
|
|
||
| // Allow MIT and Apache-2.0 licenses. | ||
| return ['MIT', 'Apache-2.0'].includes(dependency.license); | ||
| }, | ||
| failOnUnlicensed: true, | ||
| failOnViolation: true, | ||
| }, | ||
| output: path.resolve(__dirname, 'dist', 'vendor.LICENSE.txt'), | ||
| }, | ||
| }), | ||
| ], | ||
| }, | ||
| }, | ||
|
|
||
| define: { | ||
| 'NODE_ENV': JSON.stringify(NODE_ENV), | ||
| 'VERSION': JSON.stringify(VERSION), | ||
| }, | ||
|
|
||
| plugins: [ | ||
| dts({ | ||
| tsconfigPath: './tsconfig.json', | ||
| }), | ||
| ], | ||
| }; | ||
| }); |
This file was deleted.
Oops, something went wrong.
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.
I think this file is bloated and a significant part of it can be reusable as a core module.
type(protected),context,user,getIntegrationId, getRelease, getType, getRawData, etc can be moved there.StackParser, etc