Skip to content

Commit

Permalink
Merge branch '158-no-unreachable' into 158-no-useless-catch
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran committed May 1, 2024
2 parents 7a300fa + 72264da commit f86dd17
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 15 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,19 @@ jobs:
- 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:
fetch-depth: 0
# 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
Expand Down
File renamed without changes.
20 changes: 10 additions & 10 deletions examples/express-sample/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
var express = require('express');
var express = require("express");
var router = express.Router();

/* GET home page. */
router.get('/', function(req, res, next) {
res.render('index', {
title: 'Express'
});
router.get("/", function (req, res, next) {
res.render("index", {
title: "Express",
});
});

router.get('/error', function(req, res, next) {
// Call an object that doesn't exist to send an error to Raygun
fakeObject.FakeMethod();
res.send(500);
router.get("/error", function (req, res, next) {
// Call an object that doesn't exist to send an error to Raygun
fakeObject.FakeMethod();
res.send(500);
});

module.exports = router;
module.exports = router;
6 changes: 3 additions & 3 deletions examples/express-sample/routes/users.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var express = require('express');
var express = require("express");
var router = express.Router();

/* GET users listing. */
router.get('/', function(req, res, next) {
res.send('respond with a resource');
router.get("/", function (req, res, next) {
res.send("respond with a resource");
});

module.exports = router;
1 change: 0 additions & 1 deletion lib/raygun.sync.worker.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import fs from "fs";

import * as transport from "./raygun.transport";
import { SendOptions, SendOptionsWithoutCB } from "./types";
import { IncomingMessage } from "http";
Expand Down
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,16 @@
"CHANGELOG.md"
],
"scripts": {
"//eslint": "performs static analysis over project files and examples",
"eslint": "eslint --fix lib/*.ts test/*.js examples/**/*.js",

"//prettier": "performs code formatting over project files and examples",
"prettier": "prettier --write lib/*.ts test/*.js examples/**/*.js",

"//prepare": "prepare project for distribution",
"prepare": "tsc",

"//test": "runs tests on main project",
"test": "tap --node-arg=-r --node-arg=ts-node/register --disable-coverage test/*_test.js"
},
"devDependencies": {
Expand Down

0 comments on commit f86dd17

Please sign in to comment.