Skip to content
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

chore: Release 0.14.0 #182

Merged
merged 27 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
783b3b2
ci: Create node.js.yml (#142)
miquelbeltran Apr 24, 2024
5ea3a32
Merge branch 'master' into develop
miquelbeltran Apr 24, 2024
af925a2
fix: Updating dependencies and fixes (#144)
miquelbeltran Apr 24, 2024
60eccc4
Adding PR, bug report and feature request templates.
TheRealAgentK Apr 24, 2024
8f06ec3
Update pull_request_template.md
TheRealAgentK Apr 25, 2024
cfe701a
Update .github/bug_report.md
TheRealAgentK Apr 25, 2024
8b458bd
Update .github/bug_report.md
TheRealAgentK Apr 25, 2024
aec342f
Merge pull request #154 from MindscapeHQ/feature/#147-GH-Templates
TheRealAgentK Apr 25, 2024
1650c25
ci: #145 eslint setup (#156)
miquelbeltran Apr 29, 2024
e27c74b
chore: #148 upgrade examples (#157)
miquelbeltran Apr 29, 2024
ebdc289
ci: add PR title checks (#167)
miquelbeltran Apr 29, 2024
3bf2cc0
ci: Update dependabot.yml (#168)
miquelbeltran Apr 29, 2024
367027c
chore(deps): bump actions/checkout from 3 to 4 (#171)
dependabot[bot] Apr 29, 2024
c5d5df7
chore(deps): bump actions/setup-node from 3 to 4 (#172)
dependabot[bot] Apr 29, 2024
23c899b
chore: Move pr.yml to workflows (#175)
miquelbeltran Apr 30, 2024
de0eed9
refactor: #158 remove no-explicit-any ignore eslint rule (#159)
miquelbeltran May 1, 2024
aea993f
refactor: #158 remove no-this-alias ignore eslint rule (#160)
miquelbeltran May 1, 2024
b790fbf
refactor: #158 fix eslint rule "no-unused-vars" (#170)
miquelbeltran May 1, 2024
3def9b9
ci: #174 Prettier setup (#169)
miquelbeltran May 1, 2024
8882171
chore: #158 document why no-var-requires ignore is necessary (#173)
miquelbeltran May 1, 2024
649f2cc
refactor: #158 configure no-undef eslint rule (#176)
miquelbeltran May 1, 2024
5df7c14
refactor: #158 configure no-unreachable eslint rule (#177)
miquelbeltran May 2, 2024
881365a
refactor: #158 remove no-useless-catch eslint rule (#178)
miquelbeltran May 2, 2024
5363822
chore: Prepare for Release 0.14.0 (#179)
miquelbeltran May 2, 2024
e86a771
chore: Update package-lock.json (#180)
miquelbeltran May 2, 2024
d7d0593
chore: update package-lock.json (#183)
miquelbeltran May 2, 2024
da8b899
chore: change author name (#185)
miquelbeltran May 3, 2024
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
37 changes: 37 additions & 0 deletions .github/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Bug report
about: Bug report
title: "<Area of the SDK>: <Short Description of issue>"
labels: needs triage
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

Links to related tickets or other context are welcome here.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Environment (please complete the following information):**
- OS: [e.g. Linux/Windows/macOS etc]
- SDK version: [e.g. 10.5.2]
- Node/npm versions: [e.g. 21.7.3]

** Logs**
If applicable, include relevant logs or error messages here (please use code blocks to format properly).

**Possible Solution**
If you have suggestions for how the issue might be resolved or investigated, please describe them here.
39 changes: 39 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,46 @@
version: 2
updates:

# raygun4node
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"

# example: express
- package-ecosystem: "npm"
directory: "/examples/express-sample"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Package in example is accessed by path,
# do not update in package.json.
- dependency-name: "raygun4node"

# example: domains
- package-ecosystem: "npm"
directory: "/examples/using-domains"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
ignore:
# Package in example is accessed by path,
# do not update in package.json.
- dependency-name: "raygun4node"

# Github Actions dependencies updates config
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "chore"
include: "scope"
22 changes: 22 additions & 0 deletions .github/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
name: Feature request
about: A new feature for this SDK
title: "<Area of the SDK>: <Short Description of new feature>"
labels: needs triage
assignees: ''

---

**Please describe your new feature request**
A clear and concise description of what the problem is. Example: I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

Links to related tickets or other information are welcome here.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
55 changes: 55 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master", "develop" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
- run: npm run eslint

# Checks code formatting, fails if there are changes after applying prettier.
# Based on this example here:
# https://github.com/creyD/prettier_action?tab=readme-ov-file#example-4-dry-run
prettier:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}
# Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
persist-credentials: false

- name: Prettify code
uses: creyD/[email protected]
with:
# "dry" causes that if any file is modified, the job fails
dry: True
# "write" performs changes in place
prettier_options: --write lib/*.ts test/*.js examples/**/*.js
github_token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
37 changes: 37 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: "Pull-Request Check"

on:
pull_request:
types:
- opened
- edited
- synchronize

jobs:
main:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@v5
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:
header: pr-title-lint-error
message: |
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
# Delete a previous comment when the issue has been resolved
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
uses: marocchino/sticky-pull-request-comment@v2
with:
header: pr-title-lint-error
delete: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
yarn.lock

build/
.tap/
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.14.0
- Upgrade dependencies
- Support for Node v20

## 0.13.2
- Fix batch transport keeping process alive
- Fix batch transport stalling on huge errors
Expand Down
2 changes: 1 addition & 1 deletion LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016 Raygun Limited
Copyright (c) 2024 Raygun Limited

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ curl
All requests use the same authentication methods as the upload call (Basic Authentication and Token Authentication).

### Examples
View a screencast on creating an app with Node.js and Express.js, then hooking up the error handling and sending them at [http://raygun.io/blog/2013/07/video-nodejs-error-handling-with-raygun/](http://raygun.io/blog/2013/07/video-nodejs-error-handling-with-raygun/)
View a screencast on creating an app with Node.js and Express.js, then hooking up the error handling and sending them at [https://raygun.com/blog/2013/07/video-nodejs-error-handling-with-raygun/](https://raygun.com/blog/2013/07/video-nodejs-error-handling-with-raygun/)

### Debug Logging
You can enable logging of debug information from the Raygun client by setting the environment variable `DEBUG=raygun`. The client will then log information about transporting and storing errors, including timing information.
Expand Down
34 changes: 34 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// @ts-check

import eslint from '@eslint/js';
import tseslint from 'typescript-eslint';

export default tseslint.config(
eslint.configs.recommended,
...tseslint.configs.recommended,
{
languageOptions: {
// Add node globals to ignore undefined
globals: {
"__dirname": false,
"console": false,
"module": false,
"process": false,
"require": false,
"setTimeout": false,
}
},
rules: {
// Unused vars reported as error
"@typescript-eslint/no-unused-vars": [
"error",
{
// Do not report unused function arguments
"args": "none",
}
],
// Required to import JS modules
"@typescript-eslint/no-var-requires": "off",
}
}
);
70 changes: 39 additions & 31 deletions examples/express-sample/app.js
Original file line number Diff line number Diff line change
@@ -1,52 +1,60 @@
var config = require('config');
var config = require("config");

if (config.Raygun.Key === "YOUR_API_KEY") {
console.error("You need to set your Raygun API key in the config file");
miquelbeltran marked this conversation as resolved.
Show resolved Hide resolved
process.exit(1);
}

// Setup Raygun
var raygun = require('raygun');
var raygun = require("raygun");
var raygunClient = new raygun.Client().init({
apiKey: config.Raygun.Key
apiKey: config.Raygun.Key,
});

var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var sassMiddleware = require('node-sass-middleware');
var express = require("express");
var path = require("path");
var logger = require("morgan");
var cookieParser = require("cookie-parser");
var bodyParser = require("body-parser");
var sassMiddleware = require("node-sass-middleware");

var routes = require('./routes/index');
var users = require('./routes/users');
var routes = require("./routes/index");
var users = require("./routes/users");

var app = express();

// Set the user if we have one
raygunClient.user = function(req) {
return '[email protected]';
raygunClient.user = function (req) {
return "[email protected]";
};

// view engine setup
app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');
app.set("views", path.join(__dirname, "views"));
app.set("view engine", "ejs");

// uncomment after placing your favicon in /public
//app.use(favicon(__dirname + '/public/favicon.ico'));
app.use(logger('dev'));
app.use(logger("dev"));
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({
extended: false
}));
app.use(
bodyParser.urlencoded({
extended: false,
}),
);
app.use(cookieParser());
app.use(sassMiddleware({
src: __dirname,
dest: path.join(__dirname, 'public'),
debug: true,
outputStyle: 'compressed',
prefix: '/stylesheets'
}));
app.use(express.static(path.join(__dirname, 'public')));

app.use('/', routes);
app.use('/users', users);
app.use(
sassMiddleware({
src: __dirname,
dest: path.join(__dirname, "public"),
debug: true,
outputStyle: "compressed",
prefix: "/stylesheets",
}),
);
app.use(express.static(path.join(__dirname, "public")));

app.use("/", routes);
app.use("/users", users);

// Add the Raygun Express handler
app.use(raygunClient.expressHandler);
Expand Down
Loading
Loading