Skip to content

Commit cdb9464

Browse files
authored
Merge pull request #187 from defmethodinc/node-upgrades
Upgrade to node v22
2 parents b02a8ce + 3ca1efe commit cdb9464

File tree

11 files changed

+15591
-13384
lines changed

11 files changed

+15591
-13384
lines changed

.babelrc

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,7 @@
77
"node": "current"
88
}
99
}
10-
]
11-
],
12-
"plugins": [
13-
["@babel/plugin-transform-react-jsx", {
14-
"runtime": "automatic"
15-
}],
16-
["@babel/plugin-proposal-class-properties", { "loose": true }]
10+
],
11+
"@babel/preset-react"
1712
]
1813
}

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4
2020
- name: Use Node.js
21-
uses: actions/setup-node@v3
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version-file: '.nvmrc'
2424
cache: 'npm'

.github/workflows/website-publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
1818
- name: Use ruby
1919
uses: ruby/setup-ruby@v1
2020
with:
@@ -35,9 +35,9 @@ jobs:
3535
runs-on: ubuntu-latest
3636

3737
steps:
38-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v4
3939
- name: Use Node.js
40-
uses: actions/setup-node@v3
40+
uses: actions/setup-node@v4
4141
with:
4242
node-version-file: '.nvmrc'
4343
cache: 'npm'

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v16.16
1+
v22.16

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ If you're a developer, you're welcome to submit a pull request. Please run the t
2525
Prerequisites:
2626

2727
- [git](https://git-scm.com/)
28-
- [node.js 16.X+](https://nodejs.org/)
28+
- [node.js 22.X+](https://nodejs.org/)
2929

3030
Setup:
3131

e2e/global-setup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { e2eSetup } from './utility.js';
2-
import { setup } from 'jest-environment-puppeteer';
2+
import setupPuppeteer from 'jest-environment-puppeteer/setup';
33

44
export default async function globalSetup(globalConfig) {
55
e2eSetup();
6-
await setup(globalConfig);
6+
await setupPuppeteer(globalConfig);
77
}

e2e/global-teardown.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { e2eTeardown } from './utility.js';
2-
import { teardown } from 'jest-environment-puppeteer';
2+
import teardownPuppeteer from 'jest-environment-puppeteer/teardown';
33

44
export default async function globalTeardown(globalConfig) {
5-
await teardown(globalConfig);
5+
await teardownPuppeteer(globalConfig);
66
e2eTeardown();
77
}

e2e/local.perf.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function assertWarnings(expected, options) {
1919
describe('Just Not Sorry', () => {
2020
beforeEach(async () => {
2121
await page.goto(`file://${TEST_PAGE}`);
22-
await page.waitForTimeout(500);
22+
await new Promise((resolve) => setTimeout(resolve, 500));
2323
await page.click('#email');
2424
await assertWarnings(0, { visible: false, timeout: TEST_WAIT_TIME });
2525
});
@@ -105,7 +105,7 @@ describe('Just Not Sorry', () => {
105105
await page.keyboard.press('Enter');
106106
await page.keyboard.press('Enter');
107107

108-
await page.waitForTimeout(500);
108+
await new Promise((resolve) => setTimeout(resolve, 500));
109109
await assertWarnings(20 * (i + 1), {
110110
visible: true,
111111
timeout: TEST_WAIT_TIME,

jest-puppeteer.config.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
//This filename is the default path for jest config
2+
3+
// Allow running without the sandbox on CI only
4+
const ciOnlyArgs =
5+
process.env.CI === 'true' ? ['--no-sandbox', '--disable-setuid-sandbox'] : [];
6+
27
module.exports = {
38
launch: {
49
headless: false,
@@ -8,6 +13,6 @@ module.exports = {
813
`--disable-extensions-except=build`,
914
`--load-extension=build`,
1015
`--window-size=800,800`,
11-
],
16+
].concat(ciOnlyArgs),
1217
},
1318
};

0 commit comments

Comments
 (0)