Skip to content

Client 2.0 (workspaces, esm and more) #95

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 145 commits into from
Jun 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
0f9fdce
moved src folder to packages\core\src
niemyjski Jan 16, 2021
e9d19cd
Moved tests into test folders and split out code into packages
niemyjski Jan 16, 2021
b490d93
WIP - more workspace changes
niemyjski Jan 20, 2021
608a2b6
WIP - More tsconfig changes
niemyjski Jan 21, 2021
8fb23c6
Resolved some workspace build issues
niemyjski Jan 27, 2021
89cf8cb
Fixed npm run build
niemyjski Jan 30, 2021
a3b74d6
Fixed package name
niemyjski Jan 30, 2021
b7a6939
WIP - cjs and esm builds
niemyjski Feb 9, 2021
db332fb
Updates to node imports
niemyjski Feb 9, 2021
f3412f7
Fixed build
niemyjski Feb 10, 2021
0af4355
Updates to build
niemyjski Feb 15, 2021
c68287e
Simplified build
niemyjski Feb 16, 2021
651b124
Convert to jest.
niemyjski Feb 17, 2021
94be13d
Removed cjs build. We can use esbuild later if needed
niemyjski Feb 17, 2021
e8aee10
Fixed module imports & ensure all imports have a .js extension
niemyjski Feb 17, 2021
f9fc327
Build updates
niemyjski Feb 18, 2021
c88163e
Updates to linting
niemyjski Feb 18, 2021
6688540
Added esbuild for bundle
niemyjski Feb 20, 2021
eb9775b
WIP - Express ESM Sample
niemyjski Feb 24, 2021
21de909
Removed yarn lock
niemyjski Feb 24, 2021
76fc217
Updated build
niemyjski Feb 24, 2021
5ffdeb4
Update deps
niemyjski Feb 24, 2021
4d5de7b
Browser sourcemaps + async plugins
niemyjski Feb 25, 2021
270a9e0
WIP - Submission client refactor (tests still need to be refactored)
niemyjski Feb 25, 2021
031dc2f
More test updates for new submission impl
niemyjski Feb 26, 2021
27afb31
Change models to classes and re-arrange folder structure (#96)
ejsmith Feb 26, 2021
b8a0ba6
Converted single quotes to double.
niemyjski Feb 26, 2021
c77f593
Fixed unit tests
niemyjski Feb 26, 2021
d1a74f1
Removed default client instance, Identified some perf issues via PERF…
niemyjski Mar 4, 2021
18c89b5
WIP Client bootstrapping.
niemyjski Mar 10, 2021
e4c8607
fixed unit tests
niemyjski Mar 11, 2021
3f7d82d
WIP - Reworked startup and WIP plugins.
niemyjski Mar 15, 2021
317d751
Fixed build
niemyjski Mar 15, 2021
6a9737e
WIP - Ability to suspend/resume all client timers and plugins.
niemyjski Mar 16, 2021
16213d5
Moved config services, removed node storage prefix and more
niemyjski Mar 17, 2021
fd65666
WIP Unit Test Updates
niemyjski Mar 17, 2021
0aefeca
Fixed unit tests
niemyjski Mar 18, 2021
02853cb
WIP - Simplified configuration handlers via proxies, start of integra…
niemyjski Mar 22, 2021
667c771
WIP Browser plugins
niemyjski Mar 23, 2021
b7c280c
Removed bower from readme
niemyjski Mar 23, 2021
4d4ce33
Added browser plugins
niemyjski Mar 23, 2021
9f5adcc
Added node plugins
niemyjski Mar 23, 2021
dea2976
Configuration improvements: proxy subscribers and version property
niemyjski Mar 23, 2021
dbde875
Updated extensions
niemyjski Mar 24, 2021
2fbe321
WIP - Samples
niemyjski Mar 24, 2021
8a47f13
Cleaned up configuration
niemyjski Mar 24, 2021
7415c31
Dropped lage, using npm 7.7
niemyjski Mar 24, 2021
3055cf2
Fixed browser build
niemyjski Mar 26, 2021
b1782a2
Fixed the browser and node submission client auth
niemyjski Mar 30, 2021
b0f0d55
Updated the browser sample
niemyjski Mar 30, 2021
384c386
Added support for logging client self log to text area
niemyjski Mar 30, 2021
076b715
Renamed logger
niemyjski Mar 31, 2021
13cdcaa
Fixed fetch implementation, added rate limit header support.
niemyjski Mar 31, 2021
f66a4a4
Renamed build:watch task to watch
niemyjski Mar 31, 2021
9b09259
Fixed a bug with adding plugins that only had a startup method
niemyjski Mar 31, 2021
6c4912a
Improved log messages and log levels
niemyjski Mar 31, 2021
7ec9586
Improved rate limiting to suspend until the next 15 minute time perio…
niemyjski Mar 31, 2021
af003c5
Fixed an issue with the settings manager not properly handling 304 se…
niemyjski Mar 31, 2021
4782b04
Use modern error handlers and WIP on processing string errors.
niemyjski Mar 31, 2021
7e9069a
WIP Node fixes + start of storage refactor
niemyjski Apr 2, 2021
53e5799
WIP - Simplified storage
niemyjski Apr 6, 2021
521a334
Fixed storage, improved settings management
niemyjski Apr 7, 2021
779b28b
Queue now respects max items.
niemyjski Apr 9, 2021
417d58a
Added default react native expo sample
niemyjski Apr 14, 2021
1eb7fde
Updated deps
niemyjski Apr 14, 2021
b094845
package updates
niemyjski Apr 15, 2021
6b7ab5b
updated expo
niemyjski Apr 15, 2021
9abfa38
Added react package
niemyjski Apr 15, 2021
790f6c0
react package and start of example
polluterofminds Apr 16, 2021
28f253f
Deleted react-native sample. fixed deps
niemyjski Apr 16, 2021
913549c
updated react example and changed export paradigm in react package
polluterofminds Apr 20, 2021
38a7d31
Updated package version, run workspace examples after client build, l…
niemyjski Apr 21, 2021
dacadcf
read me updates and react sample
polluterofminds Apr 21, 2021
03a6227
Removed extra config from readme.
niemyjski Apr 21, 2021
6b588bb
Updated recommended extensions
niemyjski Apr 21, 2021
dd10080
added readmes
polluterofminds Apr 22, 2021
bb91924
WIP - Updated workflow to lint + push ci packages.
niemyjski Apr 22, 2021
ff1286a
added additional examples
polluterofminds Apr 27, 2021
30182b1
fixed browser example path
polluterofminds May 4, 2021
4b19c12
uncommented custom server url for express example
polluterofminds May 4, 2021
117f6b6
start of angular example
polluterofminds May 5, 2021
7ecbf50
Target ES2019 for react-native / angular
niemyjski May 6, 2021
cd31068
vue example and angular start:
polluterofminds May 6, 2021
6c9996b
Fixed issues with node-stack-trace
niemyjski May 7, 2021
7e42a13
vue error boundary work --- in progress
polluterofminds May 7, 2021
25be1f6
can't import vue package yet
polluterofminds May 7, 2021
f46477c
Add typing for event data known keys
ejsmith May 13, 2021
68a07f1
Fixed build errors, updated vue package to use global error handler.
niemyjski May 17, 2021
006f1df
removed angular 11.x sample
niemyjski May 17, 2021
e3214b1
Fixed vue example
niemyjski May 17, 2021
fe09288
removed example test
niemyjski May 17, 2021
c3f0235
Update version on build
niemyjski May 18, 2021
bbd0b7c
bring back lage for build step (build by dep order)
niemyjski May 19, 2021
84d3725
possible version fix
niemyjski May 19, 2021
86884a8
try using min version build step
niemyjski May 19, 2021
12618b3
specify github action min ver version
niemyjski May 19, 2021
4f8b061
show npm version
niemyjski May 19, 2021
19153c5
install latest npm for workspace publish support
niemyjski May 19, 2021
7c9cdf1
use 2.0 as min ver
niemyjski May 19, 2021
fcbeb4b
Attempt to publish to github registry
niemyjski May 19, 2021
5a3929a
fixed min-ver (bad docs)
niemyjski May 19, 2021
2821b5c
try to push to to gpr
niemyjski May 19, 2021
ae0be11
attempt 6
niemyjski May 19, 2021
4fcc9cf
attempt 7
niemyjski May 19, 2021
532fe4b
attempt 8
niemyjski May 19, 2021
656351d
attempt 9
niemyjski May 19, 2021
59a81eb
wip authenticating to gpr
niemyjski May 20, 2021
ec7c57a
use workflow actions to configure node.
niemyjski May 20, 2021
f16db3f
Fixed yaml
niemyjski May 20, 2021
f492ef2
Added publish section to examples
niemyjski May 20, 2021
14b2f5c
Updated deps
niemyjski May 21, 2021
4cb5b4d
Moved module service to browser plugin and cached it.
niemyjski May 21, 2021
4624236
Added simple error interface
niemyjski May 21, 2021
c7d7675
Fixed a compiler error with isolated modules.
niemyjski May 21, 2021
2f9a787
Removed request info service into plugin
niemyjski May 21, 2021
8390927
Removed environment info collector service.
niemyjski May 21, 2021
bce0746
cache node environment info
niemyjski May 21, 2021
dca4aa1
Change core client to be functional and expect fetch and localStorage…
ejsmith May 22, 2021
b533be7
Fix tests
ejsmith May 22, 2021
32deb33
Fix browser test script
ejsmith May 23, 2021
33021ec
Some build and watch changes
ejsmith May 23, 2021
df7a047
Adding node polyfills for fetch and storage
ejsmith May 23, 2021
0b6c4d7
Fix linting issues
ejsmith May 23, 2021
674dd60
Fix tests. Refactor event context.
ejsmith May 23, 2021
9ad0d13
Removed example settings
niemyjski May 24, 2021
d6fe7c6
WIP - Removed error parser service, Added default plugin for Simple E…
niemyjski May 24, 2021
3d0e9e3
Removed IEventQueue
niemyjski May 24, 2021
63efde5
Revert "Removed IEventQueue"
niemyjski May 24, 2021
48972ae
Updated deps
niemyjski May 25, 2021
42c6596
Fixed tests
niemyjski May 26, 2021
96373fc
compile with strict mode
niemyjski Jun 2, 2021
1a27422
Turned on noImplicitAny noImplicitThis noImplicitReturns noUnusedLoca…
niemyjski Jun 7, 2021
48a0b59
Turned on more linting rules + fixes
niemyjski Jun 7, 2021
7702b45
Fixed node runtime issue with calling c.useLocalStorage() on startup
niemyjski Jun 8, 2021
41cbbca
Fixed browser submission error: Failed to execute 'fetch' on 'Window…
niemyjski Jun 9, 2021
fd59c33
removed extra overload definition
niemyjski Jun 9, 2021
8e63aaf
Fixed a bug where simple error and error error plugins would be added.
niemyjski Jun 9, 2021
12ded8e
Fixed vue example
niemyjski Jun 9, 2021
c72f6a8
Fixed unit test failures when fetch is undefined
niemyjski Jun 9, 2021
eb8dd87
Temp fix for npm version --workspaces not updating package deps
niemyjski Jun 14, 2021
384ff6b
updated user agent to match package versions
niemyjski Jun 14, 2021
14c2802
Updated deps
niemyjski Jun 14, 2021
26778b0
rework build steps
niemyjski Jun 14, 2021
010d4e8
Tweaked angularjs package
niemyjski Jun 15, 2021
8ea1a1d
fixed linting issue
niemyjski Jun 15, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
"name": "Exceptionless.JavaScript",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:latest",
"extensions": [
"andys8.jest-snippets",
"dbaeumer.vscode-eslint",
"hbenl.vscode-mocha-test-adapter",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"hbenl.vscode-test-explorer",
"juancasanova.awesometypescriptproblemmatcher",
"ritwickdey.liveserver",
"ryanluker.vscode-coverage-gutters",
"streetsidesoftware.code-spell-checker"
],
Expand Down
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
78 changes: 46 additions & 32 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
module.exports = {
"env": {
"browser": true,
"es6": true,
"mocha": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"ignorePatterns": [
"node_modules",
"dist"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": "off"
}
root: true,
env: {
browser: true,
es6: true,
node: true
},
extends: [
"eslint:recommended",
"plugin:import/typescript",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
],
globals: {
MutationObserver: "readonly",
SharedArrayBuffer: "readonly",
Atomics: "readonly",
BigInt: "readonly",
BigInt64Array: "readonly",
BigUint64Array: "readonly",
},
parser: "@typescript-eslint/parser",
parserOptions: {
ecmaVersion: 2020,
sourceType: "module",
project: ["./tsconfig.eslint.json"],
tsconfigRootDir: __dirname
},
plugins: [
"@typescript-eslint",
"import",
"jest"
],
ignorePatterns: [
"dist",
"node_modules",
"example"
],
rules: {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/restrict-plus-operands": "off",
}
};
21 changes: 0 additions & 21 deletions .github/workflows/build-linux.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/build-osx.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .github/workflows/build-windows.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Build
on: [ push, pull_request ]

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
node_version:
- 16
name: Node ${{ matrix.node_version }} on ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Build Reason
run: "echo ref: ${{github.ref}} event: ${{github.event_name}}"
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://registry.npmjs.org'
- name: Install latest NPM
run: npm install -g npm@7
- name: NPM install with caching
uses: bahmutov/npm-install@v1
- name: Set Min Version
uses: thefringeninja/[email protected]
id: version
with:
minimum-major-minor: 2.0
tag-prefix: v
- name: Build Version
run: |
npm install --global replace-in-files-cli
echo "MINVERVERSIONOVERRIDE=${{steps.version.outputs.version}}" >> $GITHUB_ENV
npm run version -- ${{steps.version.outputs.version}}
replace-in-files --regex='\/(v?((\d+)\.(\d+)(\.(\d+))?)(?:-([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?(?:\+([\dA-Za-z-]+(?:\.[\dA-Za-z-]+)*))?)' --replacement=/${{steps.version.outputs.version}} packages/core/src/configuration/Configuration.ts
replace-in-files --string='2.0.0-dev' --replacement=${{steps.version.outputs.version}} packages/*/package.json
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Run Tests
run: npm test
- name: Publish Release Packages
if: startsWith(github.ref, 'refs/tags/v') && matrix.os == 'ubuntu-latest'
run: npm publish --workspaces --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Setup GitHub CI Node.js environment
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node_version }}
registry-url: 'https://npm.pkg.github.com'
scope: '@exceptionless'
- name: Push GitHub CI Packages
if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
run: npm publish --workspaces --access public
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
14 changes: 10 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@
.idea
.git
node_modules
jspm_packages
public
/dist/temp
example/exceptionless.js
bower_components
dist
*.eslintcache
*.tsbuildinfo

test-data
packages/node/test-data

yarn.lock
example/express/.exceptionless
7 changes: 6 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
{
"recommendations": [
"andys8.jest-snippets",
"davidanson.vscode-markdownlint",
"dbaeumer.vscode-eslint",
"hbenl.vscode-mocha-test-adapter",
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"firsttris.vscode-jest-runner",
"hbenl.vscode-test-explorer",
"juancasanova.awesometypescriptproblemmatcher",
"ritwickdey.liveserver",
"ryanluker.vscode-coverage-gutters",
"streetsidesoftware.code-spell-checker"
]
Expand Down
59 changes: 31 additions & 28 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,47 @@
"version": "0.2.0",
"configurations": [
{
"name": "Test",
"name": "Express",
"program": "${workspaceRoot}/example/express/app.js",
"request": "launch",
"type": "pwa-node",
"program": "${workspaceRoot}/node_modules/.bin/_mocha",
"args": [
"--colors",
"-u", "tdd",
"--timeout", "999999",
"${workspaceFolder}/src/**/*-spec.ts"
],
"runtimeArgs": [
"--require",
"ts-node/register"
"preLaunchTask": "npm: build",
"cwd": "${workspaceRoot}/example/express",
"skipFiles": [
"<node_internals>/**"
],
"internalConsoleOptions": "openOnSessionStart",
"sourceMaps": true,
"resolveSourceMapLocations": [
"${workspaceFolder}/**",
"!**/node_modules/**"
]
"type": "pwa-node"
},
{
"name": "Express",
"name": "Test",
"request": "launch",
"type": "node",
"program": "${workspaceRoot}/example/express/app.js",
"runtimeArgs": [
"--nolazy"
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"--runInBand"
],
"sourceMaps": true,
"cwd": "${workspaceRoot}",
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
},
"cwd": "${workspaceRoot}"
},
{
"name": "Attach",
"request": "attach",
"name": "Test Current File",
"request": "launch",
"type": "node",
"port": 5858,
"sourceMaps": true,
"program": "${workspaceFolder}/node_modules/.bin/jest",
"args": [
"${fileBasenameNoExtension}",
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"disableOptimisticBPs": true,
"windows": {
"program": "${workspaceFolder}/node_modules/jest/bin/jest",
},
"cwd": "${workspaceRoot}"
}
]
}
Loading