Skip to content

Commit

Permalink
Merge pull request Agoric#36 from Agoric/ta/proposal-package
Browse files Browse the repository at this point in the history
refactor: config proposal within package.json
  • Loading branch information
turadg authored Nov 30, 2023
2 parents e8c43f8 + db59216 commit b28c5ec
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 44 deletions.
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

0 comments on commit b28c5ec

Please sign in to comment.