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

siroc

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

siroc - npm Package Compare versions

Comparing version 0.11.0 to 0.11.1

75

bin/cli.js

@@ -23,2 +23,3 @@ #!/usr/bin/env node

const esbuild = require('rollup-plugin-esbuild')
const detectIndent = require('detect-indent')
const execa = require('execa')

@@ -48,2 +49,3 @@ const sortPackageJson = require('sort-package-json')

const esbuild__default = /*#__PURE__*/ _interopDefaultLegacy(esbuild)
const detectIndent__default = /*#__PURE__*/ _interopDefaultLegacy(detectIndent)
const execa__default = /*#__PURE__*/ _interopDefaultLegacy(execa)

@@ -296,9 +298,17 @@ const sortPackageJson__default =

this.logger = consola__default['default']
this.pkg = this.loadPackageJSON()
const blob = this.loadPackageJSON(false)
this.pkg = JSON.parse(blob)
this.options.pkgIndent =
this.options.pkgIndent || detectIndent__default['default'](blob).indent
this.logger = consola__default['default'].withTag(this.pkg.name)
this.loadConfig()
}
loadPackageJSON() {
loadPackageJSON(parse = true) {
try {
return fsExtra.readJSONSync(this.resolvePath('package.json'))
const blob = fsExtra.readFileSync(
this.resolvePath('package.json'),
'utf8'
)
if (parse) return JSON.parse(blob)
return blob
} catch (e) {

@@ -361,3 +371,6 @@ if (this.options.rootDir === '/') {

this.logger.debug('Writing', pkgPath)
yield fsExtra.writeFile(pkgPath, JSON.stringify(this.pkg, null, 2) + '\n')
yield fsExtra.writeFile(
pkgPath,
JSON.stringify(this.pkg, null, this.options.pkgIndent) + '\n'
)
})

@@ -795,28 +808,28 @@ }

]
const getPlugins = () =>
[
aliasPlugin__default['default']({
entries: alias,
}),
replacePlugin__default['default']({
exclude: 'node_modules/**',
preventAssignment: true,
delimiters: ['', ''],
values: __spreadValues$3(
__spreadValues$3({}, includeDefinedProperties({ __NODE_ENV__ })),
replace
),
}),
nodeResolvePlugin__default['default'](resolveOptions),
commonjsPlugin__default['default']({ include: /node_modules/ }),
esbuild__default['default'](
__spreadValues$3(
{
target: 'es2018',
},
esbuildOptions
)
const getPlugins = () => [
aliasPlugin__default['default']({
entries: alias,
}),
replacePlugin__default['default']({
exclude: 'node_modules/**',
preventAssignment: true,
delimiters: ['', ''],
values: __spreadValues$3(
__spreadValues$3({}, includeDefinedProperties({ __NODE_ENV__ })),
replace
),
jsonPlugin__default['default'](),
].concat(plugins)
}),
nodeResolvePlugin__default['default'](resolveOptions),
commonjsPlugin__default['default']({ include: /node_modules/ }),
esbuild__default['default'](
__spreadValues$3(
{
target: 'es2018',
},
esbuildOptions
)
),
jsonPlugin__default['default'](),
...plugins,
]
const defaultOutputs = [

@@ -931,3 +944,3 @@ __spreadProps$2(__spreadValues$3({}, getFilenames(pkgConfig.main)), {

output: {
file: resolvePath(outfile.replace(/\.js$/, '.d.ts')),
file: resolvePath(outfile.replace(/(\.es)?\.js$/, '.d.ts')),
format: 'es',

@@ -1163,3 +1176,3 @@ exports: 'auto',

var version = '0.11.0'
var version = '0.11.1'

@@ -1166,0 +1179,0 @@ var __defProp$1 = Object.defineProperty

@@ -23,2 +23,3 @@ #!/usr/bin/env node

const esbuild = require('rollup-plugin-esbuild')
const detectIndent = require('detect-indent')
const execa = require('execa')

@@ -47,2 +48,3 @@ const sortPackageJson = require('sort-package-json')

const esbuild__default = /*#__PURE__*/ _interopDefaultLegacy(esbuild)
const detectIndent__default = /*#__PURE__*/ _interopDefaultLegacy(detectIndent)
const execa__default = /*#__PURE__*/ _interopDefaultLegacy(execa)

@@ -303,9 +305,17 @@ const sortPackageJson__default =

this.logger = consola__default['default']
this.pkg = this.loadPackageJSON()
const blob = this.loadPackageJSON(false)
this.pkg = JSON.parse(blob)
this.options.pkgIndent =
this.options.pkgIndent || detectIndent__default['default'](blob).indent
this.logger = consola__default['default'].withTag(this.pkg.name)
this.loadConfig()
}
loadPackageJSON() {
loadPackageJSON(parse = true) {
try {
return fsExtra.readJSONSync(this.resolvePath('package.json'))
const blob = fsExtra.readFileSync(
this.resolvePath('package.json'),
'utf8'
)
if (parse) return JSON.parse(blob)
return blob
} catch (e) {

@@ -368,3 +378,6 @@ if (this.options.rootDir === '/') {

this.logger.debug('Writing', pkgPath)
yield fsExtra.writeFile(pkgPath, JSON.stringify(this.pkg, null, 2) + '\n')
yield fsExtra.writeFile(
pkgPath,
JSON.stringify(this.pkg, null, this.options.pkgIndent) + '\n'
)
})

@@ -802,28 +815,28 @@ }

]
const getPlugins = () =>
[
aliasPlugin__default['default']({
entries: alias,
}),
replacePlugin__default['default']({
exclude: 'node_modules/**',
preventAssignment: true,
delimiters: ['', ''],
values: __spreadValues$1(
__spreadValues$1({}, includeDefinedProperties({ __NODE_ENV__ })),
replace
),
}),
nodeResolvePlugin__default['default'](resolveOptions),
commonjsPlugin__default['default']({ include: /node_modules/ }),
esbuild__default['default'](
__spreadValues$1(
{
target: 'es2018',
},
esbuildOptions
)
const getPlugins = () => [
aliasPlugin__default['default']({
entries: alias,
}),
replacePlugin__default['default']({
exclude: 'node_modules/**',
preventAssignment: true,
delimiters: ['', ''],
values: __spreadValues$1(
__spreadValues$1({}, includeDefinedProperties({ __NODE_ENV__ })),
replace
),
jsonPlugin__default['default'](),
].concat(plugins)
}),
nodeResolvePlugin__default['default'](resolveOptions),
commonjsPlugin__default['default']({ include: /node_modules/ }),
esbuild__default['default'](
__spreadValues$1(
{
target: 'es2018',
},
esbuildOptions
)
),
jsonPlugin__default['default'](),
...plugins,
]
const defaultOutputs = [

@@ -938,3 +951,3 @@ __spreadProps(__spreadValues$1({}, getFilenames(pkgConfig.main)), {

output: {
file: resolvePath(outfile.replace(/\.js$/, '.d.ts')),
file: resolvePath(outfile.replace(/(\.es)?\.js$/, '.d.ts')),
format: 'es',

@@ -941,0 +954,0 @@ exports: 'auto',

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

### [0.11.1](https://github.com/nuxt-contrib/siroc/compare/v0.11.0...v0.11.1) (2021-06-23)
### Bug Fixes
* **core:** generate es exports dts files correctly ([#212](https://github.com/nuxt-contrib/siroc/issues/212)) ([b0f29c6](https://github.com/nuxt-contrib/siroc/commit/b0f29c616f54b941a3cc1e100cb333445f130481))
* **core:** preserve package.json indent ([#211](https://github.com/nuxt-contrib/siroc/issues/211)) ([14a7ffc](https://github.com/nuxt-contrib/siroc/commit/14a7ffc4cd0ee98804b6ba86dc83a511d796c059))
## [0.11.0](https://github.com/nuxt-contrib/siroc/compare/v0.10.1...v0.11.0) (2021-05-31)

@@ -2,0 +10,0 @@

@@ -218,2 +218,7 @@ import { Consola } from 'consola';

sortDependencies?: boolean;
/**
* The indent to use when writing `package.json`
* @default ` `
*/
pkgIndent?: string;
}

@@ -238,2 +243,3 @@ declare type SirocOptions = Partial<DefaultPackageOptions>;

loadPackageJSON(): this['pkg'];
loadPackageJSON(parse: false): string;
/**

@@ -240,0 +246,0 @@ * Resolve path relative to this package

import { extname, sep, resolve, dirname, relative, basename, join } from 'upath';
import chalk, { bold, green, gray } from 'chalk';
import { readJSONSync, writeFile, chmod, existsSync, mkdirp, copy, pathExistsSync, remove, stat } from 'fs-extra';
import { readJSONSync, readFileSync, writeFile, chmod, existsSync, mkdirp, copy, pathExistsSync, remove, stat } from 'fs-extra';
import { mkdist } from 'mkdist';

@@ -17,2 +17,3 @@ import { watch, rollup } from 'rollup';

import esbuild from 'rollup-plugin-esbuild';
import detectIndent from 'detect-indent';
import execa from 'execa';

@@ -241,9 +242,14 @@ import sortPackageJson from 'sort-package-json';

this.logger = consola;
this.pkg = this.loadPackageJSON();
const blob = this.loadPackageJSON(false);
this.pkg = JSON.parse(blob);
this.options.pkgIndent = this.options.pkgIndent || detectIndent(blob).indent;
this.logger = consola.withTag(this.pkg.name);
this.loadConfig();
}
loadPackageJSON() {
loadPackageJSON(parse = true) {
try {
return readJSONSync(this.resolvePath("package.json"));
const blob = readFileSync(this.resolvePath("package.json"), "utf8");
if (parse)
return JSON.parse(blob);
return blob;
} catch (e) {

@@ -295,3 +301,3 @@ if (this.options.rootDir === "/") {

this.logger.debug("Writing", pkgPath);
yield writeFile(pkgPath, JSON.stringify(this.pkg, null, 2) + "\n");
yield writeFile(pkgPath, JSON.stringify(this.pkg, null, this.options.pkgIndent) + "\n");
});

@@ -699,4 +705,5 @@ }

}, esbuildOptions)),
jsonPlugin()
].concat(plugins);
jsonPlugin(),
...plugins
];
const defaultOutputs = [

@@ -769,3 +776,3 @@ __spreadProps(__spreadValues$1({}, getFilenames(pkgConfig.main)), {

output: {
file: resolvePath(outfile.replace(/\.js$/, ".d.ts")),
file: resolvePath(outfile.replace(/(\.es)?\.js$/, ".d.ts")),
format: "es",

@@ -772,0 +779,0 @@ exports: "auto"

@@ -21,2 +21,3 @@ 'use strict';

const esbuild = require('rollup-plugin-esbuild');
const detectIndent = require('detect-indent');
const execa = require('execa');

@@ -40,2 +41,3 @@ const sortPackageJson = require('sort-package-json');

const esbuild__default = /*#__PURE__*/_interopDefaultLegacy(esbuild);
const detectIndent__default = /*#__PURE__*/_interopDefaultLegacy(detectIndent);
const execa__default = /*#__PURE__*/_interopDefaultLegacy(execa);

@@ -264,9 +266,14 @@ const sortPackageJson__default = /*#__PURE__*/_interopDefaultLegacy(sortPackageJson);

this.logger = consola__default['default'];
this.pkg = this.loadPackageJSON();
const blob = this.loadPackageJSON(false);
this.pkg = JSON.parse(blob);
this.options.pkgIndent = this.options.pkgIndent || detectIndent__default['default'](blob).indent;
this.logger = consola__default['default'].withTag(this.pkg.name);
this.loadConfig();
}
loadPackageJSON() {
loadPackageJSON(parse = true) {
try {
return fsExtra.readJSONSync(this.resolvePath("package.json"));
const blob = fsExtra.readFileSync(this.resolvePath("package.json"), "utf8");
if (parse)
return JSON.parse(blob);
return blob;
} catch (e) {

@@ -318,3 +325,3 @@ if (this.options.rootDir === "/") {

this.logger.debug("Writing", pkgPath);
yield fsExtra.writeFile(pkgPath, JSON.stringify(this.pkg, null, 2) + "\n");
yield fsExtra.writeFile(pkgPath, JSON.stringify(this.pkg, null, this.options.pkgIndent) + "\n");
});

@@ -722,4 +729,5 @@ }

}, esbuildOptions)),
jsonPlugin__default['default']()
].concat(plugins);
jsonPlugin__default['default'](),
...plugins
];
const defaultOutputs = [

@@ -792,3 +800,3 @@ __spreadProps(__spreadValues$1({}, getFilenames(pkgConfig.main)), {

output: {
file: resolvePath(outfile.replace(/\.js$/, ".d.ts")),
file: resolvePath(outfile.replace(/(\.es)?\.js$/, ".d.ts")),
format: "es",

@@ -795,0 +803,0 @@ exports: "auto"

{
"name": "siroc",
"version": "0.11.0",
"version": "0.11.1",
"description": "Zero-config build tooling for Node",

@@ -54,13 +54,14 @@ "keywords": [

"defu": "^5.0.0",
"esbuild": "^0.12.5",
"execa": "^5.0.1",
"detect-indent": "^6.1.0",
"esbuild": "^0.12.9",
"execa": "^5.1.1",
"fs-extra": "^10.0.0",
"glob": "^7.1.7",
"jiti": "^1.10.1",
"mkdist": "^0.3.1",
"rollup": "^2.50.5",
"mkdist": "^0.3.2",
"rollup": "^2.52.2",
"rollup-plugin-dts": "^3.0.2",
"rollup-plugin-esbuild": "4.2.3",
"rollup-plugin-esbuild": "4.5.0",
"sort-package-json": "^1.50.0",
"typescript": "^4.2.4",
"typescript": "^4.3.4",
"upath": "^2.0.1",

@@ -70,8 +71,8 @@ "v8-compile-cache": "^2.3.0"

"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.4",
"@babel/preset-typescript": "^7.13.0",
"@babel/runtime": "^7.14.0",
"@release-it/conventional-changelog": "^2.0.1",
"@babel/core": "^7.14.6",
"@babel/plugin-transform-runtime": "^7.14.5",
"@babel/preset-env": "^7.14.7",
"@babel/preset-typescript": "^7.14.5",
"@babel/runtime": "^7.14.6",
"@release-it/conventional-changelog": "^3.0.1",
"@types/execa": "^2.0.0",

@@ -81,8 +82,8 @@ "@types/fs-extra": "^9.0.11",

"@types/jest": "^26.0.23",
"@types/node": "^14.17.1",
"@typescript-eslint/eslint-plugin": "^4.25.0",
"@typescript-eslint/parser": "^4.25.0",
"@types/node": "^14.17.4",
"@typescript-eslint/eslint-plugin": "^4.28.0",
"@typescript-eslint/parser": "^4.28.0",
"codecov": "^3.8.2",
"conventional-changelog-conventionalcommits": "^4.6.0",
"eslint": "^7.27.0",
"eslint": "^7.29.0",
"eslint-config-prettier": "^8.3.0",

@@ -93,10 +94,10 @@ "eslint-plugin-jest": "^24.3.6",

"husky": "^6.0.0",
"jest": "^27.0.3",
"jest-environment-node": "^27.0.3",
"jest": "^27.0.5",
"jest-environment-node": "^27.0.5",
"lint-staged": "^11.0.0",
"pinst": "^2.1.6",
"prettier": "^2.3.0",
"release-it": "14.7.0",
"prettier": "^2.3.1",
"release-it": "14.10.0",
"semver": "^7.3.5",
"typescript": "^4.2.4"
"typescript": "^4.3.4"
},

@@ -103,0 +104,0 @@ "volta": {

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