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

refactor: config proposal within package.json #36

Merged
merged 1 commit into from
Nov 30, 2023
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
7 changes: 4 additions & 3 deletions common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ export type CoreEvalProposal = ProposalCommon & {
export type ProposalInfo = SoftwareUpgradeProposal | CoreEvalProposal;

function readInfo(proposalPath: string): ProposalInfo {
const configPath = path.join('proposals', proposalPath, 'config.json');
const config = fs.readFileSync(configPath, 'utf-8');
const packageJsonPath = path.join('proposals', proposalPath, 'package.json');
const packageJson = fs.readFileSync(packageJsonPath, 'utf-8');
const { agoricProposal } = JSON.parse(packageJson);
const [proposalIdentifier, proposalName] = proposalPath.split(':');
return {
...JSON.parse(config),
...agoricProposal,
proposalIdentifier,
proposalName,
};
Expand Down
5 changes: 0 additions & 5 deletions proposals/16:upgrade-8/config.json

This file was deleted.

7 changes: 7 additions & 0 deletions proposals/16:upgrade-8/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"agoricProposal": {
"sdkImageTag": "29",
"planName": "agoric-upgrade-8",
"type": "Software Upgrade Proposal"
}
}
6 changes: 0 additions & 6 deletions proposals/29:upgrade-9/config.json

This file was deleted.

8 changes: 8 additions & 0 deletions proposals/29:upgrade-9/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"agoricProposal": {
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/pismoC",
"sdkImageTag": "31",
"planName": "agoric-upgrade-9",
"type": "Software Upgrade Proposal"
}
}
6 changes: 0 additions & 6 deletions proposals/34:upgrade-10/config.json

This file was deleted.

6 changes: 6 additions & 0 deletions proposals/34:upgrade-10/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"agoricProposal": {
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/mainnet1B-rc3",
"sdkImageTag": "35",
"planName": "agoric-upgrade-10",
"type": "Software Upgrade Proposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
6 changes: 0 additions & 6 deletions proposals/43:upgrade-11/config.json

This file was deleted.

6 changes: 6 additions & 0 deletions proposals/43:upgrade-11/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"agoricProposal": {
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-11",
"sdkImageTag": "36",
"planName": "agoric-upgrade-11",
"type": "Software Upgrade Proposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions proposals/49:smart-wallet-nft/config.json

This file was deleted.

3 changes: 3 additions & 0 deletions proposals/49:smart-wallet-nft/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions proposals/53:kread-start/config.json

This file was deleted.

3 changes: 3 additions & 0 deletions proposals/53:kread-start/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions proposals/55:statom-vaults/config.json

This file was deleted.

3 changes: 3 additions & 0 deletions proposals/55:statom-vaults/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
6 changes: 0 additions & 6 deletions proposals/63:upgrade-12/config.json

This file was deleted.

6 changes: 6 additions & 0 deletions proposals/63:upgrade-12/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"agoricProposal": {
"releaseNotes": "https://github.com/Agoric/agoric-sdk/releases/tag/agoric-upgrade-12",
"sdkImageTag": "38",
"planName": "agoric-upgrade-12",
"type": "Software Upgrade Proposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down
3 changes: 0 additions & 3 deletions proposals/b:zoe1/config.json

This file was deleted.

3 changes: 3 additions & 0 deletions proposals/b:zoe1/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"agoricProposal": {
"type": "/agoric.swingset.CoreEvalProposal"
},
"type": "module",
"license": "Apache-2.0",
"dependencies": {
Expand Down