File tree Expand file tree Collapse file tree 3 files changed +21
-24
lines changed
Expand file tree Collapse file tree 3 files changed +21
-24
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,8 @@ jobs:
118118 - run :
119119 name : Build Extension
120120 command : pnpm --filter extension build
121+ environment :
122+ NODE_OPTIONS : --max-old-space-size=8192
121123workflows :
122124 build :
123125 jobs :
Original file line number Diff line number Diff line change @@ -328,24 +328,17 @@ const SquadNotificationSettingsModal = dynamic(
328328 ) ,
329329) ;
330330
331- // Opportunity modals are webapp-only and import lib/schema/opportunity.ts
332- // which triggers Next.js 15.4.10 Babel bug ("Invalid array length") in extension builds
333- // Must use process.env directly (not isExtension) for webpack compile-time exclusion
334- const OpportunityEditModal = process . env . TARGET_BROWSER
335- ? null
336- : dynamic ( ( ) =>
337- import (
338- /* webpackChunkName: "opportunityEditModal" */ '../opportunity/OpportunityEditModal/OpportunityEditModal'
339- ) . then ( ( mod ) => mod . OpportunityEditModal ) ,
340- ) ;
341-
342- const OpportunityEditRecruiterModal = process . env . TARGET_BROWSER
343- ? null
344- : dynamic ( ( ) =>
345- import (
346- /* webpackChunkName: "opportunityEditRecruiterModal" */ '../opportunity/OpportunityEditModal/OpportunityEditRecruiterModal'
347- ) . then ( ( mod ) => mod . OpportunityEditRecruiterModal ) ,
348- ) ;
331+ const OpportunityEditModal = dynamic ( ( ) =>
332+ import (
333+ /* webpackChunkName: "opportunityEditModal" */ '../opportunity/OpportunityEditModal/OpportunityEditModal'
334+ ) . then ( ( mod ) => mod . OpportunityEditModal ) ,
335+ ) ;
336+
337+ const OpportunityEditRecruiterModal = dynamic ( ( ) =>
338+ import (
339+ /* webpackChunkName: "opportunityEditRecruiterModal" */ '../opportunity/OpportunityEditModal/OpportunityEditRecruiterModal'
340+ ) . then ( ( mod ) => mod . OpportunityEditRecruiterModal ) ,
341+ ) ;
349342
350343const DirtyFormModal = dynamic (
351344 ( ) => import ( /* webpackChunkName: "dirtyFormModal" */ './DirtyFormModal' ) ,
Original file line number Diff line number Diff line change 11import z from 'zod' ;
2- import { SalaryPeriod } from '../../features/opportunity/protobuf/opportunity' ;
3- import { isNullOrUndefined } from '../func' ;
42import { labels } from '../labels' ;
3+ import { isNullOrUndefined } from '../func' ;
4+
5+ const MAX_SALARY = 100_000_000 ;
6+ const MAX_TEAM_SIZE = 1_000_000 ;
57
68const processSalaryValue = ( val : unknown ) => {
79 if ( Number . isNaN ( val ) || isNullOrUndefined ( val ) ) {
@@ -31,22 +33,22 @@ export const opportunityEditInfoSchema = z.object({
3133 . int ( )
3234 . nonnegative ( )
3335 . min ( 1 , 'Enter the team size' )
34- . max ( 1_000_000 ) ,
36+ . max ( MAX_TEAM_SIZE ) ,
3537 salary : z
3638 . object ( {
3739 min : z . preprocess (
3840 processSalaryValue ,
39- z . number ( ) . int ( ) . nonnegative ( ) . max ( 100_000_000 ) . optional ( ) ,
41+ z . number ( ) . int ( ) . nonnegative ( ) . max ( MAX_SALARY ) . optional ( ) ,
4042 ) ,
4143 max : z . preprocess (
4244 processSalaryValue ,
43- z . number ( ) . int ( ) . nonnegative ( ) . max ( 100_000_000 ) . optional ( ) ,
45+ z . number ( ) . int ( ) . nonnegative ( ) . max ( MAX_SALARY ) . optional ( ) ,
4446 ) ,
4547 period : z
4648 . number ( )
4749 . nullish ( )
4850 . transform ( ( val ) => val ?? undefined )
49- . default ( SalaryPeriod . UNSPECIFIED ) ,
51+ . default ( 0 ) ,
5052 } )
5153 . nullish ( )
5254 . refine (
You can’t perform that action at this time.
0 commit comments