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

@contentlayer/react

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@contentlayer/react - npm Package Compare versions

Comparing version 0.0.2-18 to 0.0.2-19

dist/types/index.d.ts

52

dist/cjs/index.js

@@ -1,16 +0,38 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useContentlayer = exports.ContentlayerContext = void 0;
var React = require("react");
exports.ContentlayerContext = React.createContext(null);
var useContentlayer = function (fn, deps) {
var docs = React.useContext(exports.ContentlayerContext);
if (fn !== undefined) {
return React.useMemo(function () {
return fn(docs);
}, deps);
}
return docs;
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
exports.useContentlayer = useContentlayer;
//# sourceMappingURL=index.js.map
var __reExport = (target, module2, desc) => {
if (module2 && typeof module2 === "object" || typeof module2 === "function") {
for (let key of __getOwnPropNames(module2))
if (!__hasOwnProp.call(target, key) && key !== "default")
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
}
return target;
};
var __toModule = (module2) => {
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", module2 && module2.__esModule && "default" in module2 ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
};
__markAsModule(exports);
__export(exports, {
ContentlayerContext: () => ContentlayerContext,
useContentlayer: () => useContentlayer
});
var React = __toModule(require("react"));
const ContentlayerContext = React.createContext(null);
const useContentlayer = (fn, deps) => {
const docs = React.useContext(ContentlayerContext);
if (fn !== void 0) {
return React.useMemo(() => {
return fn(docs);
}, deps);
}
return docs;
};

@@ -1,12 +0,15 @@

import * as React from 'react';
export const ContentlayerContext = React.createContext(null);
export const useContentlayer = (fn, deps) => {
const docs = React.useContext(ContentlayerContext);
if (fn !== undefined) {
return React.useMemo(() => {
return fn(docs);
}, deps);
}
return docs;
import * as React from "react";
const ContentlayerContext = React.createContext(null);
const useContentlayer = (fn, deps) => {
const docs = React.useContext(ContentlayerContext);
if (fn !== void 0) {
return React.useMemo(() => {
return fn(docs);
}, deps);
}
return docs;
};
//# sourceMappingURL=index.js.map
export {
ContentlayerContext,
useContentlayer
};
{
"name": "@contentlayer/react",
"version": "0.0.2-18",
"version": "0.0.2-19",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"types": "./dist/types/index.d.ts",
"scripts": {
"prepack": "yarn build",
"dev": "rm -rf dist && tsc --watch",
"build": "rm -rf dist && yarn build:esm && yarn build:cjs && echo Build complete",
"build:esm": "tsc --build tsconfig.json",
"build:cjs": "tsc --build tsconfig.cjs.json"
"build": "(yarn workspaces foreach -vpR -j=6 run g:build:lib & run g:build:types) && echo Build complete"
},
"devDependencies": {
"@types/react": "^17.0.5",
"@types/react": "^17.0.9",
"typescript": "^4.2.4"
},
"dependencies": {
"@contentlayer/client": "0.0.2-18",
"@contentlayer/core": "0.0.2-18"
"@contentlayer/client": "0.0.2-19",
"@contentlayer/core": "0.0.2-19"
},
"peerDependencies": {
"react": "*"
}
},
"stableVersion": "0.0.2-18"
}
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"jsx": "preserve",
"rootDir": "./src",
"jsx": "preserve",
"target": "ES2015",
"outDir": "./dist/esm"
"outDir": "./dist/types"
},
"include": ["./src"],
"references": [{ "path": "../client/tsconfig.json" }, { "path": "../core/tsconfig.json" }]
"references": [{ "path": "../client" }, { "path": "../core" }]
}

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