Socket
Socket
Sign inDemoInstall

@changesets/write

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/write - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

6

CHANGELOG.md
# @changesets/write
## 0.3.1
### Patch Changes
- [#1351](https://github.com/changesets/changesets/pull/1351) [`c6da182`](https://github.com/changesets/changesets/commit/c6da182ece2ec40974f15f3efcf9d9ba20cf122b) Thanks [@TheHolyWaffle](https://github.com/TheHolyWaffle)! - Fix an issue with not applying a custom `.prettierrc` configuration with `prettier@>= 3.1.1`
## 0.3.0

@@ -4,0 +10,0 @@

7

dist/changesets-write.cjs.js

@@ -7,5 +7,5 @@ 'use strict';

var fs = require('fs-extra');
var humanId = require('human-id');
var path = require('path');
var prettier = require('prettier');
var humanId = require('human-id');

@@ -15,5 +15,5 @@ function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }

var fs__default = /*#__PURE__*/_interopDefault(fs);
var humanId__default = /*#__PURE__*/_interopDefault(humanId);
var path__default = /*#__PURE__*/_interopDefault(path);
var prettier__default = /*#__PURE__*/_interopDefault(prettier);
var humanId__default = /*#__PURE__*/_interopDefault(humanId);

@@ -47,3 +47,2 @@ function getPrettierInstance(cwd) {

const prettierInstance = getPrettierInstance(cwd);
const prettierConfig = await prettierInstance.resolveConfig(cwd);
const newChangesetPath = path__default["default"].resolve(changesetBase, `${changesetID}.md`); // NOTE: The quotation marks in here are really important even though they are

@@ -60,3 +59,3 @@ // not spec for yaml. This is because package names can contain special

await fs__default["default"].outputFile(newChangesetPath, // Prettier v3 returns a promise
await prettierInstance.format(changesetContents, _objectSpread(_objectSpread({}, prettierConfig), {}, {
await prettierInstance.format(changesetContents, _objectSpread(_objectSpread({}, await prettierInstance.resolveConfig(newChangesetPath)), {}, {
parser: "markdown"

@@ -63,0 +62,0 @@ })));

import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
import fs from 'fs-extra';
import humanId from 'human-id';
import path from 'path';
import prettier from 'prettier';
import humanId from 'human-id';

@@ -34,3 +34,2 @@ function getPrettierInstance(cwd) {

const prettierInstance = getPrettierInstance(cwd);
const prettierConfig = await prettierInstance.resolveConfig(cwd);
const newChangesetPath = path.resolve(changesetBase, `${changesetID}.md`); // NOTE: The quotation marks in here are really important even though they are

@@ -47,3 +46,3 @@ // not spec for yaml. This is because package names can contain special

await fs.outputFile(newChangesetPath, // Prettier v3 returns a promise
await prettierInstance.format(changesetContents, _objectSpread(_objectSpread({}, prettierConfig), {}, {
await prettierInstance.format(changesetContents, _objectSpread(_objectSpread({}, await prettierInstance.resolveConfig(newChangesetPath)), {}, {
parser: "markdown"

@@ -50,0 +49,0 @@ })));

{
"name": "@changesets/write",
"version": "0.3.0",
"version": "0.3.1",
"description": "Writes a changeset to a file",

@@ -5,0 +5,0 @@ "main": "dist/changesets-write.cjs.js",

@@ -0,6 +1,6 @@

import { Changeset } from "@changesets/types";
import fs from "fs-extra";
import humanId from "human-id";
import path from "path";
import prettier from "prettier";
import humanId from "human-id";
import { Changeset } from "@changesets/types";

@@ -34,4 +34,2 @@ function getPrettierInstance(cwd: string): typeof prettier {

const prettierInstance = getPrettierInstance(cwd);
const prettierConfig = await prettierInstance.resolveConfig(cwd);
const newChangesetPath = path.resolve(changesetBase, `${changesetID}.md`);

@@ -53,3 +51,3 @@

await prettierInstance.format(changesetContents, {
...prettierConfig,
...(await prettierInstance.resolveConfig(newChangesetPath)),
parser: "markdown",

@@ -56,0 +54,0 @@ })

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