New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ant-design/pro-cli

Package Overview
Dependencies
Maintainers
23
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ant-design/pro-cli - npm Package Compare versions

Comparing version 2.1.4 to 2.1.5

2

package.json
{
"name": "@ant-design/pro-cli",
"version": "2.1.4",
"version": "2.1.5",
"description": "The command tool for ant design pro",

@@ -5,0 +5,0 @@ "bin": {

@@ -7,3 +7,8 @@ const fs = require('fs')

const absolutePath = process.cwd()
const content = fs.readFileSync(path.join(absolutePath, '/config/routes.ts'), 'utf-8')
let content
if (fs.existsSync(path.join(absolutePath, '/config/routes.ts'))) {
content = fs.readFileSync(path.join(absolutePath, '/config/routes.ts'), 'utf-8')
} else if (fs.existsSync(path.join(absolutePath, '/config/routes.js'))) {
content = fs.readFileSync(path.join(absolutePath, '/config/routes.js'), 'utf-8')
} else return
const formatContent = content.replace('export default', 'module.exports =')

@@ -10,0 +15,0 @@ fs.writeFileSync('./routes.js', formatContent)

@@ -39,14 +39,11 @@ /* eslint-disable no-param-reassign */

if (filePath === 'config/config.ts') {
if (
path.isIdentifier({ name: 'locale' }) &&
path.container.value.type === 'ObjectExpression'
) {
if (path.isIdentifier({name: "locale"}) && path.container.value.type === 'ObjectExpression') {
// path.replaceWith(t.Identifier(''))
path.parentPath.remove();
path.parentPath.remove()
}
}
if (path.isIdentifier({ name: 'useIntl' })) {
if (path.isIdentifier({name: "useIntl"})) {
if (path.parentPath.parentPath.type === 'VariableDeclarator') {
path.parentPath.parentPath.remove();
path.parentPath.parentPath.remove()
}

@@ -70,6 +67,5 @@ }

}
if (path.node.source.value === 'umi-plugin-react/locale') {
path.remove();
return;
return
}

@@ -107,2 +103,3 @@ }

const message = genMessage(params, localeMap);
const container = path.parentPath.parentPath;

@@ -114,3 +111,3 @@

}
return;
return
}

@@ -177,3 +174,3 @@ const params = {};

// path.parentPath.parentPath.replaceWith(t.JSXOpeningElement(t.JSXIdentifier('span'), [t.JSXAttribute(t.JSXIdentifier('data-lang-tag'))], true));
path.parentPath.parentPath.parentPath.remove();
path.parentPath.parentPath.parentPath.remove()
}

@@ -183,7 +180,8 @@

// path.parentPath.replaceWith(t.JSXOpeningElement(t.JSXIdentifier('span'), [t.JSXAttribute(t.JSXIdentifier('data-lang-tag'))], true));
path.parentPath.parentPath.remove();
path.parentPath.parentPath.remove()
}
if (path.node.source && path.node.source.value === 'umi' && !path.node.specifiers.length) {
path.remove();
path.remove()
return
}

@@ -193,2 +191,3 @@ },

if (p.container && p.container.property && p.container.property.name === 'formatMessage') {
const parent = p.parentPath;

@@ -208,3 +207,4 @@ const { arguments: formatMessageArguments } = parent.container;

}
},
}
});

@@ -211,0 +211,0 @@ };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc