Skip to content

Commit 23b4bfc

Browse files
authored
Merge pull request #394 from topcoder-platform/dev
[PROD] - Security fixes & clean up
2 parents a128db8 + af5248c commit 23b4bfc

File tree

79 files changed

+1640
-2610
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+1640
-2610
lines changed

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.13.1

package-lock.json

Lines changed: 1403 additions & 1912 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
"types": "./types/src/main.d.ts",
88
"repository": "https://github.com/topcoder-platform/universal-navigation.git",
99
"scripts": {
10-
"build:nudge": "APP_BUILD_TARGET=nudge vite build --mode=production",
11-
"build:base": "vite build --mode=production && npx rimraf ./types && npm run types",
12-
"build": "npm run build:base && npm run build:nudge",
10+
"build": "vite build --mode=production && npx rimraf ./types && npm run types",
1311
"check": "svelte-check --tsconfig ./tsconfig.json",
1412
"demo:dist": "npx http-server --cors --host local.topcoder-dev.com --port 8083 ./dist",
1513
"demo:marketing": "npx http-server --host local.topcoder-dev.com --port 8081 ./demo/marketing -P http://local.topcoder-dev.com:8081? -o /",
@@ -21,15 +19,15 @@
2119
"types": "./node_modules/typescript/bin/tsc -p ./tsconfig.json --declaration --emitDeclarationOnly --outDir types"
2220
},
2321
"devDependencies": {
24-
"@sveltejs/vite-plugin-svelte": "^1.1.0",
25-
"@tsconfig/svelte": "^3.0.0",
26-
"sass": "^1.56.1",
27-
"svelte": "^3.52.0",
28-
"svelte-check": "^2.9.2",
29-
"svelte-preprocess": "^4.10.7",
30-
"tslib": "^2.4.0",
31-
"typescript": "^4.6.4",
32-
"vite": "^3.2.3",
33-
"vite-plugin-css-injected-by-js": "^2.1.1"
22+
"@sveltejs/vite-plugin-svelte": "^3.1.2",
23+
"@tsconfig/svelte": "^5.0.6",
24+
"sass": "^1.95.0",
25+
"svelte": "^4.2.20",
26+
"svelte-check": "^4.3.4",
27+
"svelte-preprocess": "^6.0.3",
28+
"tslib": "^2.8.1",
29+
"typescript": "^5.9.3",
30+
"vite": "^5.4.21",
31+
"vite-plugin-css-injected-by-js": "^3.5.2"
3432
}
3533
}

src/lib/app-context/auth-config.model.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import type { AuthUser } from "./auth-user.model"
22
import type { ProfileCompletionData } from "./profile-completion.model"
33

44
export interface AuthConfig {
5-
user: AuthUser
6-
profileCompletionData: ProfileCompletionData
5+
user?: AuthUser
6+
profileCompletionData?: ProfileCompletionData
77
autoFetchUser?: boolean
88
ready: boolean
99
signIn: () => void

src/lib/components/Accordion.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'lib/styles/fonts.scss';
1+
@use 'lib/styles/fonts.scss' as *;
22

33
.accordionWrap {
44
display: flex;

src/lib/components/Accordion.svelte

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import { getPublicPath } from 'lib/utils/paths';
55
import styles from './Accordion.module.scss';
66
7-
export let activeRoute: NavMenuItem = undefined;
8-
export let items: NavMenuItem[];
7+
export let activeRoute: NavMenuItem | undefined = undefined;
8+
export let items: NavMenuItem[] = [];
99
export let style: 'primary'|'secondary'|undefined = undefined;
1010
1111
const toggledItems: {[key: string]: boolean} = {};
@@ -42,7 +42,13 @@
4242
{item.label}
4343
</a>
4444
{#if item.children?.length}
45-
<span class={styles.itemTrigger} on:click={() => toggleItem(item)} on:keydown={() => {}}>
45+
<span
46+
class={styles.itemTrigger}
47+
role="button"
48+
tabindex="0"
49+
on:click={() => toggleItem(item)}
50+
on:keydown={(ev) => ev.key === 'Enter' && toggleItem(item)}
51+
>
4652
<img src={iconUrl} alt="^" />
4753
</span>
4854
{/if}

src/lib/components/Banner.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'lib/styles/fonts.scss';
1+
@use 'lib/styles/fonts.scss' as *;
22

33
$btnSize: 32px;
44

src/lib/components/Button.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'lib/styles/fonts.scss';
1+
@use 'lib/styles/fonts.scss' as *;
22

33
.btn {
44
all: unset;

src/lib/components/Button.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
export let variant: ButtonVariant = ''
1212
export let disabled: boolean = false;
1313
export let size: 'sm'|'md'|'md-0' = 'sm';
14-
export let ref: HTMLElement = null;
14+
export let ref: HTMLElement | null = null;
1515
1616
</script>
1717

src/lib/components/LinksMenu.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@import 'lib/styles/fonts.scss';
1+
@use 'lib/styles/fonts.scss' as *;
22

33
.linksMenuWrap {
44
display: flex;

0 commit comments

Comments
 (0)