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

merge staging into prod #5282

Merged
merged 115 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
92ad46e
10349-bug: separate idle logout path from user logout path, fixing th…
Mwindo Jul 23, 2024
999ae68
10349-bug: fix race condition bugs, and clear the idle status timer o…
Mwindo Jul 23, 2024
139c908
10349-bug: add some unit tests
Mwindo Jul 23, 2024
8189d1e
10349-bug: pull out constants
Mwindo Jul 23, 2024
dcc55bb
10349-bug: better constants
Mwindo Jul 23, 2024
4d56e6a
10349-bug: remove unnecessary action
Mwindo Jul 23, 2024
661e406
10349-bug: undoing routing behavior of idle logout to preserve curren…
Mwindo Jul 24, 2024
4d92595
add user signed in check for idle-logout route
Mwindo Jul 24, 2024
2383922
10349-bug: get multi-tab test working
Mwindo Jul 26, 2024
52e7a8d
10349-bug: try adding a wait to fix GA failing test
Mwindo Jul 26, 2024
1d50fab
10349-bug: try a hack to see if test passes
Mwindo Jul 26, 2024
ef1e4d8
10349-bug: temporarily disable failing test to see if other test pass…
Mwindo Jul 26, 2024
bef73fd
10349-bug: re-add test, and temporarily set constants in getConstants…
Mwindo Jul 26, 2024
ac2c799
10349-bug: dismiss modals in older tabs to prevent surprise logouts i…
Mwindo Jul 26, 2024
d6c52e4
10349-bug: add some temporary logging to debug CI test failure since …
Mwindo Jul 26, 2024
1652f9e
10349-bug: undo logging, try removing render check in app.tsx to see …
Mwindo Jul 26, 2024
a7306da
10349-bug: try to get tests to not fail spectacularly
Mwindo Jul 26, 2024
5e7c342
Merge branch 'staging' into 10349-bug
Mwindo Jul 26, 2024
1745a0d
fix merge issue
Mwindo Jul 26, 2024
4ac3c96
10349-bug: add AppContext and AppInstanceManagerWrapper to allow us t…
Mwindo Jul 27, 2024
ffe5955
10349-bug: revert getConstants temp test hack
Mwindo Jul 27, 2024
e4f9575
10349-bug: fix unit test, try defaulting to true in appContext to see…
Mwindo Jul 27, 2024
029b57e
10349-bug: remove code that turned out to be unnecessary, focus on fa…
Mwindo Jul 27, 2024
6699bf5
10349-bug: forgot to remove ci check :/
Mwindo Jul 27, 2024
f293899
10349-bug: try using cypress baseUrl rather than localhost
Mwindo Jul 29, 2024
7959c0f
10349-bug: do some more logging, try reloading page (since it seems, …
Mwindo Jul 29, 2024
740cc5b
10349-bug: last attempt at logging the puppeteer CI failure
Mwindo Jul 29, 2024
d57373a
10349-bug: extend timeout
Mwindo Jul 29, 2024
1713615
10349-bug: one final *final* attempt, as I believe puppeteer page is …
Mwindo Jul 29, 2024
ae47b67
10349-bug: hail mary attempt before just giving up
Mwindo Jul 29, 2024
9c6fbfd
10349-bug: last try, for real
Mwindo Jul 29, 2024
e72877e
10349-bug: just had an idea about what the issue might be
Mwindo Jul 29, 2024
79dd8ee
10349-bug: clean up in case this actually works
Mwindo Jul 29, 2024
3e7f612
10349-bug: remove package that was causing a failure, and fix unit test
Mwindo Jul 29, 2024
eb3fcd2
10349-bug: update broadcastIdleStatusActiveAction.test.ts, remove con…
Mwindo Jul 29, 2024
2cd2b76
Merge remote-tracking branch 'ustc/staging' into 10349-bug
Mwindo Jul 29, 2024
8d37302
10349-bug: add missing test
Mwindo Jul 29, 2024
2b6f6ef
10349-bug: incorporate reviewer feedback
Mwindo Jul 30, 2024
e0988bb
10349-bug: remove unused import :/
Mwindo Jul 30, 2024
bb01bbe
10349-bug: expose cerebral in test and add better typing for sequences
Mwindo Aug 1, 2024
f16b6d4
devex - Remove unused oauth flows from cognito
En-8 Aug 1, 2024
3367652
devex - Replace outdated terraform module
En-8 Aug 1, 2024
7e53d21
Merge branch 'staging' into devex-rebuild-cognito
zachrog Aug 2, 2024
6db5b82
Merge branch 'staging' of github.com:ustaxcourt/ef-cms into devex-reb…
Aug 2, 2024
4f7152b
Merge branch 'staging' into devex-rebuild-cognito
En-8 Aug 5, 2024
4dfdc16
Merge branch 'staging' into devex-rebuild-cognito
jimlerza Aug 5, 2024
f54ccde
Merge branch 'staging' into devex-rebuild-cognito
jimlerza Aug 7, 2024
a52d806
Merge branch 'staging' into devex-rebuild-cognito
jimlerza Aug 9, 2024
27a79a8
10349-bug: rename LOGOUT_BROADCAST_MESSAGES to BROADCAST_MESSAGE; add…
Mwindo Aug 9, 2024
f0039f5
Merge branch 'staging' into 10349-bug
Mwindo Aug 9, 2024
24760f6
10349-bug: stop tracking idle time if dawson has been updated, update…
Mwindo Aug 9, 2024
a0b540f
10349-bug: rename, and extract actions into a new sequence
Mwindo Aug 9, 2024
ec59145
10429-design-debt: remove redundant FormGroup
Mwindo Aug 10, 2024
e24f660
10429-design-debt: make NonstandardForm a little DRYer
Mwindo Aug 10, 2024
2eba0e4
10349-bug: update handleIdleLogoutAction
Mwindo Aug 12, 2024
ef4eed9
10349-bug: fix handleIdleLogoutAction.test.ts
Mwindo Aug 12, 2024
1e0a88f
10353-bug: add debounce and deactivate button for new user creation
Mwindo Aug 14, 2024
7acbc6b
Merge branch 'staging' into 10429-design-debt
Mwindo Aug 14, 2024
24aa3f2
Merge branch 'staging' into devex-rebuild-cognito
jimlerza Aug 15, 2024
6fd5684
10349-bug: ensure idle logoutat is cleared on signing out
Mwindo Aug 15, 2024
f484199
Merge branch 'staging' into 10429-design-debt
Mwindo Aug 15, 2024
d7d35b5
Merge branch 'staging' into 10349-bug
Mwindo Aug 15, 2024
1160002
Merge branch 'staging' into 10349-bug
Mwindo Aug 16, 2024
31a1f66
10349-bug: minor updates to tests
Mwindo Aug 16, 2024
8944515
Merge branch '10349-bug' of github.com:flexion/ef-cms into 10349-bug
Mwindo Aug 16, 2024
ad9665e
10353-bug: add test, and reenable button after form submission in cas…
Mwindo Aug 16, 2024
20340d2
10353-bug: fix comment
Mwindo Aug 16, 2024
ed6e425
10353-bug: update comment again
Mwindo Aug 16, 2024
e2d8566
dependencies: all minor versions, audit fix
TomElliottFlexion Aug 18, 2024
e97c035
dependencies: attempt ts 5.5.4
TomElliottFlexion Aug 18, 2024
288f8d5
dependencies: eslint plugin cypress
TomElliottFlexion Aug 18, 2024
920629b
dependencies: npm i
TomElliottFlexion Aug 18, 2024
479fa77
dependencies: puppeteer/core, sparticuz chromium
TomElliottFlexion Aug 18, 2024
a706e25
dependencies: new pdf images
TomElliottFlexion Aug 18, 2024
e76bd60
dependencies: terraform AWS provider
TomElliottFlexion Aug 18, 2024
f5384ca
dependencies: stable eslint and ts
TomElliottFlexion Aug 19, 2024
e69fd43
dependencies: update AWS CLI, new ECR image
TomElliottFlexion Aug 19, 2024
3f775ec
Merge pull request #5176 from flexion/10349-bug
jimlerza Aug 19, 2024
6f0c1e0
Merge branch 'staging' into 10429-design-debt
jimlerza Aug 19, 2024
ad1f9f7
Merge pull request #5238 from flexion/10429-design-debt
jimlerza Aug 19, 2024
971a6a5
Merge branch 'staging' into dep-updates-2024-08-12
TomElliottFlexion Aug 19, 2024
fdb683e
dependencies: notes
TomElliottFlexion Aug 19, 2024
f58728d
Merge pull request #5262 from flexion/dep-updates-2024-08-12
jimlerza Aug 19, 2024
d512fa3
10463-bug: change type attribute from "tel" to "text" for phone numbe…
akuny Aug 19, 2024
ed1ef9a
10464-bug: fix bug
Mwindo Aug 19, 2024
f68d49e
Remove styling for no-longer-used "tel" input els in forms.scss
akuny Aug 20, 2024
4bd6e7b
Call clearPendingReportsAction when no judge is selected in setPendin…
akuny Aug 20, 2024
2c966a8
Merge branch 'staging' into 10464-bug
Mwindo Aug 20, 2024
027d771
10353-bug: fix condition to re-enable button
Mwindo Aug 20, 2024
0d36421
10353-test: add line that somehow got deleted
Mwindo Aug 20, 2024
7e6a6e2
10464-bug: extract duplicate test code into a variable
Mwindo Aug 21, 2024
d81d4b2
Merge branch '10464-bug' of github.com:flexion/ef-cms into 10464-bug
Mwindo Aug 21, 2024
e031992
Merge pull request #5266 from flexion/10464-bug
jimlerza Aug 21, 2024
0fbeb26
Merge branch 'staging' into 10353-bug-duplicate-cognito-users
Mwindo Aug 21, 2024
555da14
Merge branch 'staging' into 10463-bug
jimlerza Aug 21, 2024
fd90989
Merge remote-tracking branch 'USTC/staging' into 10366-bug
akuny Aug 21, 2024
16fcac2
Merge pull request #5269 from flexion/10463-bug
jimlerza Aug 21, 2024
d87f292
Merge branch 'staging' into 10366-bug
jimlerza Aug 21, 2024
30f9e80
Merge branch 'staging' into 10353-bug-duplicate-cognito-users
Mwindo Aug 21, 2024
4ce26b2
10459: added a script to fix cognito users that are missing custom at…
jimlerza Aug 21, 2024
d10c0a0
Merge pull request #5272 from flexion/10366-bug
jimlerza Aug 22, 2024
b7ab4a2
Merge branch 'staging' into 10459-populate-missing-cognito-user-ids
jimlerza Aug 22, 2024
d893d4e
Merge branch 'staging' into 10353-bug-duplicate-cognito-users
jimlerza Aug 22, 2024
0e487ae
10459: fix a copypasta error
jimlerza Aug 22, 2024
56acc6b
Merge branch '10459-populate-missing-cognito-user-ids' of github.com:…
jimlerza Aug 22, 2024
c52ddee
10459: some pedantic cleanup
jimlerza Aug 22, 2024
3fea929
10459: only create dynamo records for users that have already confirm…
jimlerza Aug 22, 2024
9467522
10353-bug: pull out debounce time into a constant
Mwindo Aug 22, 2024
ea69c07
Merge branch '10353-bug-duplicate-cognito-users' of github.com:flexio…
Mwindo Aug 22, 2024
3428f0c
Merge pull request #5252 from flexion/10353-bug-duplicate-cognito-users
jtdevos Aug 23, 2024
c10927e
Merge branch 'staging' into 10459-populate-missing-cognito-user-ids
jtdevos Aug 23, 2024
9e1fcf0
Merge branch 'staging' into devex-rebuild-cognito
jimlerza Aug 23, 2024
1c704d4
Merge pull request #5207 from flexion/devex-rebuild-cognito
jimlerza Aug 23, 2024
2c9b96e
Merge branch 'staging' into 10459-populate-missing-cognito-user-ids
jimlerza Aug 23, 2024
97ec44d
Merge pull request #5273 from ustaxcourt/10459-populate-missing-cogni…
jtdevos Aug 23, 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1
orbs:
git-shallow-clone: guitarrapc/git-shallow-clone@2.8.0

efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.6
efcms-docker-image: &efcms-docker-image $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/ef-cms-us-east-1:4.3.7

parameters:
run_build_and_deploy:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN apt-get install -y build-essential
RUN apt-get install -y libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev

ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.24.zip" -o "awscliv2.zip" && \
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64-2.17.30.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip
Expand Down
65 changes: 65 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ import {
getNewAccountVerificationCode,
toggleFeatureFlag,
} from './cypress/helpers/cypressTasks/dynamo/dynamo-helpers';
import { overrideIdleTimeouts } from './cypress/local-only/support/idleLogoutHelpers';
import { unzipFile } from './cypress/helpers/file/unzip-file';
import { waitForNoce } from './cypress/helpers/cypressTasks/wait-for-noce';
import { waitForPractitionerEmailUpdate } from './cypress/helpers/cypressTasks/wait-for-practitioner-email-update';

import type { Page } from 'puppeteer-core';

import { retry, setup } from '@cypress/puppeteer';

// eslint-disable-next-line import/no-default-export
export default defineConfig({
chromeWebSecurity: false,
Expand Down Expand Up @@ -77,6 +82,66 @@ export default defineConfig({
});
},
});
// Setup for puppeteer, which supports multi-tab tests
// Define your function in onMessage, and call it like cy.puppeteer('yourFunctionName', arg1, arg2 ...)
setup({
on,
onMessage: {
async closeTab(browser: any, url: string) {
const desiredPage = await retry<Promise<Page>>(async () => {
const pages = await browser.pages();
const page = pages.find(p => p.url().includes(url));
if (!page) throw new Error('Could not find page');
return page;
});
await desiredPage.close();
},
async openExistingTabAndCheckSelectorExists(
browser: any,
url: string,
selector: string,
close: boolean = true,
) {
// Note that browser.pages is *not* sorted in any particular order.
// Therefore we pass in the URL we want to find rather than an index.

// Wait until the new tab loads
const desiredPage = await retry<Promise<Page>>(async () => {
const pages = await browser.pages();
const page = pages.find(p => p.url().includes(url));
if (!page) throw new Error('Could not find page');
return page;
});

// Activate it
await desiredPage.bringToFront();

// Make sure selector exists
await desiredPage.waitForSelector(selector, { timeout: 30000 });

if (close) {
await desiredPage.close();
}
return true;
},
async openNewTab(
browser: any,
url: string,
sessionModalTimeout: number,
sessionTimeout: number,
) {
const page = await browser.newPage();
await page.goto(url, { waitUntil: 'networkidle2' });

await page.evaluate(overrideIdleTimeouts, {
sessionModalTimeout,
sessionTimeout,
});

return page;
},
},
});
},
specPattern: 'cypress/local-only/tests/**/*.cy.ts',
supportFile: 'cypress/local-only/support/index.ts',
Expand Down
4 changes: 2 additions & 2 deletions cypress/CYPRESS-README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# Best Practices

