Socket
Socket
Sign inDemoInstall

@wordpress/deprecated

Package Overview
Dependencies
Maintainers
14
Versions
150
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/deprecated - npm Package Compare versions

Comparing version 2.6.1 to 2.7.0

2

LICENSE.md
### WordPress - Web publishing software
Copyright 2011-2019 by the contributors
Copyright 2011-2020 by the contributors

@@ -5,0 +5,0 @@ This program is free software; you can redistribute it and/or modify

{
"name": "@wordpress/deprecated",
"version": "2.6.1",
"version": "2.7.0",
"description": "Deprecation utility for WordPress.",

@@ -25,4 +25,4 @@ "author": "The WordPress Contributors",

"dependencies": {
"@babel/runtime": "^7.4.4",
"@wordpress/hooks": "^2.6.0"
"@babel/runtime": "^7.8.3",
"@wordpress/hooks": "^2.7.0"
},

@@ -32,3 +32,3 @@ "publishConfig": {

},
"gitHead": "707754784420a7089ae31ec4d6c756ce9af9c782"
"gitHead": "41fc84af285da696c65c235331ee245dfe23971d"
}

@@ -40,13 +40,11 @@ /**

export default function deprecated( feature, options = {} ) {
const {
version,
alternative,
plugin,
link,
hint,
} = options;
const { version, alternative, plugin, link, hint } = options;
const pluginMessage = plugin ? ` from ${ plugin }` : '';
const versionMessage = version ? ` and will be removed${ pluginMessage } in version ${ version }` : '';
const useInsteadMessage = alternative ? ` Please use ${ alternative } instead.` : '';
const versionMessage = version
? ` and will be removed${ pluginMessage } in version ${ version }`
: '';
const useInsteadMessage = alternative
? ` Please use ${ alternative } instead.`
: '';
const linkMessage = link ? ` See: ${ link }` : '';

@@ -53,0 +51,0 @@ const hintMessage = hint ? ` Note: ${ hint }` : '';

@@ -21,5 +21,3 @@ /**

expect( console ).toHaveWarnedWith(
'Eating meat is deprecated.'
);
expect( console ).toHaveWarnedWith( 'Eating meat is deprecated.' );
} );

@@ -36,3 +34,6 @@

it( 'should show a deprecation warning with an alternative', () => {
deprecated( 'Eating meat', { version: '2020.01.01', alternative: 'vegetables' } );
deprecated( 'Eating meat', {
version: '2020.01.01',
alternative: 'vegetables',
} );

@@ -39,0 +40,0 @@ expect( console ).toHaveWarnedWith(

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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