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.6 to 0.0.7

6

CHANGELOG.md
# @atlaskit/platform-feature-flags
## 0.0.7
### Patch Changes
- [`f81aa3efb8b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/f81aa3efb8b) - Fix overriding platform FFs by Storybook and test's runners
## 0.0.6

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

13

dist/cjs/registry.js

@@ -10,9 +10,12 @@ "use strict";

var _ref, _globalThis$process, _globalThis$process$e, _globalThis$process2, _globalThis$process2$;
var pkgName = '@atlaskit/platform-feature-flags';
var registry = {}; // FF global overrides can be configured by test runners or Storybook
var pkgName = '@atlaskit/platform-feature-flags';
var registry = {}; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
var ENV_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['ENABLE_PLATFORM_FF'] === 'true' : false; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
// https://github.com/storybookjs/storybook/issues/12270
var IN_TESTS_ENABLE_PLATFORM_FF = (_ref = (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : (_globalThis$process$e = _globalThis$process.env) === null || _globalThis$process$e === void 0 ? void 0 : _globalThis$process$e.ENABLE_PLATFORM_FF) === 'true' || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 ? void 0 : (_globalThis$process2$ = _globalThis$process2.env) === null || _globalThis$process2$ === void 0 ? void 0 : _globalThis$process2$.STORYBOOK_ENABLE_PLATFORM_FF) === 'true') !== null && _ref !== void 0 ? _ref : false; // A list of property keys that are not allowed to exist on the store proxy object.
var ENV_STORYBOOK_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['STORYBOOK_ENABLE_PLATFORM_FF'] === 'true' : false;
var ENABLE_GLOBAL_PLATFORM_FF_OVERRIDE = ENV_ENABLE_PLATFORM_FF || ENV_STORYBOOK_ENABLE_PLATFORM_FF; // A list of property keys that are not allowed to exist on the store proxy object.

@@ -41,3 +44,3 @@ var IN_TESTS_UNDEFINED_KEYS = [// Ensures we don't blow up jest when running tests. Jest is trying to be “smart” about what global variables it should clean when those are mocked.

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

@@ -44,0 +47,0 @@

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

@@ -1,9 +0,12 @@

var _ref, _globalThis$process, _globalThis$process$e, _globalThis$process2, _globalThis$process2$;
import { debug } from './debug';
const pkgName = '@atlaskit/platform-feature-flags';
const registry = {}; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
const registry = {}; // FF global overrides can be configured by test runners or Storybook
const ENV_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['ENABLE_PLATFORM_FF'] === 'true' : false; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
// https://github.com/storybookjs/storybook/issues/12270
const IN_TESTS_ENABLE_PLATFORM_FF = (_ref = (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : (_globalThis$process$e = _globalThis$process.env) === null || _globalThis$process$e === void 0 ? void 0 : _globalThis$process$e.ENABLE_PLATFORM_FF) === 'true' || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 ? void 0 : (_globalThis$process2$ = _globalThis$process2.env) === null || _globalThis$process2$ === void 0 ? void 0 : _globalThis$process2$.STORYBOOK_ENABLE_PLATFORM_FF) === 'true') !== null && _ref !== void 0 ? _ref : false; // A list of property keys that are not allowed to exist on the store proxy object.
const ENV_STORYBOOK_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['STORYBOOK_ENABLE_PLATFORM_FF'] === 'true' : false;
const ENABLE_GLOBAL_PLATFORM_FF_OVERRIDE = ENV_ENABLE_PLATFORM_FF || ENV_STORYBOOK_ENABLE_PLATFORM_FF; // A list of property keys that are not allowed to exist on the store proxy object.

@@ -33,3 +36,3 @@ const IN_TESTS_UNDEFINED_KEYS = [// Ensures we don't blow up jest when running tests. Jest is trying to be “smart” about what global variables it should clean when those are mocked.

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

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

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

@@ -1,9 +0,12 @@

var _ref, _globalThis$process, _globalThis$process$e, _globalThis$process2, _globalThis$process2$;
import { debug } from './debug';
var pkgName = '@atlaskit/platform-feature-flags';
var registry = {}; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
var registry = {}; // FF global overrides can be configured by test runners or Storybook
var ENV_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['ENABLE_PLATFORM_FF'] === 'true' : false; // STORYBOOK_ENABLE_PLATFORM_FF is included as storybook only allows env vars prefixed with STORYBOOK
// https://github.com/storybookjs/storybook/issues/12270
var IN_TESTS_ENABLE_PLATFORM_FF = (_ref = (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process = globalThis.process) === null || _globalThis$process === void 0 ? void 0 : (_globalThis$process$e = _globalThis$process.env) === null || _globalThis$process$e === void 0 ? void 0 : _globalThis$process$e.ENABLE_PLATFORM_FF) === 'true' || (globalThis === null || globalThis === void 0 ? void 0 : (_globalThis$process2 = globalThis.process) === null || _globalThis$process2 === void 0 ? void 0 : (_globalThis$process2$ = _globalThis$process2.env) === null || _globalThis$process2$ === void 0 ? void 0 : _globalThis$process2$.STORYBOOK_ENABLE_PLATFORM_FF) === 'true') !== null && _ref !== void 0 ? _ref : false; // A list of property keys that are not allowed to exist on the store proxy object.
var ENV_STORYBOOK_ENABLE_PLATFORM_FF = // Use global "process" variable and process.env['FLAG_NAME'] syntax, so it can be replaced by webpack DefinePlugin
typeof process !== 'undefined' ? process.env['STORYBOOK_ENABLE_PLATFORM_FF'] === 'true' : false;
var ENABLE_GLOBAL_PLATFORM_FF_OVERRIDE = ENV_ENABLE_PLATFORM_FF || ENV_STORYBOOK_ENABLE_PLATFORM_FF; // A list of property keys that are not allowed to exist on the store proxy object.

@@ -32,3 +35,3 @@ var IN_TESTS_UNDEFINED_KEYS = [// Ensures we don't blow up jest when running tests. Jest is trying to be “smart” about what global variables it should clean when those are mocked.

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

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

{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.6",
"version": "0.0.7",
"sideEffects": false
}
{
"name": "@atlaskit/platform-feature-flags",
"version": "0.0.6",
"version": "0.0.7",
"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