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

@wordpress/deprecated

Package Overview
Dependencies
Maintainers
10
Versions
154
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.5.0 to 2.6.0

4

build-module/index.js

@@ -47,7 +47,7 @@ /**

var pluginMessage = plugin ? " from ".concat(plugin) : '';
var versionMessage = version ? "".concat(pluginMessage, " in ").concat(version) : '';
var versionMessage = version ? " and will be removed".concat(pluginMessage, " in version ").concat(version) : '';
var useInsteadMessage = alternative ? " Please use ".concat(alternative, " instead.") : '';
var linkMessage = link ? " See: ".concat(link) : '';
var hintMessage = hint ? " Note: ".concat(hint) : '';
var message = "".concat(feature, " is deprecated and will be removed").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged.
var message = "".concat(feature, " is deprecated").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged.

@@ -54,0 +54,0 @@ if (message in logged) {

@@ -58,7 +58,7 @@ "use strict";

var pluginMessage = plugin ? " from ".concat(plugin) : '';
var versionMessage = version ? "".concat(pluginMessage, " in ").concat(version) : '';
var versionMessage = version ? " and will be removed".concat(pluginMessage, " in version ").concat(version) : '';
var useInsteadMessage = alternative ? " Please use ".concat(alternative, " instead.") : '';
var linkMessage = link ? " See: ".concat(link) : '';
var hintMessage = hint ? " Note: ".concat(hint) : '';
var message = "".concat(feature, " is deprecated and will be removed").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged.
var message = "".concat(feature, " is deprecated").concat(versionMessage, ".").concat(useInsteadMessage).concat(linkMessage).concat(hintMessage); // Skip if already logged.

@@ -65,0 +65,0 @@ if (message in logged) {

@@ -0,1 +1,7 @@

## Master
### Bug Fix
- When there is no `options.version` param provided `deprecated` method warns with more relaxed tone.
## 2.0.4 (2019-01-03)

@@ -2,0 +8,0 @@

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

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

"@babel/runtime": "^7.4.4",
"@wordpress/hooks": "^2.5.0"
"@wordpress/hooks": "^2.6.0"
},

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

},
"gitHead": "2080b50d4a41c9f746485519d1dc368dd9d9354d"
"gitHead": "989502eccaadee1ea7666d6d9fb9f4d08b274546"
}

@@ -49,7 +49,7 @@ /**

const pluginMessage = plugin ? ` from ${ plugin }` : '';
const versionMessage = version ? `${ pluginMessage } in ${ version }` : '';
const versionMessage = version ? ` and will be removed${ pluginMessage } in version ${ version }` : '';
const useInsteadMessage = alternative ? ` Please use ${ alternative } instead.` : '';
const linkMessage = link ? ` See: ${ link }` : '';
const hintMessage = hint ? ` Note: ${ hint }` : '';
const message = `${ feature } is deprecated and will be removed${ versionMessage }.${ useInsteadMessage }${ linkMessage }${ hintMessage }`;
const message = `${ feature } is deprecated${ versionMessage }.${ useInsteadMessage }${ linkMessage }${ hintMessage }`;

@@ -56,0 +56,0 @@ // Skip if already logged.

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

expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed.'
'Eating meat is deprecated.'
);

@@ -28,6 +28,6 @@ } );

it( 'should show a deprecation warning with a version', () => {
deprecated( 'Eating meat', { version: 'the future' } );
deprecated( 'Eating meat', { version: '2020.01.01' } );
expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed in the future.'
'Eating meat is deprecated and will be removed in version 2020.01.01.'
);

@@ -37,6 +37,6 @@ } );

it( 'should show a deprecation warning with an alternative', () => {
deprecated( 'Eating meat', { version: 'the future', alternative: 'vegetables' } );
deprecated( 'Eating meat', { version: '2020.01.01', alternative: 'vegetables' } );
expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed in the future. Please use vegetables instead.'
'Eating meat is deprecated and will be removed in version 2020.01.01. Please use vegetables instead.'
);

@@ -47,3 +47,3 @@ } );

deprecated( 'Eating meat', {
version: 'the future',
version: '2020.01.01',
alternative: 'vegetables',

@@ -54,3 +54,3 @@ plugin: 'the earth',

expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead.'
'Eating meat is deprecated and will be removed from the earth in version 2020.01.01. Please use vegetables instead.'
);

@@ -61,3 +61,3 @@ } );

deprecated( 'Eating meat', {
version: 'the future',
version: '2020.01.01',
alternative: 'vegetables',

@@ -69,3 +69,3 @@ plugin: 'the earth',

expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead. See: https://en.wikipedia.org/wiki/Vegetarianism'
'Eating meat is deprecated and will be removed from the earth in version 2020.01.01. Please use vegetables instead. See: https://en.wikipedia.org/wiki/Vegetarianism'
);

@@ -76,3 +76,3 @@ } );

deprecated( 'Eating meat', {
version: 'the future',
version: '2020.01.01',
alternative: 'vegetables',

@@ -84,3 +84,3 @@ plugin: 'the earth',

expect( console ).toHaveWarnedWith(
'Eating meat is deprecated and will be removed from the earth in the future. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
'Eating meat is deprecated and will be removed from the earth in version 2020.01.01. Please use vegetables instead. Note: You may find it beneficial to transition gradually.'
);

@@ -87,0 +87,0 @@ } );

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