Skip to content

Commit a2b0e17

Browse files
committed
Misc changes
[skip ci] only run on LTS to save on billable time [skip ci] update docs [skip ci] remove eslint-disable comments [skip ci] convert some files to ESM [skip ci] clean dependabot config
1 parent b48fbff commit a2b0e17

21 files changed

Lines changed: 21 additions & 32 deletions

.github/dependabot.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,7 @@ updates:
33
- package-ecosystem: npm
44
directory: "/."
55
schedule:
6-
interval: daily
6+
interval: weekly
77
open-pull-requests-limit: 99
88
assignees:
99
- HugoDF
10-
ignore:
11-
- dependency-name: xo
12-
versions:
13-
- 0.38.1
14-
- 0.38.2
15-
- dependency-name: y18n
16-
versions:
17-
- 4.0.1

.github/workflows/nodejs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ jobs:
88

99
strategy:
1010
matrix:
11-
node-version: [lts/*, 21.x]
11+
# node-version: [lts/*, 21.x]
12+
node-version: [lts/*]
1213

1314
steps:
1415
- uses: actions/checkout@v4

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@
1212

1313
## npm scripts
1414

15-
- `npm run test` will run passing test suites
15+
- `npm run test` will run the core test suite
16+
- `npm run test:all` will all the test commands
17+
- `npm run test:seq` will run the core test suite with 1 concurrency
18+
- `npm run test:par` will run the core test suite with 5 concurrency
19+
- `npm run test:only` will run the `.only.js` test suite (demonstrating how to use `.only`)
1620
- `npm run test:failing` will run test suites with failing tests
17-
- `npm run format` will run `prettier -w` on all the examples files (and tests).
21+
- `npm run lint` will run `biome lint` on example tests
22+
- `npm run format` will run `biome format` on examples tests.
1823

1924
## LICENSE
2025

jsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"include": ["./src/*.js"],
2+
"include": ["./src/*.js", "src/*.cjs"],
33
"compilerOptions": {
44
"checkJs": true
55
}

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"test": "node --test ./src/migrated/*.test.js",
77
"dev": "node --test --watch ./src/migrated/*.test.js",
88
"test:all": "npm t && npm run test:only && npm run test:seq && npm run test:par",
9-
"test:seq": "node --test --test-only --test-concurrency=1 ./src/migrated/*.test.js",
10-
"test:par": "node --test --test-only --test-concurrency=5 ./src/migrated/*.test.js",
9+
"test:seq": "node --test --test-concurrency=1 ./src/migrated/*.test.js",
10+
"test:par": "node --test --test-concurrency=5 ./src/migrated/*.test.js",
1111
"test:only": "node --test --test-only src/migrated/*.only.js",
1212
"test:failing": "node --test src/migrated/*.failing.js && echo 'Error: test run should fail' && exit 1 || echo 'Success: test run failed as expected' && exit 0",
1313
"lint": "biome lint --apply ./src/migrated",

src/02.04-model-mock.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
jest.mock("sequelize");
2-
const Model = require("./02.04-model");
2+
import Model from "./02.04-model";
33

44
test("It should not throw when passed a model containing an empty list of meetings", () => {
55
const model = new Model();

src/02.04-model.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
/* eslint-disable prettier/prettier */
2-
const { Model } = require("sequelize");
1+
import { Model } from "sequelize";
32

43
class MyModel extends Model {
54
static init() {
@@ -20,4 +19,4 @@ class MyModel extends Model {
2019
}
2120
}
2221

23-
module.exports = MyModel;
22+
export default MyModel;

src/03.01-commonjs-mock.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ jest.mock("./03.01-db", () => ({
33
set: jest.fn(),
44
}));
55

6-
const mockDb = require("./03.01-db");
7-
const { addTodo, getTodo } = require("./03.01-lib.cjs");
6+
import mockDb from "./03.01-db.js";
7+
import { addTodo, getTodo } from "./03.01-lib.cjs";
88

99
test("CommonJS > addTodo > inserts with new id", async () => {
1010
await addTodo({ name: "new todo" });

src/03.01-db.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export default {};

src/03.01-lib.cjs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const db = require("./03.01-db");
1+
import db from "./03.01-db.js";
22

33
const keyPrefix = "todos";
44
const makeKey = (key) => `${keyPrefix}:${key}`;

0 commit comments

Comments
 (0)