In order to write a realiable cypress test suites, there are some best practices we should follow that our outlined in the cypress documentation and also some best practices we have learned from trying to write realiable tests.
In order to write a reliable cypress test suites, there are some best practices we should follow that our outlined in the cypress documentation and also some best practices we have learned from trying to write reliable tests.

## DO'S
- Access DOM elements using `data-testid selector`.
Expand All @@ -11,7 +11,7 @@ In order to write a realiable cypress test suites, there are some best practices
- Avoid cy.get('#my-id').
- Wait for actions to finish explicitly.
- Always verify something on the page after running an action or loading a new page. For example, if you click on a button which updates a practitioner name, be sure to wait for a success alert to appear before trying to move onto the next steps in your test. Failing to do this will result in race conditions and flaky tests.
- This is especially important for accessibilty tests, wait explicitly for the page to full load before running an accessibility scan. If you are seeing 'color-contrast' violations that are intermittent you are most likely not waiting for the right element to be loaded before running a scan.
- This is especially important for accessibility tests, wait explicitly for the page to full load before running an accessibility scan. If you are seeing 'color-contrast' violations that are intermittent you are most likely not waiting for the right element to be loaded before running a scan.
- Extract reusable steps.
- Try to find ways to create helper functions which we can re-use in other tests. For example, creating a case as a petitioner is a good re-usable flow. When writing these helpers, be sure they do not contain asserts related to the high level test you are writing. They should just login as a user, create or modify the data, then return any new created values we may need.
- Test should be re-runnable.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,37 @@ describe('Petitioner Account Creation', () => {
});

