New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@atlaskit/platform-feature-flags

Package Overview
Dependencies
Maintainers
1
Versions
25
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

to
1.0.0

10

CHANGELOG.md
# @atlaskit/platform-feature-flags
## 1.0.0
### Major Changes
- [#109595](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/109595)
[`eb593520aff62`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/eb593520aff62) -
EDF-2229 fg util will not fallback to FeatureGate.checkGate when booleanResolver does not exist.
Major release as @atlaskit/feature-gate-js-client package added as dependency having major
releases.
## 0.3.0

@@ -4,0 +14,0 @@

4

dist/cjs/debug.js

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

exports.debug = void 0;
var _ref, _process, _process2;
var _process, _process2;
// 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 = (globalThis === null || globalThis === void 0 || (_process = globalThis.process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.JEST_WORKER_ID) !== undefined) !== null && _ref !== void 0 ? _ref : false;
var TESTS_MODE = (globalThis === null || globalThis === void 0 || (_process = globalThis.process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.JEST_WORKER_ID) !== undefined;
var DEBUG_MODE = !TESTS_MODE && (globalThis === null || globalThis === void 0 || (_process2 = globalThis.process) === null || _process2 === void 0 || (_process2 = _process2.env) === null || _process2 === void 0 ? void 0 : _process2.NODE_ENV) !== 'production';

@@ -13,0 +13,0 @@ var debug = exports.debug = function debug() {

"use strict";
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {

@@ -9,2 +10,3 @@ value: true

exports.setBooleanResolver = setBooleanResolver;
var _featureGateJsClient = _interopRequireDefault(require("@atlaskit/feature-gate-js-client"));
var _debug = require("./debug");

@@ -57,4 +59,10 @@ var pkgName = '@atlaskit/platform-feature-flags';

try {
var _globalVar$PFF_GLOBAL2;
var result = (_globalVar$PFF_GLOBAL2 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL2 === void 0 ? void 0 : _globalVar$PFF_GLOBAL2.booleanResolver(flagKey);
var _globalVar$PFF_GLOBAL2, _globalVar$PFF_GLOBAL3, _globalVar$PFF_GLOBAL4;
// booleanResolver will be empty for products like Trello, Elevate, Recruit etc.
// Currently only Confluence, Jira and Bitbucket has set it.
if (((_globalVar$PFF_GLOBAL2 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL2 === void 0 ? void 0 : _globalVar$PFF_GLOBAL2.booleanResolver) === undefined || ((_globalVar$PFF_GLOBAL3 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL3 === void 0 ? void 0 : _globalVar$PFF_GLOBAL3.booleanResolver) === null) {
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
return _featureGateJsClient.default.checkGate(flagKey);
}
var result = (_globalVar$PFF_GLOBAL4 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL4 === void 0 ? void 0 : _globalVar$PFF_GLOBAL4.booleanResolver(flagKey);
if (typeof result !== 'boolean') {

@@ -61,0 +69,0 @@ // eslint-disable-next-line no-console

@@ -1,5 +0,5 @@

var _ref, _process, _process$env, _process2, _process2$env;
var _process, _process$env, _process2, _process2$env;
// 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 = (globalThis === null || globalThis === void 0 ? void 0 : (_process = globalThis.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 TESTS_MODE = (globalThis === null || globalThis === void 0 ? void 0 : (_process = globalThis.process) === null || _process === void 0 ? void 0 : (_process$env = _process.env) === null || _process$env === void 0 ? void 0 : _process$env.JEST_WORKER_ID) !== undefined;
const DEBUG_MODE = !TESTS_MODE && (globalThis === null || globalThis === void 0 ? void 0 : (_process2 = globalThis.process) === null || _process2 === void 0 ? void 0 : (_process2$env = _process2.env) === null || _process2$env === void 0 ? void 0 : _process2$env.NODE_ENV) !== 'production';

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

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

import FeatureGates from '@atlaskit/feature-gate-js-client';
import { debug } from './debug';

@@ -48,4 +49,10 @@ const pkgName = '@atlaskit/platform-feature-flags';

try {
var _globalVar$PFF_GLOBAL3;
const result = (_globalVar$PFF_GLOBAL3 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL3 === void 0 ? void 0 : _globalVar$PFF_GLOBAL3.booleanResolver(flagKey);
var _globalVar$PFF_GLOBAL3, _globalVar$PFF_GLOBAL4, _globalVar$PFF_GLOBAL5;
// booleanResolver will be empty for products like Trello, Elevate, Recruit etc.
// Currently only Confluence, Jira and Bitbucket has set it.
if (((_globalVar$PFF_GLOBAL3 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL3 === void 0 ? void 0 : _globalVar$PFF_GLOBAL3.booleanResolver) === undefined || ((_globalVar$PFF_GLOBAL4 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL4 === void 0 ? void 0 : _globalVar$PFF_GLOBAL4.booleanResolver) === null) {
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
return FeatureGates.checkGate(flagKey);
}
const result = (_globalVar$PFF_GLOBAL5 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL5 === void 0 ? void 0 : _globalVar$PFF_GLOBAL5.booleanResolver(flagKey);
if (typeof result !== 'boolean') {

@@ -52,0 +59,0 @@ // eslint-disable-next-line no-console

@@ -1,5 +0,5 @@

var _ref, _process, _process2;
var _process, _process2;
// 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 = (globalThis === null || globalThis === void 0 || (_process = globalThis.process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.JEST_WORKER_ID) !== undefined) !== null && _ref !== void 0 ? _ref : false;
var TESTS_MODE = (globalThis === null || globalThis === void 0 || (_process = globalThis.process) === null || _process === void 0 || (_process = _process.env) === null || _process === void 0 ? void 0 : _process.JEST_WORKER_ID) !== undefined;
var DEBUG_MODE = !TESTS_MODE && (globalThis === null || globalThis === void 0 || (_process2 = globalThis.process) === null || _process2 === void 0 || (_process2 = _process2.env) === null || _process2 === void 0 ? void 0 : _process2.NODE_ENV) !== 'production';

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

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

import FeatureGates from '@atlaskit/feature-gate-js-client';
import { debug } from './debug';

@@ -48,4 +49,10 @@ var pkgName = '@atlaskit/platform-feature-flags';

try {
var _globalVar$PFF_GLOBAL2;
var result = (_globalVar$PFF_GLOBAL2 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL2 === void 0 ? void 0 : _globalVar$PFF_GLOBAL2.booleanResolver(flagKey);
var _globalVar$PFF_GLOBAL2, _globalVar$PFF_GLOBAL3, _globalVar$PFF_GLOBAL4;
// booleanResolver will be empty for products like Trello, Elevate, Recruit etc.
// Currently only Confluence, Jira and Bitbucket has set it.
if (((_globalVar$PFF_GLOBAL2 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL2 === void 0 ? void 0 : _globalVar$PFF_GLOBAL2.booleanResolver) === undefined || ((_globalVar$PFF_GLOBAL3 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL3 === void 0 ? void 0 : _globalVar$PFF_GLOBAL3.booleanResolver) === null) {
// eslint-disable-next-line @atlaskit/platform/use-recommended-utils
return FeatureGates.checkGate(flagKey);
}
var result = (_globalVar$PFF_GLOBAL4 = globalVar[PFF_GLOBAL_KEY]) === null || _globalVar$PFF_GLOBAL4 === void 0 ? void 0 : _globalVar$PFF_GLOBAL4.booleanResolver(flagKey);
if (typeof result !== 'boolean') {

@@ -52,0 +59,0 @@ // eslint-disable-next-line no-console

{
"name": "@atlaskit/platform-feature-flags",
"version": "0.3.0",
"version": "1.0.0",
"description": "Platform Feature Flags",

@@ -29,9 +29,4 @@ "publishConfig": {

"atlassian": {
"team": "UIP - Platform Integration Trust (PITa)",
"singleton": true,
"inPublicMirror": true,
"releaseModel": "continuous",
"productPushConsumption": [
"jira"
]
"team": "Build Infra",
"singleton": true
},

@@ -46,5 +41,5 @@ "files": [

"dependencies": {
"@atlaskit/feature-gate-js-client": "^4.23.0",
"@babel/runtime": "^7.0.0"
},
"peerDependencies": {},
"bugs": {

@@ -51,0 +46,0 @@ "url": "https://bitbucket.org/atlassian/atlassian-frontend-mirror/issues"