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

@americanexpress/one-app-locale-bundler

Package Overview
Dependencies
Maintainers
4
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@americanexpress/one-app-locale-bundler - npm Package Compare versions

Comparing version 6.5.7 to 6.5.8

20

__tests__/index.spec.js

@@ -19,2 +19,4 @@ /*

jest.useFakeTimers();
jest.mock('chokidar', () => {

@@ -32,2 +34,3 @@ const mockChokidar = {

jest.spyOn(process, 'cwd').mockImplementation(() => 'module/path');
const consoleLogSpy = jest.spyOn(console, 'log');

@@ -61,2 +64,19 @@ beforeEach(() => jest.clearAllMocks());

});
it('throws on initial error', async () => {
compileModuleLocales.mockRejectedValueOnce(new SyntaxError('some error'));
await expect(async () => {
await index();
jest.runAllTimers();
}).rejects.toThrowError(new SyntaxError('some error'));
});
it('logs to console on error during watch', async () => {
index(true);
compileModuleLocales.mockRejectedValueOnce(new SyntaxError('some error'));
await chokidar.on.mock.calls[0][1]();
jest.runAllTimers();
expect(consoleLogSpy).toHaveBeenCalledTimes(1);
expect(consoleLogSpy).toHaveBeenCalledWith('Error generating language packs: SyntaxError: some error');
});
});

1

__tests__/src/compileModuleLocales.spec.js

@@ -17,3 +17,2 @@ /*

// eslint-disable-next-line import/no-extraneous-dependencies -- erroneously thinks this is a dep, but we're in a test
const mockFs = require('mock-fs');

@@ -20,0 +19,0 @@

@@ -6,2 +6,13 @@ # Change Log

## [6.5.8](https://github.com/americanexpress/one-app-cli/compare/@americanexpress/one-app-locale-bundler@6.5.7...@americanexpress/one-app-locale-bundler@6.5.8) (2023-04-07)
### Bug Fixes
* **locale-bundler:** do not exit on errors during watch ([#511](https://github.com/americanexpress/one-app-cli/issues/511)) ([f0fd6f8](https://github.com/americanexpress/one-app-cli/commit/f0fd6f8da23a6f7b9e2e1973aea559e5b53b4c1e))
## [6.5.7](https://github.com/americanexpress/one-app-cli/compare/@americanexpress/one-app-locale-bundler@6.5.3...@americanexpress/one-app-locale-bundler@6.5.7) (2023-03-08)

@@ -8,0 +19,0 @@

@@ -22,3 +22,2 @@ /*

.catch((err) => {
/* istanbul ignore next */
setTimeout(() => { throw err; });

@@ -28,2 +27,9 @@ });

function runLocaleBundlerLogErrors(modulePath) {
return compileModuleLocales(modulePath)
.catch((err) => {
console.log(`Error generating language packs: ${err}`);
});
}
module.exports = function localeBundler(watch) {

@@ -38,4 +44,4 @@ const modulePath = process.cwd();

.watch(inputPath, { ignoreInitial: true })
.on('all', () => runLocaleBundler(modulePath));
.on('all', () => runLocaleBundlerLogErrors(modulePath));
}
};
{
"name": "@americanexpress/one-app-locale-bundler",
"version": "6.5.7",
"version": "6.5.8",
"description": "A command line interface(CLI) tool for bundling the locale files.",

@@ -55,2 +55,3 @@ "bin": {

"mkdirp": "^0.5.1",
"mock-fs": "^5.1.1",
"rimraf": "^3.0.2"

@@ -61,3 +62,3 @@ },

},
"gitHead": "d1ceff145f5fbc64190cc5fec1792120975cb487"
"gitHead": "8c0493a903de6b49d5304f4993372c31fc213a8a"
}
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