describe('Create Petitioner Account and login', () => {
const TEST_EMAIL = `cypress_test_account+success_${GUID}@example.com`;
const TEST_NAME = 'Cypress Test';
const TEST_PASSWORD = generatePassword(VALID_PASSWORD_CONFIG);

it('should create an account and verify it using the verification link, then login and create an eletronic case', () => {
it('should prevent multiple submissions', () => {
const TEST_EMAIL = `cypress_test_account+no_multiple_submissions_${GUID}@example.com`;
cy.visit('/create-account/petitioner');
cy.get('[data-testid="petitioner-account-creation-email"]').type(
TEST_EMAIL,
);
cy.get('[data-testid="petitioner-account-creation-name"]').type(
TEST_NAME,
);
cy.get('[data-testid="petitioner-account-creation-password"]').type(
TEST_PASSWORD,
);
cy.get(
'[data-testid="petitioner-account-creation-confirm-password"]',
).type(TEST_PASSWORD);
cy.intercept('POST', '/auth/account/create').as('accountCreationRequest');

// eslint-disable-next-line cypress/unsafe-to-chain-command
cy.get('[data-testid="petitioner-account-creation-submit-button"]')
.click({ force: true })
.click({ force: true });

cy.wait('@accountCreationRequest');
cy.get('@accountCreationRequest.all').should('have.length', 1);
});

it('should create an account and verify it using the verification link, then login and create an electronic case', () => {
const TEST_EMAIL = `cypress_test_account+success_${GUID}@example.com`;
createAPetitioner({
email: TEST_EMAIL,
name: TEST_NAME,
Expand Down
8 changes: 8 additions & 0 deletions cypress/helpers/ITestableWindow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// An interface for exposing the cerebral controller on the window object, which
// can be useful for temporarily overwriting constants in cypress.
export interface ITestableWindow {
cerebral: {
getState: () => any;
getModel: () => any;
};
}
19 changes: 19 additions & 0 deletions cypress/local-only/support/idleLogoutHelpers.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { ITestableWindow } from '../../helpers/ITestableWindow';

// This is a hack, but I do not know a better way.
export const overrideIdleTimeouts = ({
modalTimeout,
sessionTimeout,
windowObj, // For native cypress, this needs to be defined. For the puppeteer plugin, it should be left blank.
}: {
modalTimeout: number;
sessionTimeout: number;
windowObj?: ITestableWindow;
}) => {
const currentWindow = windowObj || (window as unknown as ITestableWindow);
currentWindow.cerebral.getModel().set(['constants'], {
...currentWindow.cerebral.getState().constants,
SESSION_MODAL_TIMEOUT: modalTimeout,
SESSION_TIMEOUT: sessionTimeout,
});
};
1 change: 1 addition & 0 deletions cypress/local-only/support/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import './commands';
import '@cypress/puppeteer/support';
import 'cypress-axe';

before(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { ITestableWindow } from '../../../../helpers/ITestableWindow';
import { loginAsColvin } from '../../../../helpers/authentication/login-as-helpers';
import { overrideIdleTimeouts } from '../../../support/idleLogoutHelpers';
import { retry } from '../../../../helpers/retry';

describe('Idle Logout Behavior', () => {
const DEFAULT_IDLE_TIMEOUT = 500;
it('should automatically log user out after refresh with option to log back in', () => {
loginAsColvin();
cy.reload(); // Refresh ensures we track idle time even without interaction on the page
cy.get('[data-testid="header-text"]');
cy.window().then((window: Window) => {
overrideIdleTimeouts({
modalTimeout: DEFAULT_IDLE_TIMEOUT,
sessionTimeout: DEFAULT_IDLE_TIMEOUT,
windowObj: window as unknown as ITestableWindow,
});
});

retry(() => {
return cy.get('body').then(body => {
return body.find('[data-testid="idle-logout-login-button"]').length > 0;
});
});

cy.get('[data-testid="idle-logout-login-button"]').click();
cy.get('[data-testid="login-button"]').should('exist');
});

it('should close modal in other tab when loading new tab', () => {
loginAsColvin();
cy.get('[data-testid="header-text"]');
cy.window().then((window: Window) => {
overrideIdleTimeouts({
modalTimeout: 30000, // We want the modal to appear relatively quickly, but we do not want to sign out
sessionTimeout: 1000,
windowObj: window as unknown as ITestableWindow,
});
});

// Wait until modal is there
cy.get('[data-testid="are-you-still-there-modal"]').should('exist');

const newTabUrl = Cypress.config('baseUrl') + '/messages/my/inbox';
cy.puppeteer('openNewTab', newTabUrl);

// Then confirm opening a new tab closed the modal
cy.get('[data-testid="are-you-still-there-modal"]').should('not.exist');
cy.puppeteer('closeTab', newTabUrl);
});

it('should sign out of all tabs after idle', () => {
// Note that throughout this test, we interact with the first tab via cypress
// and all other tabs through the puppeteer plugin. Mixing this up will cause errors.

loginAsColvin();
const urls = [
'/messages/my/inbox',
'/document-qc/section/inbox',
'/trial-sessions',
];
urls.forEach(url => {
cy.puppeteer(
'openNewTab',
Cypress.config('baseUrl') + url,
DEFAULT_IDLE_TIMEOUT,
DEFAULT_IDLE_TIMEOUT,
);
});
cy.window().then((window: Window) => {
overrideIdleTimeouts({
modalTimeout: DEFAULT_IDLE_TIMEOUT,
sessionTimeout: DEFAULT_IDLE_TIMEOUT,
windowObj: window as unknown as ITestableWindow,
});
});

// We sync all the tabs to timeout at the same time by clicking, which broadcasts a "last active" time across tabs.
// They should all sign out at the same time.
cy.get('body').click();

cy.get('[data-testid="idle-logout-login-button"]').should('exist');
urls.forEach(url =>
cy.puppeteer(
'openExistingTabAndCheckSelectorExists',
url,
'[data-testid="idle-logout-login-button"]',
),
);
});
});
3 changes: 1 addition & 2 deletions docs/dependency-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ Below is a list of dependencies that are locked down due to known issues with se

- When updating puppeteer or puppeteer core in the project, make sure to also match versions in `web-api/runtimes/puppeteer/package.json` as this is our lambda layer which we use to generate pdfs. Puppeteer and chromium versions should always match between package.json and web-api/runtimes/puppeteer/package.json. Remember to run `npm install --prefix web-api/runtimes/puppeteer` to install and update the package-lock file.
- Puppeteer also has recommended versions of Chromium, so we should make sure to use the recommended version of chromium for the version of puppeteer that we are on.
- As of 8/7/2024, we cannot update puppeteer or puppeteer-core beyond 22.13.1 because the latest release of @sparticuz/chromium only supports version 126 of chromium.
- As of 8/15/2024, we cannot update puppeteer or puppeteer-core beyond 22.13.1 because the latest release of @sparticuz/chromium only supports version 126 of chromium.
- There is a high-severity security issue with ws (ws affected by a DoS when handling a request with many HTTP headers - https://github.com/advisories/GHSA-3h5v-q93c-6h6q); however, we only use ws on the client side, so this should not be an issue. (We tried to upgrade puppeteer anyway, but unsurprisingly the PDF tests failed because there is no newer version of Chromium that supports puppeteer.)

### pdfjs-dist
Expand All @@ -91,7 +91,6 @@ Below is a list of dependencies that are locked down due to known issues with se
### eslint
- Keep pinned to 8.57.0 as most plugins are not yet compatible with v9.0.0: https://eslint.org/blog/2023/09/preparing-custom-rules-eslint-v9/
See: https://github.com/jsx-eslint/eslint-plugin-react/issues/3699
- Keep eslint-plugin-security at 2.1.1 since upgrading makes it only compatible with v9.0.0

### ws, 3rd party dependency of Cerebral
- When running npm audit, you'll see a high severity issue with ws, 'affected by a DoS when handling a request with many HTTP headers - https://github.com/advisories/GHSA-3h5v-q93c-6h6q'. This doesn't affect us as the vulnerability is on the server side and we're not using this package on the server. We tried to override this to 5.2.4 and 8.18.0 and weren't able to make this work as import paths have changed. In the mean time, we recommend skipping this issue. We could always fork the cerebral repo in the future if needed.
Expand Down
Loading
Loading