Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Remove all preserve plugins from truffle bundle #5135

Merged
merged 3 commits into from
Jun 1, 2022
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
10 changes: 1 addition & 9 deletions packages/core/lib/commands/preserve/plugins.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,5 @@
const Config = require("@truffle/config");

const defaultPlugins = [
"@truffle/preserve-fs",
"@truffle/preserve-to-ipfs",
"@truffle/preserve-to-filecoin",
"@truffle/preserve-to-buckets"
];

const getConfig = options => {
let config;
try {
Expand All @@ -15,8 +8,7 @@ const getConfig = options => {
config = Config.default().with(options);
}

config.plugins = [...(config.plugins || []), ...defaultPlugins];

config.plugins = config.plugins || [];
return config;
};

Expand Down
4 changes: 0 additions & 4 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@
"@truffle/migrate": "^3.2.82",
"@truffle/plugins": "^0.2.7",
"@truffle/preserve": "^0.2.7",
"@truffle/preserve-fs": "^0.2.7",
"@truffle/preserve-to-buckets": "^0.2.8",
"@truffle/preserve-to-filecoin": "^0.2.8",
"@truffle/preserve-to-ipfs": "^0.2.8",
"@truffle/provider": "^0.2.54",
"@truffle/provisioner": "^0.2.51",
"@truffle/require": "^2.0.97",
Expand Down
20 changes: 4 additions & 16 deletions packages/core/test/lib/commands/preserve.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ conditionalDescribe("preserve", () => {

// Options propagates to the truffle config object so these contain config properties as well
const defaultOptions = {
plugins: ["dummy-loader", "dummy-recipe", "truffle-mock"],
working_directory: process.cwd(),
"plugins": ["dummy-loader", "dummy-recipe", "truffle-mock"],
"working_directory": process.cwd(),
"dummy-recipe": true,
_: ["./test/mockPlugins/dummy-loader"],
environments: {
"_": ["./test/mockPlugins/dummy-loader"],
"environments": {
development: {
"dummy-recipe": {
selectedEnvironment: "development"
Expand All @@ -52,18 +52,6 @@ conditionalDescribe("preserve", () => {
{
option: "--dummy-recipe",
description: "Dummy Recipe"
},
{
option: "--ipfs",
description: "Preserve to IPFS"
},
{
option: "--filecoin",
description: "Preserve to Filecoin"
},
{
option: "--buckets",
description: "Preserve to Textile Buckets"
}
];

Expand Down
6 changes: 1 addition & 5 deletions packages/truffle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@
"test:raw": "NO_BUILD=true mocha"
},
"optionalDependencies": {
"@truffle/db": "^1.0.8",
"@truffle/preserve-fs": "^0.2.7",
"@truffle/preserve-to-buckets": "^0.2.8",
"@truffle/preserve-to-filecoin": "^0.2.8",
"@truffle/preserve-to-ipfs": "^0.2.8"
"@truffle/db": "^1.0.8"
},
"dependencies": {
"@truffle/db-loader": "^0.1.18",
Expand Down
1 change: 0 additions & 1 deletion packages/truffle/test/scenarios/commands/help.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ describe("truffle help [ @standalone ]", function () {
)
);
assert(output.includes("--environment"));
assert(output.includes("--ipfs"));
});
});
});
Loading