Skip to content

Commit

Permalink
chore(#673): remove obsolete mustache.js library
Browse files Browse the repository at this point in the history
  • Loading branch information
grubersjoe committed Oct 25, 2023
1 parent 1f0bde4 commit 8ed385f
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 30 deletions.
14 changes: 0 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/bruno-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"https-proxy-agent": "^7.0.2",
"inquirer": "^9.1.4",
"lodash": "^4.17.21",
"mustache": "^4.2.0",
"qs": "^6.11.0",
"socks-proxy-agent": "^8.0.2",
"yargs": "^17.6.2"
Expand Down
8 changes: 1 addition & 7 deletions packages/bruno-cli/src/utils/bru.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
const _ = require('lodash');
const Mustache = require('mustache');
const { bruToEnvJsonV2, bruToJsonV2, collectionBruToJson: _collectionBruToJson } = require('@usebruno/lang');

// override the default escape function to prevent escaping
Mustache.escape = function (value) {
return value;
};

const collectionBruToJson = (bru) => {
try {
const json = _collectionBruToJson(bru);
Expand Down Expand Up @@ -96,7 +90,7 @@ const getEnvVars = (environment = {}) => {
const envVars = {};
_.each(variables, (variable) => {
if (variable.enabled) {
envVars[variable.name] = Mustache.escape(variable.value);
envVars[variable.name] = variable.value;
}
});

Expand Down
1 change: 0 additions & 1 deletion packages/bruno-electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
"js-yaml": "^4.1.0",
"lodash": "^4.17.21",
"mime-types": "^2.1.35",
"mustache": "^4.2.0",
"nanoid": "3.3.4",
"node-machine-id": "^1.1.12",
"qs": "^6.11.0",
Expand Down
8 changes: 1 addition & 7 deletions packages/bruno-electron/src/ipc/network/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ const https = require('https');
const axios = require('axios');
const path = require('path');
const decomment = require('decomment');
const Mustache = require('mustache');
const FormData = require('form-data');
const contentDispositionParser = require('content-disposition');
const mime = require('mime-types');
Expand All @@ -29,11 +28,6 @@ const { addAwsV4Interceptor, resolveAwsV4Credentials } = require('./awsv4auth-he
const { shouldUseProxy, PatchedHttpsProxyAgent } = require('../../utils/proxy-util');
const { chooseFileToSave, writeBinaryFile } = require('../../utils/filesystem');

// override the default escape function to prevent escaping
Mustache.escape = function (value) {
return value;
};

const safeStringifyJSON = (data) => {
try {
return JSON.stringify(data);
Expand Down Expand Up @@ -61,7 +55,7 @@ const getEnvVars = (environment = {}) => {
const envVars = {};
each(variables, (variable) => {
if (variable.enabled) {
envVars[variable.name] = Mustache.escape(variable.value);
envVars[variable.name] = variable.value;
}
});

Expand Down

0 comments on commit 8ed385f

Please sign in to comment.