Socket
Socket
Sign inDemoInstall

@atlaskit/platform-feature-flags

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/platform-feature-flags - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

6

CHANGELOG.md
# @atlaskit/platform-feature-flags
## 0.0.5
### Patch Changes
- [`1f19e1fe8c9`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1f19e1fe8c9) - Fix running unit tests and Storybook when Platform FF are enabled
## 0.0.4

@@ -4,0 +10,0 @@

7

dist/cjs/debug.js

@@ -6,8 +6,9 @@ "use strict";

});
exports.debug = exports.TESTS_MODE = void 0;
exports.debug = void 0;
var _ref, _process, _process$env, _process2, _process2$env;
var TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test') !== null && _ref !== void 0 ? _ref : false;
exports.TESTS_MODE = TESTS_MODE;
// We can't rely on NODE_ENV === 'test' if its value is already configured by the consumer to some other value, so better to use JEST_WORKER_ID
// https://jestjs.io/docs/environment-variables#jest_worker_id
var TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.JEST_WORKER_ID) !== undefined) !== null && _ref !== void 0 ? _ref : false;
var DEBUG_MODE = !TESTS_MODE && ((_process2 = process) === null || _process2 === void 0 ? void 0 : (_process2$env = _process2.env) === null || _process2$env === void 0 ? void 0 : _process2$env.NODE_ENV) !== 'production';

@@ -14,0 +15,0 @@

@@ -40,3 +40,3 @@ "use strict";

get: function get(target, key) {
if (_debug.TESTS_MODE && IN_TESTS_ENABLE_PLATFORM_FF) {
if (IN_TESTS_ENABLE_PLATFORM_FF) {
(0, _debug.debug)('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.', pkgName, key);

@@ -43,0 +43,0 @@

{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.4",
"version": "0.0.5",
"sideEffects": false
}
var _ref, _process, _process$env, _process2, _process2$env;
export const TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test') !== null && _ref !== void 0 ? _ref : false;
// We can't rely on NODE_ENV === 'test' if its value is already configured by the consumer to some other value, so better to use JEST_WORKER_ID
// https://jestjs.io/docs/environment-variables#jest_worker_id
const TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.JEST_WORKER_ID) !== undefined) !== null && _ref !== void 0 ? _ref : false;
const DEBUG_MODE = !TESTS_MODE && ((_process2 = process) === null || _process2 === void 0 ? void 0 : (_process2$env = _process2.env) === null || _process2$env === void 0 ? void 0 : _process2$env.NODE_ENV) !== 'production';

@@ -5,0 +7,0 @@ export const debug = (...args) => {

var _ref, _process, _process$env, _process2, _process2$env;
import { debug, TESTS_MODE } from './debug';
import { debug } from './debug';
const pkgName = '@atlaskit/platform-feature-flags';

@@ -33,3 +33,3 @@ const registry = {}; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK

get(target, key) {
if (TESTS_MODE && IN_TESTS_ENABLE_PLATFORM_FF) {
if (IN_TESTS_ENABLE_PLATFORM_FF) {
debug('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.', pkgName, key);

@@ -36,0 +36,0 @@

{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.4",
"version": "0.0.5",
"sideEffects": false
}
var _ref, _process, _process$env, _process2, _process2$env;
export var TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.NODE_ENV) === 'test') !== null && _ref !== void 0 ? _ref : false;
// We can't rely on NODE_ENV === 'test' if its value is already configured by the consumer to some other value, so better to use JEST_WORKER_ID
// https://jestjs.io/docs/environment-variables#jest_worker_id
var TESTS_MODE = (_ref = ((_process = process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.JEST_WORKER_ID) !== undefined) !== null && _ref !== void 0 ? _ref : false;
var DEBUG_MODE = !TESTS_MODE && ((_process2 = process) === null || _process2 === void 0 ? void 0 : (_process2$env = _process2.env) === null || _process2$env === void 0 ? void 0 : _process2$env.NODE_ENV) !== 'production';

@@ -5,0 +7,0 @@ export var debug = function debug() {

var _ref, _process, _process$env, _process2, _process2$env;
import { debug, TESTS_MODE } from './debug';
import { debug } from './debug';
var pkgName = '@atlaskit/platform-feature-flags';

@@ -32,3 +32,3 @@ var registry = {}; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK

get: function get(target, key) {
if (TESTS_MODE && IN_TESTS_ENABLE_PLATFORM_FF) {
if (IN_TESTS_ENABLE_PLATFORM_FF) {
debug('[%s]: The feature flags were enabled while running tests. The flag "%s" will be always enabled.', pkgName, key);

@@ -35,0 +35,0 @@

{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.4",
"version": "0.0.5",
"sideEffects": false
}

@@ -1,2 +0,1 @@

export declare const TESTS_MODE: boolean;
export declare const debug: (...args: unknown[]) => void;
{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.4",
"version": "0.0.5",
"description": "DO NOT USE",

@@ -5,0 +5,0 @@ "publishConfig": {

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