Skip to content

Commit d3e85d0

Browse files
chore: migrate to npm (#196)
1 parent ecee2ef commit d3e85d0

File tree

8 files changed

+12072
-6476
lines changed

8 files changed

+12072
-6476
lines changed

.babelrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

.babelrc.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use strict";
2+
3+
module.exports = {
4+
presets: [
5+
[
6+
"@babel/preset-env",
7+
{
8+
targets: {
9+
node: "current"
10+
}
11+
}
12+
]
13+
]
14+
};

.github/workflows/test.yml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,27 @@ jobs:
1818
uses: actions/setup-node@v4
1919
with:
2020
node-version: lts/*
21-
cache: yarn
22-
- run: yarn --frozen-lockfile
23-
- run: yarn lint
21+
cache: npm
22+
- run: npm ci
23+
- run: npm run lint
2424
test:
2525
strategy:
2626
fail-fast: false
2727
matrix:
2828
os: [ubuntu-latest, windows-latest, macos-latest]
29-
node-version: [6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x, 22.x, 24.x]
29+
node-version: [
30+
# Node.js@6 is fully broken for testing, npm can't install dependecies, babel is broken due broken mapping new features with Node.js version, jest breaks randomly and crashes
31+
# 6.x,
32+
8.x,
33+
10.x,
34+
12.x,
35+
14.x,
36+
16.x,
37+
18.x,
38+
20.x,
39+
22.x,
40+
24.x
41+
]
3042
runs-on: ${{ matrix.os }}
3143
steps:
3244
- uses: actions/checkout@v4
@@ -45,15 +57,15 @@ jobs:
4557
with:
4658
node-version: ${{ matrix.node-version }}
4759
architecture: ${{ steps.calculate_architecture.outputs.result }}
48-
cache: yarn
60+
cache: npm
4961
- name: Install dependencies
50-
run: yarn --frozen-lockfile --ignore-engines
51-
if: matrix.node-version == '6.x' || matrix.node-version == '8.x' || matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x' || matrix.node-version == '16.x' || matrix.node-version == '18.x'
62+
run: npm install
63+
if: matrix.node-version == '8.x' || matrix.node-version == '10.x' || matrix.node-version == '12.x' || matrix.node-version == '14.x'
5264
- name: Install dependencies
53-
run: yarn --frozen-lockfile
54-
if: matrix.node-version != '6.x' && matrix.node-version != '8.x' && matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x' && matrix.node-version != '16.x' && matrix.node-version != '18.x'
65+
run: npm ci
66+
if: matrix.node-version != '8.x' && matrix.node-version != '10.x' && matrix.node-version != '12.x' && matrix.node-version != '14.x'
5567
- name: Run tests with coverage
56-
run: yarn test --ci --coverage
68+
run: npm run test -- --ci --coverage
5769
- uses: codecov/codecov-action@v5
5870
with:
5971
flags: integration

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
package.json
2+
package-lock.json

lib/__tests__/SyncBailHook.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ describe("SyncBailHook", () => {
5555
expect(h1.call()).toBe("B");
5656
expect(mockCall1).toHaveBeenCalledTimes(1);
5757
expect(mockCall2).toHaveBeenCalledTimes(1);
58-
expect(mockCall3).toHaveBeenCalledTimes(0);
58+
expect(mockCall3).not.toHaveBeenCalled();
5959
});
6060

6161
it("should allow to intercept calls", () => {

0 commit comments

Comments
 (0)