Socket
Socket
Sign inDemoInstall

egg-core

Package Overview
Dependencies
16
Maintainers
11
Versions
137
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.13.0 to 4.13.1

6

History.md
4.13.1 / 2019-01-11
==================
**others**
* [[`35ed3fa`](http://github.com/eggjs/egg-core/commit/35ed3fa2baf4cbcfee9f9e307e9f9f56fb93349d)] - refactor(jest-support): Replace require.extensions with Module._extensions (#196) (Gray <<njugray@gmail.com>>)
4.13.0 / 2018-12-14

@@ -3,0 +9,0 @@ ==================

2

lib/loader/file_loader.js

@@ -125,3 +125,3 @@ 'use strict';

if (!files) {
files = (process.env.EGG_TYPESCRIPT === 'true' && utils.extensions.includes('.ts'))
files = (process.env.EGG_TYPESCRIPT === 'true' && utils.extensions['.ts'])
? [ '**/*.(js|ts)', '!**/*.d.ts' ]

@@ -128,0 +128,0 @@ : [ '**/*.js' ];

@@ -8,14 +8,12 @@ 'use strict';

const co = require('co');
const extensions = Object.keys(require.extensions);
/* istanbul ignore if */
if (!extensions.length) {
// adapt for jest
extensions.push('.js', '.node', '.json');
if (process.env.EGG_TYPESCRIPT === 'true') {
extensions.push('.ts');
}
}
const BuiltinModule = require('module');
// Guard against poorly mocked module constructors.
const Module = module.constructor.length > 1
? module.constructor
/* istanbul ignore next */
: BuiltinModule;
module.exports = {
extensions,
extensions: Module._extensions,

@@ -26,3 +24,3 @@ loadFile(filepath) {

const extname = path.extname(filepath);
if (extname && !extensions.includes(extname)) {
if (extname && !Module._extensions[extname]) {
return fs.readFileSync(filepath);

@@ -29,0 +27,0 @@ }

{
"name": "egg-core",
"version": "4.13.0",
"version": "4.13.1",
"description": "A core Pluggable framework based on koa",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc