Socket
Socket
Sign inDemoInstall

read-bsconfig

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-bsconfig - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

68

index.js

@@ -0,1 +1,59 @@

// @flow
/*::
export type BsDependency = string
export type BsRuleGenerator = {
name: string,
command: string
}
export type BsJsxVersion = boolean | number
export type BsReasonSpecs = {
'react-jsx': BsJsxVersion
}
export type BsJsPostBuild = {
cmd: string
}
export type BsModuleFormat =
| 'commonjs'
| 'amdjs'
| 'amdjs-global'
| 'es6'
| 'es6-global'
export type BsPackageSpec =
| BsModuleFormat
| { module: BsModuleFormat, 'in-source': boolean }
export type BsConfig = {
version: string,
name: string,
namespace: boolean,
sources: any, // TODO: fill in this definition
'bs-dependencies': BsDependency[],
'bs-dev-dependencies': BsDependency[],
generators: BsRuleGenerator[],
'cut-generators': boolean,
reason: BsReasonSpecs,
'bsc-flags': string[],
'ppx-flags': string[],
'js-post-build': BsJsPostBuild,
'package-specs': BsPackageSpec[],
ocamllex: string,
ocamlyacc: string,
menhir: string,
entries: any, // TODO: fill in this definition
'generate-merlin': boolean,
'use-stdlib': boolean,
'bs-external-includes': string[],
refmt: string,
'refmt-flags': string[],
suffix: string
}
*/
const { readFile, readFileSync } = require('fs')

@@ -7,3 +65,6 @@ const path = require('path')

function readBsConfig(cwd = process.cwd(), enableCache = true) {
function readBsConfig(
cwd /*: string */ = process.cwd(),
enableCache /*: boolean */ = true
) /*: Promise<BsConfig> */ {
if (asyncConfigCache[cwd] && enableCache) return asyncConfigCache[cwd]

@@ -24,3 +85,6 @@

function readBsConfigSync(cwd = process.cwd(), enableCache = true) {
function readBsConfigSync(
cwd /*: string */ = process.cwd(),
enableCache /*: boolean */ = true
) /*: BsConfig */ {
if (syncConfigCache[cwd] && enableCache) return syncConfigCache[cwd]

@@ -27,0 +91,0 @@

12

package.json
{
"name": "read-bsconfig",
"version": "1.0.2",
"version": "1.0.3",
"description": "Library for reading the bsconfig.json for BuckleScript",

@@ -11,3 +11,3 @@ "main": "index.js",

"type": "git",
"url": "git+https://github.com/rrdelaney/read-bsconfig.git"
"url": "git+https://github.com/reasonml-community/reason-scripts.git"
},

@@ -17,9 +17,11 @@ "author": "Ryan Delaney <rrdelaney@outlook.com>",

"bugs": {
"url": "https://github.com/rrdelaney/read-bsconfig/issues"
"url": "https://github.com/reasonml-community/reason-scripts/issues"
},
"homepage": "https://github.com/rrdelaney/read-bsconfig#readme",
"homepage": "https://github.com/reasonml-community/reason-scripts#readme",
"dependencies": {
"json5": "^0.5.1"
},
"files": ["index.js"],
"files": [
"index.js"
],
"devDependencies": {

@@ -26,0 +28,0 @@ "jest": "^21.0.1"

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