@changesets/write
Advanced tools
Comparing version 0.3.0 to 0.3.1
# @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,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 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
14881
0
218