@gasket/plugin-lifecycle
Advanced tools
Comparing version 6.43.2-canary-esm-port.0 to 6.45.0
@@ -1,8 +0,5 @@ | ||
import { default as diagnostics } from 'diagnostics'; | ||
const debug = diagnostics('gasket:lifecycle'); | ||
import path from 'path'; | ||
import { readdir } from 'fs/promises'; | ||
import lodash from 'lodash'; | ||
const { camelcase: camelCase } = lodash; | ||
import { default as pkg } from '../package.json' assert { type: 'json' }; | ||
const debug = require('diagnostics')('gasket:lifecycle'); | ||
const path = require('path'); | ||
const { readdir } = require('fs').promises; | ||
const camelCase = require('lodash.camelcase'); | ||
@@ -32,7 +29,7 @@ /** | ||
return files.filter(file => isJs.test(file) && !isTest.test(file)) | ||
.map(async function each(file) { | ||
.map(function each(file) { | ||
const extname = path.extname(file); | ||
const event = camelCase(path.basename(file, extname)); | ||
let hook = await import(path.join(dir, file)); | ||
let hook = require(path.join(dir, file)); | ||
debug('found %s as lifecycle for %s', file, event); | ||
@@ -77,4 +74,4 @@ | ||
*/ | ||
export const hooks = { | ||
name: pkg.name, | ||
module.exports = { | ||
name: require('../package').name, | ||
hooks: { | ||
@@ -81,0 +78,0 @@ init, |
{ | ||
"name": "@gasket/plugin-lifecycle", | ||
"version": "6.43.2-canary-esm-port.0", | ||
"version": "6.45.0", | ||
"description": "Allows a gasket/ directory to be used for lifecycle hooks in applications.", | ||
"main": "lib/index.js", | ||
"main": "lib", | ||
"files": [ | ||
"lib" | ||
], | ||
"type": "module", | ||
"scripts": { | ||
@@ -44,10 +43,10 @@ "lint": "eslint .", | ||
"devDependencies": { | ||
"@gasket/engine": "^6.43.2-canary-esm-port.0", | ||
"@gasket/engine": "^6.45.0", | ||
"cross-env": "^7.0.3", | ||
"eslint": "^8.7.0", | ||
"eslint-config-godaddy": "^7.0.0", | ||
"eslint-plugin-jest": "^27.2.1", | ||
"eslint": "^8.56.0", | ||
"eslint-config-godaddy": "^7.0.2", | ||
"eslint-plugin-jest": "^27.6.3", | ||
"eslint-plugin-json": "^3.1.0", | ||
"eslint-plugin-unicorn": "^44.0.0", | ||
"jest": "^29.3.1" | ||
"jest": "^29.7.0" | ||
}, | ||
@@ -71,3 +70,3 @@ "eslintConfig": { | ||
}, | ||
"gitHead": "f7e3283fa63e20f353587fe7f4653ebf684538c8" | ||
"gitHead": "e567d11560a0d3721ffbd4649fa4ee8b6b739afb" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1
6486
79
2
No