Comparing version 5.0.0 to 5.0.1
@@ -5,2 +5,5 @@ declare type MacroableFn<T> = (this: T, ...args: any[]) => any; | ||
}; | ||
/** | ||
* Shape of the macroable constructor | ||
*/ | ||
export interface MacroableConstructorContract<T extends any> { | ||
@@ -7,0 +10,0 @@ macro(name: string, callback: MacroableFn<T>): void; |
# The MIT License | ||
Copyright 2018 thetutlage, contributors | ||
Copyright 2020 Harminder virk, contributors | ||
@@ -5,0 +5,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name": "macroable", | ||
"version": "5.0.0", | ||
"version": "5.0.1", | ||
"description": "A simple ES6 class that can be extended to provide macros and getters functionality", | ||
@@ -20,5 +20,6 @@ "main": "build/index.js", | ||
"version": "npm run build", | ||
"prepublishOnly": "npm run build", | ||
"format": "prettier --write .", | ||
"lint": "eslint . --ext=.ts", | ||
"prepublishOnly": "npm run build", | ||
"format": "prettier --write ." | ||
"sync-labels": "github-label-sync --labels ./node_modules/@adonisjs/mrm-preset/gh-labels.json poppinss/macroable" | ||
}, | ||
@@ -31,7 +32,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"@adonisjs/mrm-preset": "^2.3.6", | ||
"@types/node": "^14.0.14", | ||
"@adonisjs/mrm-preset": "^2.4.0", | ||
"@types/node": "^14.0.23", | ||
"commitizen": "^4.1.2", | ||
"cz-conventional-changelog": "^3.2.0", | ||
"del-cli": "^3.0.1", | ||
"doctoc": "^1.4.0", | ||
"eslint": "^7.4.0", | ||
@@ -41,9 +43,11 @@ "eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"github-label-sync": "^2.0.0", | ||
"husky": "^4.2.5", | ||
"japa": "^3.1.1", | ||
"mrm": "^2.3.3", | ||
"np": "^6.2.5", | ||
"np": "^6.3.2", | ||
"npm-audit-html": "^1.4.1", | ||
"prettier": "^2.0.5", | ||
"ts-node": "^8.10.2", | ||
"typescript": "^3.9.6" | ||
"typescript": "^3.9.7" | ||
}, | ||
@@ -74,3 +78,4 @@ "dependencies": {}, | ||
"hooks": { | ||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js" | ||
"commit-msg": "node ./node_modules/@adonisjs/mrm-preset/validateCommit/conventional/validate.js", | ||
"pre-commit": "npm audit --production --json | ./node_modules/.bin/npm-audit-html && git add npm-audit.html && doctoc README.md --title='## Table of contents' && git add README.md" | ||
} | ||
@@ -77,0 +82,0 @@ }, |
@@ -6,3 +6,3 @@ <div align="center"><img src="https://res.cloudinary.com/adonisjs/image/upload/q_100/v1557762307/poppinss_iftxlt.jpg" width="600px"></div> | ||
[![circleci-image]][circleci-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] | ||
[![circleci-image]][circleci-url] [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url] [![audit-report-image]][audit-report-url] | ||
@@ -13,3 +13,9 @@ Base class for exposing external API to extend the class prototype in a more declarative way. | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
## Table of contents | ||
- [Traditional approach](#traditional-approach) | ||
- [Using macroable](#using-macroable) | ||
- [Defining singleton getters](#defining-singleton-getters) | ||
- [Hydrating the class](#hydrating-the-class) | ||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
@@ -42,4 +48,4 @@ | ||
```js | ||
const { Macroable } from 'macroable' | ||
```ts | ||
import { Macroable } from 'macroable' | ||
@@ -52,7 +58,7 @@ class Foo extends Macroable { | ||
module.exports = Foo | ||
export default Foo | ||
``` | ||
```js | ||
const Foo = require('./Foo') | ||
```ts | ||
import Foo from './Foo' | ||
@@ -107,1 +113,4 @@ Foo.macro('greet', function () { | ||
[license-url]: LICENSE.md "license" | ||
[audit-report-image]: https://img.shields.io/badge/-Audit%20Report-blueviolet?style=for-the-badge | ||
[audit-report-url]: https://htmlpreview.github.io/?https://github.com/poppinss/macroable/blob/develop/npm-audit.html "audit-report" |
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
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
12948
195
112
19