Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 9 additions & 0 deletions .changeset/sharp-seas-fold.md
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables us to to a patch release of both @common-grants/core and @common-grants/cli

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
"@common-grants/core": patch
"@common-grants/cli": patch
---

Updates dependencies

- Updates both `@common-grants/core` and `@common-grants/cli` to use the latest TypeSpec library versions
- Updates `@common-grants/cli` to reference `@common-grants/core` as a dev dependency instead of a direct dependency
40 changes: 34 additions & 6 deletions lib/cli/lib/openapi/openapi.0.1.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -818,13 +818,41 @@ components:
Examples might include a deadline for questions, anticipated award date, etc.
description: Key dates and events in the opportunity's timeline, such as when the opportunity is posted and closes
example:
postDate: {}
closeDate: {}
postDate:
name: Application posted date
eventType: singleDate
date: '2024-01-15'
description: Opportunity is posted publicly
Comment on lines +821 to +825
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These examples are preserved due to the switch to the latest @typespec/compiler and @typespec/openapi3

closeDate:
name: Opportunity close date
eventType: singleDate
date: '2024-12-31'
time: '17:00:00'
description: Opportunity closes for all applications
otherDates:
anticipatedAward: {}
applicationPeriod: {}
performancePeriod: {}
infoSessions: {}
anticipatedAward:
name: Anticipated award date
eventType: singleDate
date: '2025-03-15'
description: When we expect to announce awards for this opportunity.
applicationPeriod:
name: Application period
eventType: dateRange
startDate: '2024-01-01'
endDate: '2024-01-31'
endTime: '17:00:00'
description: Primary application period for the grant opportunity
performancePeriod:
name: Period of Performance
eventType: dateRange
startDate: '2024-01-01'
endDate: '2024-12-31'
description: Period of performance for the grant
infoSessions:
name: Info sessions
eventType: other
details: Every other Tuesday
description: Info sessions for the opportunity
CommonGrants.Models.OpportunityBase:
type: object
required:
Expand Down
206 changes: 151 additions & 55 deletions lib/cli/lib/openapi/openapi.0.2.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1241,10 +1241,20 @@ components:
customValue: custom
description: Competition is open for applications
keyDates:
openDate: {}
closeDate: {}
openDate:
name: Open Date
eventType: singleDate
date: '2025-01-01'
closeDate:
name: Close Date
eventType: singleDate
date: '2025-01-30'
otherDates:
reviewPeriod: {}
reviewPeriod:
name: Application Review Period
eventType: dateRange
startDate: '2025-02-01'
endDate: '2025-02-28'
forms:
forms:
formA:
Expand Down Expand Up @@ -1281,18 +1291,26 @@ components:
scope: '#/properties/phone'
mappingToCommonGrants:
name:
firstName: {}
lastName: {}
firstName:
field: name.first
lastName:
field: name.last
emails:
primary: {}
primary:
field: email
phones:
primary: {}
primary:
field: phone
mappingFromCommonGrants:
name:
first: {}
last: {}
email: {}
phone: {}
first:
field: name.firstName
last:
field: name.lastName
email:
field: emails.primary
phone:
field: phones.primary
formB:
id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a
name: Form A
Expand Down Expand Up @@ -1327,18 +1345,26 @@ components:
scope: '#/properties/phone'
mappingToCommonGrants:
name:
firstName: {}
lastName: {}
firstName:
field: name.first
lastName:
field: name.last
emails:
primary: {}
primary:
field: email
phones:
primary: {}
primary:
field: phone
mappingFromCommonGrants:
name:
first: {}
last: {}
email: {}
phone: {}
first:
field: name.firstName
last:
field: name.lastName
email:
field: emails.primary
phone:
field: phones.primary
validation:
required:
- formA
Expand Down Expand Up @@ -1396,18 +1422,26 @@ components:
scope: '#/properties/phone'
mappingToCommonGrants:
name:
firstName: {}
lastName: {}
firstName:
field: name.first
lastName:
field: name.last
emails:
primary: {}
primary:
field: email
phones:
primary: {}
primary:
field: phone
mappingFromCommonGrants:
name:
first: {}
last: {}
email: {}
phone: {}
first:
field: name.firstName
last:
field: name.lastName
email:
field: emails.primary
phone:
field: phones.primary
formB:
id: b7c1e2f4-8a3d-4e2a-9c5b-1f2e3d4c5b6a
name: Form A
Expand Down Expand Up @@ -1442,18 +1476,26 @@ components:
scope: '#/properties/phone'
mappingToCommonGrants:
name:
firstName: {}
lastName: {}
firstName:
field: name.first
lastName:
field: name.last
emails:
primary: {}
primary:
field: email
phones:
primary: {}
primary:
field: phone
mappingFromCommonGrants:
name:
first: {}
last: {}
email: {}
phone: {}
first:
field: name.firstName
last:
field: name.lastName
email:
field: emails.primary
phone:
field: phones.primary
validation:
required:
- formA
Expand Down Expand Up @@ -1506,10 +1548,20 @@ components:
$ref: '#/components/schemas/CommonGrants.Fields.Event'
description: The date the competition was created
example:
openDate: {}
closeDate: {}
openDate:
name: Open Date
eventType: singleDate
date: '2025-01-01'
closeDate:
name: Close Date
eventType: singleDate
date: '2025-01-30'
otherDates:
reviewPeriod: {}
reviewPeriod:
name: Application Review Period
eventType: dateRange
startDate: '2025-02-01'
endDate: '2025-02-28'
CommonGrants.Models.Form:
type: object
required:
Expand Down Expand Up @@ -1589,18 +1641,26 @@ components:
scope: '#/properties/phone'
mappingToCommonGrants:
name:
firstName: {}
lastName: {}
firstName:
field: name.first
lastName:
field: name.last
emails:
primary: {}
primary:
field: email
phones:
primary: {}
primary:
field: phone
mappingFromCommonGrants:
name:
first: {}
last: {}
email: {}
phone: {}
first:
field: name.firstName
last:
field: name.lastName
email:
field: emails.primary
phone:
field: phones.primary
CommonGrants.Models.FormJsonSchema:
type: object
additionalProperties: {}
Expand Down Expand Up @@ -1749,10 +1809,18 @@ components:
}
```
example:
id: {}
id:
const: '123'
opportunity:
status: {}
amount: {}
status:
switch:
field: summary.opportunity_status
case:
active: open
inactive: closed
default: custom
amount:
field: summary.opportunity_amount
CommonGrants.Models.MappingSwitchFunction:
type: object
required:
Expand Down Expand Up @@ -2055,13 +2123,41 @@ components:
Examples might include a deadline for questions, anticipated award date, etc.
description: Key dates and events in the opportunity's timeline, such as when the opportunity is posted and closes
example:
postDate: {}
closeDate: {}
postDate:
name: Application posted date
eventType: singleDate
date: '2024-01-15'
description: Opportunity is posted publicly
closeDate:
name: Opportunity close date
eventType: singleDate
date: '2024-12-31'
time: '17:00:00'
description: Opportunity closes for all applications
otherDates:
anticipatedAward: {}
applicationPeriod: {}
performancePeriod: {}
infoSessions: {}
anticipatedAward:
name: Anticipated award date
eventType: singleDate
date: '2025-03-15'
description: When we expect to announce awards for this opportunity.
applicationPeriod:
name: Application period
eventType: dateRange
startDate: '2024-01-01'
endDate: '2024-01-31'
endTime: '17:00:00'
description: Primary application period for the grant opportunity
performancePeriod:
name: Period of Performance
eventType: dateRange
startDate: '2024-01-01'
endDate: '2024-12-31'
description: Period of performance for the grant
infoSessions:
name: Info sessions
eventType: other
details: Every other Tuesday
description: Info sessions for the opportunity
CommonGrants.Models.OpportunityBase:
type: object
required:
Expand Down
10 changes: 5 additions & 5 deletions lib/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,7 @@
},
"dependencies": {
"@apidevtools/swagger-parser": "^10.1.1",
"@common-grants/core": "workspace:*",
"@typespec/compiler": "^1.5.0",
"@typespec/json-schema": "^1.5.0",
"@typespec/openapi3": "^1.5.0",
"@typespec/versioning": "^0.75.0",
"@typespec/compiler": "catalog:",
"chalk": "^4.1.2",
"commander": "^12.1.0",
"express": "^4.21.2",
Expand All @@ -68,6 +64,10 @@
"zod": "^3.25.76"
},
"devDependencies": {
"@common-grants/core": "workspace:*",
"@typespec/json-schema": "catalog:",
"@typespec/openapi3": "catalog:",
"@typespec/versioning": "catalog:",
"@eslint/js": "^9.38.0",
"@jest/globals": "^29.7.0",
"@types/express": "^4.17.2",
Expand Down
14 changes: 7 additions & 7 deletions lib/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"author": "CommonGrants",
"license": "CC0-1.0",
"peerDependencies": {
"@typespec/compiler": "^1.5.0",
"@typespec/http": "^1.5.0",
"@typespec/json-schema": "^1.5.0",
"@typespec/openapi3": "^1.5.0",
"@typespec/openapi": "^1.5.0",
"@typespec/rest": "^0.75.0",
"@typespec/versioning": "^0.75.0"
"@typespec/compiler": "catalog:",
"@typespec/http": "catalog:",
Comment on lines +54 to +55
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New syntax for using pnpm catalog

"@typespec/json-schema": "catalog:",
"@typespec/openapi3": "catalog:",
"@typespec/openapi": "catalog:",
"@typespec/rest": "catalog:",
"@typespec/versioning": "catalog:"
},
"devDependencies": {
"@eslint/js": "^9.18.0",
Expand Down
Loading