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

internaldocs-fb-helpers

Package Overview
Dependencies
Maintainers
4
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

internaldocs-fb-helpers - npm Package Compare versions

Comparing version 1.7.0 to 1.7.1

4

dist/index.d.ts

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

export declare function validateFbContentArgs<X, Y>(args: FbContent<X, Y>): void;
export declare function isInternal(): Boolean;
export declare function isInternal(): boolean;
export declare function hasEphemeralDiffNumber(): boolean;
export declare function getEphemeralDiffNumber(): string | null;
export declare function FbInternalOnly<T>(props: {

@@ -25,0 +27,0 @@ children: ReactElement<T>;

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

Object.defineProperty(exports, "__esModule", { value: true });
exports.OssOnly = exports.FbInternalOnly = exports.isInternal = exports.validateFbContentArgs = exports.fbInternalOnly = exports.fbContent = exports.inpageeditor = exports.feedback = exports.uidocs = exports.bloks = void 0;
exports.OssOnly = exports.FbInternalOnly = exports.getEphemeralDiffNumber = exports.hasEphemeralDiffNumber = exports.isInternal = exports.validateFbContentArgs = exports.fbInternalOnly = exports.fbContent = exports.inpageeditor = exports.feedback = exports.uidocs = exports.bloks = void 0;
exports.bloks = __importStar(require("./bloks"));

@@ -95,2 +95,22 @@ exports.uidocs = __importStar(require("./uidocs"));

exports.isInternal = isInternal;
function hasEphemeralDiffNumber() {
return Boolean(getEphemeralDiffNumber());
}
exports.hasEphemeralDiffNumber = hasEphemeralDiffNumber;
function getEphemeralDiffNumber() {
// To use this in front-end code, we're relying on docusaurus-plugin-internaldocs-fb to add this value to the webpack env plugins.
try {
if (process.env.PHABRICATOR_DIFF_NUMBER) {
return process.env.PHABRICATOR_DIFF_NUMBER;
}
else {
return null;
}
}
catch (e) {
console.log("process.env.PHABRICATOR_DIFF_NUMBER couldn't be read, maybe you forgot to add the required webpack EnvironmentPlugin config?", e);
return null;
}
}
exports.getEphemeralDiffNumber = getEphemeralDiffNumber;
/*

@@ -97,0 +117,0 @@ * React component for wrapping content that should only be rendered on the internal (facebook empoyee-facing) website.

@@ -18,3 +18,4 @@ /**

project_name: string | null;
diff_number: number | null;
}): Promise<createPhabricatorDiffApiResponse>;
export {};

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

return __awaiter(this, void 0, void 0, function* () {
const { file_path, new_content, project_name } = args;
const { file_path, new_content, project_name, diff_number } = args;
try {

@@ -31,2 +31,3 @@ return (yield bridge_1.call({

project_name,
diff_number,
},

@@ -33,0 +34,0 @@ }));

{
"name": "internaldocs-fb-helpers",
"version": "1.7.0",
"version": "1.7.1",
"description": "Helper library for including / excluding content from docusaurus websites",

@@ -14,2 +14,7 @@ "main": "dist/index.js",

"@types/react": "^17.0.1",
"@typescript-eslint/eslint-plugin": "^4.28.1",
"@typescript-eslint/parser": "^4.28.1",
"eslint": "^7.29.0",
"eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0",
"jest": "^26.6.3",

@@ -23,4 +28,7 @@ "ts-jest": "^26.4.4",

"prepare": "yarn clean && yarn test && yarn build",
"test": "jest"
}
"prepublishOnly": "../../check-clean-hg.sh",
"test": "jest",
"lint": "eslint . --ext .ts,.tsx"
},
"dependencies": {}
}
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