Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

linkmore-intl-generator

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

linkmore-intl-generator - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

17

dist/index.js

@@ -153,2 +153,3 @@ "use strict";

});
console.log('----', file);
file.getDescendantsOfKind(ts_morph_1.SyntaxKind.StringLiteral).forEach((literal) => {

@@ -272,2 +273,16 @@ const text = literal.getText(false);

/**
* class property
*/
file
.getDescendantsOfKind(ts_morph_1.SyntaxKind.ClassDeclaration)
.forEach((Variable) => {
Variable.getDescendantsOfKind(ts_morph_1.SyntaxKind.StringLiteral).forEach((literal) => {
const text = this.stripQuotation(literal.getText(false).trim());
if (this.haveChineseReg.test(text)) {
const targetText = replacer(text);
literal.replaceWithText(`${targetText}/* ts-morph: ${text} */`);
}
});
});
/**
* 其他的统一处理

@@ -321,3 +336,3 @@ */

// const filepath = path.resolve(process.cwd(), './Table/**/*.ts(x)?');
// const filepath = path.resolve(process.cwd(), './1.tsx');
// const filepath = path.resolve(process.cwd(), './store.ts');
// const configPath = path.resolve(process.cwd(), './common.ts');

@@ -324,0 +339,0 @@ // const util = new GenerateIntl({

6

dist/test.js

@@ -139,5 +139,5 @@ "use strict";

exports.default = GenerateIntl;
const filepath = path_1.default.resolve(process.cwd(), './Table/**/*.ts(x)?');
console.log('=====', filepath);
// const filepath = path.resolve(process.cwd(), './1.tsx');
// const filepath = path.resolve(process.cwd(), './Table/**/*.ts(x)?');
// console.log('=====', filepath)
const filepath = path_1.default.resolve(process.cwd(), './store.ts');
const configPath = path_1.default.resolve(process.cwd(), './common.ts');

@@ -144,0 +144,0 @@ const util = new GenerateIntl({

{
"name": "linkmore-intl-generator",
"version": "0.0.12",
"version": "0.0.13",
"description": "",

@@ -5,0 +5,0 @@ "keywords": [],

@@ -190,2 +190,4 @@ import fs from 'fs';

});
console.log('----', file);
file.getDescendantsOfKind(SyntaxKind.StringLiteral).forEach((literal) => {

@@ -320,2 +322,19 @@ const text = literal.getText(false);

/**
* class property
*/
file
.getDescendantsOfKind(SyntaxKind.ClassDeclaration)
.forEach((Variable) => {
Variable.getDescendantsOfKind(SyntaxKind.StringLiteral).forEach(
(literal) => {
const text = this.stripQuotation(literal.getText(false).trim());
if (this.haveChineseReg.test(text)) {
const targetText = replacer(text);
literal.replaceWithText(`${targetText}/* ts-morph: ${text} */`);
}
}
);
});
/**
* 其他的统一处理

@@ -373,3 +392,3 @@ */

// const filepath = path.resolve(process.cwd(), './Table/**/*.ts(x)?');
// const filepath = path.resolve(process.cwd(), './1.tsx');
// const filepath = path.resolve(process.cwd(), './store.ts');

@@ -376,0 +395,0 @@ // const configPath = path.resolve(process.cwd(), './common.ts');

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