Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update all (major) #231

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

chore(deps): update all (major) #231

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 3, 2021

This PR contains the following updates:

Package Type Update Change Age Adoption Passing Confidence
actions/cache action major v2 -> v4 age adoption passing confidence
actions/checkout action major v2 -> v4 age adoption passing confidence
actions/setup-node action major v2 -> v4 age adoption passing confidence
luxon devDependencies major 2.3.0 -> 3.5.0 age adoption passing confidence
p-each-series devDependencies major 2.2.0 -> 3.0.0 age adoption passing confidence
prettier (source) devDependencies major 2.5.1 -> 3.5.3 age adoption passing confidence
sort-keys devDependencies major 4.2.0 -> 5.1.0 age adoption passing confidence
stefanzweifel/git-auto-commit-action action major v4 -> v5 age adoption passing confidence

Release Notes

actions/cache (actions/cache)

v4

Compare Source

v3

Compare Source

actions/checkout (actions/checkout)

v4

Compare Source

v3

Compare Source

actions/setup-node (actions/setup-node)

v4

Compare Source

v3

Compare Source

moment/luxon (luxon)

v3.5.0

Compare Source

  • Various performance improvements
  • throwOnInvalid causes the constructor to throw if the year is invalid

v3.4.4

Compare Source

v3.4.3

Compare Source

  • Fixes another regression from 3.4.0 (#​1496)

v3.4.2

Compare Source

  • Fixes regression from 3.4.1 (#​1493)

v3.4.1

Compare Source

v3.4.0

Compare Source

  • Fix type checking on input zones
  • Fix Islamic months listing
  • Fix normalize() for negative inputs

v3.3.0

Compare Source

  • Fix off-by-one in Interval#count (#​1308)
  • Support formatting for custom zones (#​1377)
  • Fix parsing for narrow spaces (#​1369)
  • Handle leap year issue with AD 100 (#​1390)
  • Allow parsing of just an offset

v3.2.1

Compare Source

  • Fix for RFC-2822 regex vulnerability
  • Better handling of BCP tags with -x- extensions

v3.2.0

Compare Source

  • Allow timeZone to be specified as an intl option
  • Fix for diff's handling of end-of-month when crossing leap years (#​1340)
  • Add Interval.toLocaleString() (#​1320)

v3.1.1

Compare Source

  • Add Settings.twoDigitCutoffYear

v3.1.0

Compare Source

  • Add Duration.rescale

v3.0.4

Compare Source

v3.0.3

Compare Source

v3.0.2

Compare Source

  • Lots of doc changes
  • Added DateTime.expandFormat
  • Added support for custom conversion matrices in Durations

v3.0.1

Compare Source

  • Add DateTime.parseFormatForOpts

v3.0.0

Compare Source

  • Add "default" as an option for specifying a zone, and change "system" to really mean the system zone (breaking change)

v2.5.2

Compare Source

v2.5.1

Compare Source

v2.5.0

Compare Source

  • Support for ESM-style node imports
  • Fix Wednesday parsing for RFC 850 strings
  • Increase number of digits allowed in ISO durations

2.4.0 (2022-05-08)

  • Add support for parsing the ISO zone extension, like 2022-05-08T20:42:00.000-04:00[America/New_York]
  • Add an extendedZone option to toISO() and toISOTime
  • Improvements to DateTime.isInDST()
  • Fix for parsing in Vietnames (and probably other languages)

2.3.2 (2022-04-17)

  • Fix timezone calculations for negative years
  • add week formatting token "w" for durations
  • fix weekday computation for years 0-100

2.3.1 (2022-02-23)

  • Added an includeOffsetSpace option to toSQL and toSQLTime
  • Added toUnixInteger
  • Don't use -0 when negating durations with zeros in them

2.3.0 (2022-01-02)

  • Major perf improvements to toISO(), toISODate(), toISOTime(), and toSQLDate()
  • Fixed date padding for negative years in toISO()
  • Added Duration#toHuman()

2.2.0 (2021-12-10)

  • Allow offsets to pick among ambiguous times when both an offset and zone are provided to fromFormat
  • Fix a floating point bug in Duration.shiftTo()

2.1.1 (2021-11-08)

  • Fix issue in quirky environments that lack hourCycle support and sometimes computed offsets 12 hours off

2.1.0 (2021-11-07)

  • Stop special casing of Etc/GMT* zones
  • export fromDurationLike
  • memoize zone validation
  • Support for fractional elements in duration ISO parsing
  • Added uu and uuu tokens for fractional millisecond parsing

2.0.2 (2021-08-08)

Fix locale defaulting

2.0.0 (2021-07-3)

See Upgrading section

1.28.0 (2021-07-03)

  • Fix ISO parsing for offset specifiers in Year-Ordinal formats

1.27.0 (2021-05-08)

  • Fix GMT zone parsing for older versions of Node
  • Support multiple units in toRelative
  • Various documentation updates

1.26.0 (2021-02-13)

  • Add fromISOTime, toISOTime and toMillis to Duration (#​803)
  • Fix padding of negative years in IsoDate (#​871)
  • Fix hasSame unit comparison (#​798)
  • Export VERSION information (#​794)
  • Durations are considered equal with extra zero units. Fixes #​809 (#​811)

1.25.0 (2020-08-23)

  • fix fromFormat with Intl formats containing non-breaking spaces
  • Support higher precision in ISO milliseconds
  • Some fixes for 00:30 timezones
  • Fix some throwOnInvalid for invalid Intervals
  • Various doc fixes
  • Fix Interval#isSame for empty intervals
  • Mark package as side effect-free
  • Add support for intervals with a large number of seconds

1.24.1 (2020-05-04)

  • Remove erroneous console.log call

1.24.0 (2020-05-03)

  • Update polyfills for pollyfilled build

1.23.0 (2020-04-02)

  • Allow minus sign prefix when creating Duration from ISO

1.22.2 (2020-03-25)

  • Added more details to error messages for type errors

1.22.1 (2020-03-19)

  • Added support for ISO basic format to DateTime#toISO

1.22.0 (2020-01-26)

  • Fix setZone's handling of pre-1970 dates with millisecond components
  • Fix keepLocalTime for large jumps near the target zone's DST
  • Fix cache perf for toRelative()

1.21.3 (2019-11-28)

  • Fix parsing of meridiems in macro tokens in newer versions of v8

1.21.2 (2019-11-18)

  • Fix bug in Chrome Canary that threw off time zone calculations

1.21.1 (2019-11-03)

  • Fix for quarter parsing
  • Some documentation updates

1.21.0 (2019-10-30)

  • Added quarter support to the parser
  • Fix some rounding issues in ISO formatting

1.20.0 (2019-10-29)

  • Added Duration#mapUnits
  • added Interval#toISODate and Interval#toISOTime
  • Some documentation fixes

1.19.3

  • Cache offset values
  • Fix handling of negative sub 1-hour offsets

1.19.2

  • Speculative fix for Node 6

1.19.1

  • Fix Intl.DateTimeFormat usage for polyfills

1.19.0

  • Interval#splitAt now ignores input dates outside the interval
  • Don't allow decimals in DateTime creation

1.18.2

  • Fix handling of decimals in DateTime#plus and #minus

1.18.1

  • Fix validity when adding or subtracting time that exceeds Date max/min boundaries

1.18.0

  • Add support for macro tokens in the parser

1.17.2

  • Fix issue with toRelative using style: short with plural days

1.17.1

  • Reject out-of-range numbers in DateTime.fromMillis
  • Reject 0s in ISO date inputs

1.17.0

  • DateTime.min and DateTime.max throw if they get the wrong kind of arguments
  • Fixed throwOnInvalid logic for Interval
  • Added DATETIME_MED_WITH_WEEKDAY preset

1.16.1

  • Catch errors trying to use Intl in weird versions of IE 11

1.16.0

  • Fixed locale default logic for `DateTime#toFormat("ZZZZ")

1.15.0

  • Added formatOffset to Zones

1.14.0

  • Allow the zone argument to Interval.fromISO with duration components
  • Ignore the zone argument to Duration factory methods

1.13.3

  • Fix keepLocalTime calculations that span offset changes

1.13.2

  • Fixed ISO formatting for dates > 999

1.13.1

  • Performance improvements for regex parsing

1.13.0

  • Support numberSystem in fromFormat
  • Fix validity for bad initial zone specifiers

1.12.1

  • Fix cross-month diffs in some scenarios
  • Fix time zone parsing when the time zone isn't at the end
  • Memoize IANA zone creation

1.12.0

  • Add some explicit CDN support to the NPM package
  • Add week token to duration ISO support
  • Lots of cleanup and test coverage changes

1.11.4

  • setZone("local") now returns the defaultZone if it is set
  • Fixes for the polyfilled build

1.11.3

  • Allow 24:00 in ISO (and other) strings
  • Fix some bugs with the typecheck functions like DateTime.isDateTime()

1.11.2

  • Fixed handling of some characters in fromFormat literal sections
  • Handle string values in object arguments to DateTime methods
  • Fixed toRelativeCalendar's handling of zones in the base date

1.11.1

  • Fix DateTime#plus() when spanning across AD 100

1.11.0

  • Fix low-year handling for IANA zones
  • DateTime#toLocal() now uses the default locale
  • Fix zero duration formatting
  • Many documentation fixes

1.10.0

  • Fix endOf("day") during DSTs (#​399)
  • Add `Interval#mapEndpoints (#​400)
  • Add DateTime#zone and Info.normalizeZone (#​404)

1.9.0

  • Add DateTime#toRelative and DateTime#toRelativeCalendar

1.8.3

  • Allow "UTC" in the zone position of fromSQL
  • Force isDateTime and isDuration to return booleans in all cases

1.8.2

  • Trim leading \u200e characters from offset names in Edge 16 and 17

1.8.1

  • Add DateTime.fromSeconds and DateTime#toSeconds

1.7.1

  • Floor the seconds instead of rounding them when outputting the 'X' format
  • Change the options to toLocale to override the configuration (the previous options were essentially ignored)

1.6.2

  • Fixing merge error that resulted in bad error messages

1.6.0

  • midly breaking Rework negative durations
  • Fix handling

v2.4.0

Compare Source

  • Add support for parsing the ISO zone extension, like 2022-05-08T20:42:00.000-04:00[America/New_York]
  • Add an extendedZone option to toISO() and toISOTime
  • Improvements to DateTime.isInDST()
  • Fix for parsing in Vietnames (and probably other languages)

v2.3.2

Compare Source

  • Fix timezone calculations for negative years
  • add week formatting token "w" for durations
  • fix weekday computation for years 0-100

v2.3.1

Compare Source

  • Added an includeOffsetSpace option to toSQL and toSQLTime
  • Added toUnixInteger
  • Don't use -0 when negating durations with zeros in them
sindresorhus/p-each-series (p-each-series)

v3.0.0

Compare Source

Breaking
prettier/prettier (prettier)

v3.5.3

Compare Source

v3.5.2

Compare Source

diff

Remove module-sync condition (#​17156 by @​fisker)

In Prettier 3.5.0, we added module-sync condition to package.json, so that require("prettier") can use ESM version, but turns out it doesn't work if CommonJS and ESM plugins both imports builtin plugins. To solve this problem, we decide simply remove the module-sync condition, so require("prettier") will still use the CommonJS version, we'll revisit until require(ESM) feature is more stable.

v3.5.1

Compare Source

diff

Fix CLI crash when cache for old version exists (#​17100 by @​sosukesuzuki)

Prettier 3.5 uses a different cache format than previous versions, Prettier 3.5.0 crashes when reading existing cache file, Prettier 3.5.1 fixed the problem.

Support dockercompose and github-actions-workflow in VSCode (#​17101 by @​remcohaszing)

Prettier now supports the dockercompose and github-actions-workflow languages in Visual Studio Code.

v3.5.0

Compare Source

diff

🔗 Release Notes

v3.4.2

Compare Source

diff

Treat U+30A0 & U+30FB in Katakana Block as CJK (#​16796 by @​tats-u)

Prettier doesn't treat U+30A0 & U+30FB as Japanese. U+30FB is commonly used in Japanese to represent the delimitation of first and last names of non-Japanese people or “and”. The following “C言語・C++・Go・Rust” means “C language & C++ & Go & Rust” in Japanese.

<!-- Input (--prose-wrap=never) -->

C言
語
・
C++
・
Go
・
Rust

<!-- Prettier 3.4.1 -->
C言語・ C++ ・ Go ・ Rust

<!-- Prettier 3.4.2 -->
C言語・C++・Go・Rust

U+30A0 can be used as the replacement of the - in non-Japanese names (e.g. “Saint-Saëns” (Charles Camille Saint-Saëns) can be represented as “サン゠サーンス” in Japanese), but substituted by ASCII hyphen (U+002D) or U+FF1D (full width hyphen) in many cases (e.g. “サン=サーンス” or “サン=サーンス”).

Fix comments print on class methods with decorators (#​16891 by @​fisker)
// Input
class A {
  @&#8203;decorator
  /** 
   * The method description
   *
  */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.1
class A {
  @&#8203;decorator
  async /**
   * The method description
   *
   */
  method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}

// Prettier 3.4.2
class A {
  @&#8203;decorator
  /**
   * The method description
   *
   */
  async method(foo: Foo, bar: Bar) {
    console.log(foo);
  }
}
Fix non-idempotent formatting (#​16899 by @​seiyab)

This bug fix is not language-specific. You may see similar change in any languages. This fixes regression in 3.4.0 so change caused by it should yield same formatting as 3.3.3.

// Input
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

// Prettier 3.4.1 (first)
<div>
  foo
  <span>
    longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo
  </span>, abc
</div>;

// Prettier 3.4.1 (second)
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

// Prettier 3.4.2
<div>
  foo
  <span>longlonglonglonglonglonglonglonglonglonglonglonglonglonglongl foo</span>
  , abc
</div>;

v3.4.1

Compare Source

diff

Remove unnecessary parentheses around assignment in v-on (#​16887 by @​fisker)
<!-- Input -->
<template>
  <button @&#8203;click="foo += 2">Click</button>
</template>

<!-- Prettier 3.4.0 -->
<template>
  <button @&#8203;click="(foo += 2)">Click</button>
</template>

<!-- Prettier 3.4.1 -->
<template>
  <button @&#8203;click="foo += 2">Click</button>
</template>

v3.4.0

Compare Source

diff

🔗 Release Notes

v3.3.3

Compare Source

diff

Add parentheses for nullish coalescing in ternary (#​16391 by @​cdignam-segment)

This change adds clarity to operator precedence.

// Input
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.2
foo ? bar ?? foo : baz;
foo ?? bar ? a : b;
a ? b : foo ?? bar;

// Prettier 3.3.3
foo ? (bar ?? foo) : baz;
(foo ?? bar) ? a : b;
a ? b : (foo ?? bar);
Add parentheses for decorator expressions (#​16458 by @​y-schneider)

Prevent parentheses around member expressions or tagged template literals from being removed to follow the stricter parsing rules of TypeScript 5.5.

// Input
@&#8203;(foo`tagged template`)
class X {}

// Prettier 3.3.2
@&#8203;foo`tagged template`
class X {}

// Prettier 3.3.3
@&#8203;(foo`tagged template`)
class X {}
Support @let declaration syntax (#​16474 by @​sosukesuzuki)

Adds support for Angular v18 @let declaration syntax.

Please see the following code example. The @let declaration allows you to define local variables within the template:

@&#8203;let name = 'Frodo';

<h1>Dashboard for {{name}}</h1>
Hello, {{name}}

For more details, please refer to the excellent blog post by the Angular Team: Introducing @​let in Angular.

We also appreciate the Angular Team for kindly answering our questions to implement this feature.

v3.3.2

Compare Source

diff

Fix handlebars path expressions starts with @ (#​16358 by @​Princeyadav05)
{{! Input }}
<div>{{@&#8203;x.y.z}}</div>

{{! Prettier 3.3.1 }}
<div>{{@&#8203;x}}</div>

{{! Prettier 3.3.2 }}
<div>{{@&#8203;x.y.z}}</div>

v3.3.1

Compare Source

diff

Preserve empty lines in front matter (#​16347 by @​fisker)
<!-- Input -->
---
foo:
  - bar1

  - bar2

  - bar3
---
Markdown

<!-- Prettier 3.3.0 -->

---
foo:
  - bar1
  - bar2
  - bar3
---

Markdown

<!-- Prettier 3.3.1 -->
---
foo:
  - bar1

  - bar2

  - bar3
---

Markdown
Preserve explicit language in front matter (#​16348 by @​fisker)
<!-- Input -->
---yaml
title: Hello
slug: home
---

<!-- Prettier 3.3.0 -->
---
title: Hello
slug: home
---

<!-- Prettier 3.3.1 -->
---yaml
title: Hello
slug: home
---
Avoid line breaks in import attributes (#​16349 by @​fisker)
// Input
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" };

// Prettier 3.3.0
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type:
  "json" };

// Prettier 3.3.1
import something from "./some-very-very-very-very-very-very-very-very-long-path.json" with { type: "json" };

v3.3.0

Compare Source

diff

🔗 Release Notes

v3.2.5

Compare Source

diff

Support Angular inline styles as single template literal (#​15968 by @​sosukesuzuki)

Angular v17 supports single string inline styles.

// Input
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.4
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `h1 { color: blue; }`,
})
export class AppComponent {}

// Prettier 3.2.5
@&#8203;Component({
  template: `<div>...</div>`,
  styles: `
    h1 {
      color: blue;
    }
  `,
})
export class AppComponent {}
Unexpected embedded formatting for Angular template (#​15969 by @​JounQin)

Computed template should not be considered as Angular component template

// Input
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.4
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{ hello }}</h1>`,
})
export class AppComponent {}

// Prettier 3.2.5
const template = "foobar";

@&#8203;Component({
  [template]: `<h1>{{       hello }}</h1>`,
})
export class AppComponent {}
Use "json" parser for tsconfig.json by default (#​16012 by @​sosukesuzuki)

In v3.2.0, we introduced "jsonc" parser which adds trailing comma by default.

When adding a new parser we also define how it will be used based on the linguist-languages data.

tsconfig.json is a special file used by TypeScript, it uses .json file extension, but it actually uses the JSON with Comments syntax. However, we found that there are many third-party tools not recognize it correctly because of the confusing .json file extension.

We decide to treat it as a JSON file for now to avoid the extra configuration step.

To keep using the "jsonc" parser for your tsconfig.json files, add the following to your .prettierrc file

{
  "overrides": [
    {
      "files": ["tsconfig.json", "jsconfig.json"],
      "options": {
        "parser": "jsonc"
      }
    }
  ]
}

v3.2.4

Compare Source

prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }

v3.2.3

Compare Source

diff

Throw errors for invalid code (#​15881 by @​fisker, @​Josh-Cena, @​auvred)
// Input
1++;

// Prettier 3.2.2
1++;

// Prettier 3.2.3
SyntaxError: Invalid left-hand side expression in unary operation (1:1)
> 1 | 1++;
    | ^
// Input
try {} catch (error = 1){}

// Prettier 3.2.2
try {
} catch (error) {}

// Prettier 3.2.3
SyntaxError: Catch clause variable cannot have an initializer. (1:23)
> 1 | try {} catch (error = 1){}
    |                       ^
Fix parser inference (#​15927 by @​fisker)
// Prettier 3.2.2
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "json" }

// Prettier 3.2.3
prettier --file-info tsconfig.json
{ "ignored": false, "inferredParser": "jsonc" }

v3.2.2

Compare Source

diff

Fix crash when parsing template literal CSS in a JSX style tag using a spread attribute (#​15896 by @​eelco)

For example this code would crash before:

<style {...spread}>{`.{}`}</style>
Fix formatting error on optional call expression and member chain (#​15920 by @​sosukesuzuki)
// Input
a(() => {}, c?.d());

// Prettier 3.2.1
TypeError: Cannot read properties of undefined (reading 'type')

// Prettier 3.2.2
a(() => {}, c?.d());

v3.2.1

Compare Source

diff

Fix formatting error on member chain (#​15915 by @​sosukesuzuki)
// Input
test().test2().test2(thing?.something);

// Prettier 3.2.0
TypeError: Cannot read properties of undefined (reading 'type')

// Prettier 3.2.1
test().test2().test2(thing?.something);

v3.2.0

Compare Source

diff

🔗 Release Notes

v3.1.1

Compare Source

diff

Fix config file search (#​15363 by @​fisker)

Previously, we start search for config files from the filePath as a directory, if it happened to be a directory and contains config file, it will be used by mistake.

├─ .prettierrc
└─ test.js         (A directory)
  └─ .prettierrc
// Prettier 3.1.0
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/test.js/.prettierrc

// Prettier 3.1.1
await prettier.resolveConfigFile(new URL("./test.js", import.meta.url));
// <CWD>/.prettierrc
Skip explicitly passed symbolic links with --no-error-on-unmatched-pattern (#​15533 by @​sanmai-NL)

Since Prettier v3, we stopped following symbolic links, however in some use cases, the symbolic link patterns can't be filtered out, and there is no way to prevent Prettier from throwing errors.

In Prettier 3.1.1, you can use --no-error-on-unmatched-pattern to simply skip symbolic links.

Consistently use tabs in ternaries when useTabs is true (#​15662 by @​auvred)
// Input
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.0
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
	  ? ddddddddddddddd
	  : eeeeeeeeeeeeeee
	    ? fffffffffffffff
	    : gggggggggggggggg;

// Prettier 3.1.1
aaaaaaaaaaaaaaa
	? bbbbbbbbbbbbbbbbbb
	: ccccccccccccccc
		? ddddddddddddddd
		: eeeeeeeeeeeeeee
			? fffffffffffffff
			: gggggggggggggggg;
Improve config file search (#​15663 by @​fisker)

The Prettier config file search performance has been improved by more effective cache strategy.

Fix unstable and ugly formatting for comments in destructuring patterns (#​15708 by @​sosukesuzuki)
// Input
const {
  foo,
  // bar
  // baz
}: Foo = expr;

// Prettier 3.1.0
const {
  foo1,
} // bar
// baz
: Foo = expr;

// Prettier 3.1.0 second output
const {
  foo1, // bar
} // baz
: Foo = expr;

// Prettier 3.1.1
const {
  foo1,
  // bar
  // baz
}: Foo = expr;
Support "Import Attributes" (#​15718 by @​fisker)

TypeScript 5.3 supports the latest updates to the import attributes proposal.

import something from "./something.json" with { type: "json" };
Fix false claim in docs that cursorOffset is incompatible with rangeStart/rangeEnd (#​15750 by @​ExplodingCabbage)

The cursorOffset option has in fact been compatible with rangeStart/rangeEnd for over 5 years, thanks to work by @​ds300. However, Prettier's documentation (including the CLI --help text) continued to claim otherwise, falsely. The documentation is now fixed.

Keep curly braces and from keyword in empty import statements (#​15756 by @​fisker)
// Input
import { } from 'foo';
import { /* comment */ } from 'bar';

// Prettier 3.1.0
import {} from "foo";
import /* comment */ "bar";

// Prettier 3.1.1
import {} from "foo";
import {} from /* comment */ "bar";
Keep empty import attributes and assertions (#​15757 by @​fisker)
// Input
import foo from "foo" with {};
import bar from "bar" assert {};

// Prettier 3.1.0
import foo from "foo";
import bar from "bar";

// Prettier 3.1.1
import foo from "foo" with {};
import bar from "bar" assert {};

v3.1.0

Compare Source

diff

🔗 Release Notes

v3.0.3

Compare Source

diff

Add preferUnplugged: true to package.json (#​15169 by @​fisker and @​so1ve)

Prettier v3 uses dynamic imports, user will need to unplug Prettier when Yarn's PnP mode is enabled, add preferUnplugged: true to package.json, so Yarn will install Prettier as unplug by default.

Support shared config that forbids require() (#​15233 by @​fisker)

If an external shared config package is used, and the package exports don't have require or default export.

In Prettier 3.0.2 Prettier fails when attempt to require() the package, and throws an error.

Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: No "exports" main defined in <packageName>/package.json
Allow argument of require() to break (#​15256 by @​fisker)
// Input
const plugin = require(
  global.STANDALONE
    ? path.join(__dirname, "../standalone.js")
    : path.join(__dirname, "..")
);

// Prettier 3.0.2
const plugin = require(global.STANDALONE
  ? path.join(__dirname, "../standalone.js")
  : path.join(__dirname, ".."));

// Prettier 3.0.3
const plugin = require(
  global.STANDALONE
    ? path.join(__dirname, "../standalone.js")
    : path.join(__dirname, "..")
);
Do not print trailing commas in arrow function type parameter lists in ts code blocks (#​15286 by @​sosukesuzuki)
<!-- Input -->
```ts
const foo = <T>() => {}
```

<!-- Prettier 3.0.2 -->
```ts
const foo = <T,>() => {}
```

<!-- Prettier 3.0.3 -->
```ts
const foo = <T>() => {}
```
Support TypeScript 5.2 using / await using declaration (#​15321 by @​sosukesuzuki)

Support for the upcoming Explicit Resource Management feature in ECMAScript. using / await using declaration

{
   using foo = new Foo();
   await using bar = new Bar();
}

v3.0.2

Compare Source

diff

Break after = of assignment if RHS is poorly breakable AwaitExpression or YieldExpression (#​15204 by @​seiyab)
// Input
const { section, rubric, authors, tags } = await utils.upsertCommonData(mainData);

// Prettier 3.0.1
const { section, rubric, authors, tags } = await utils.upsertCommonData(
  mainData,
);

// Prettier 3.0.2
const { section, rubric, authors, tags } =
  await utils.upsertCommonData(mainData);
Do not add trailing comma for grouped scss comments (#​15217 by @​auvred)
/* Input */
$foo: (
	'property': (),
	// comment 1
	// comment 2
)

/* Prettier 3.0.1 */
$foo: (
  "property": (),
  // comment 1
  // comment 2,
);

/* Prettier 3.0.2 */
$foo: (
  "property": (),
  // comment 1
  // comment 2
);
Print declare and export keywords for nested namespace (#​15249 by @​sosukesuzuki)
// Input
declare namespace abc1.def {}
export namespace abc2.def {}

// Prettier 3.0.1
namespace abc1.def {}
namespace abc2.def {}

// Prettier 3.0.2
declare namespace abc1.def {}
export namespace abc2.def {}

v3.0.1

Compare Source

diff

Fix cursor positioning for a special case (#​14812 by @​fisker)
// <|> is the cursor position

/* Input */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>  } from "fs"

/* Prettier 3.0.0 */
// All messages are represented in JSON.
// So, the prettier.py <|>controls a subprocess which spawns "node {this_file}".
import {} from "fs"

/* Prettier 3.0.1 */
// All messages are represented in JSON.
// So, the prettier.py controls a subprocess which spawns "node {this_file}".
import {<|>} from "fs"
Fix plugins/estree.d.ts to make it a module (#​15018 by @​kingyue737)

Add export {} in plugins/estree.d.ts to fix the "File is not a module" error

Add parenthesis around leading multiline comment in return statement (#​15037 by @​auvred)
// Input
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expression
  )
}

// Prettier 3.0.0
function fn() {
  return /**
   * @&#8203;type {...}
   */ expression;
}

// Prettier 3.0.1
function fn() {
  return (
    /**
     * @&#8203;type {...}
     */ expression
  );
}
Add support for Vue "Generic Components" (#​15066 by @​auvred)

https://blog.vuejs.org/posts/vue-3-3#generic-components

<!-- Input -->
<script setup lang="ts" generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"></script>

<!-- Prettier 3.0.0 -->
<script
  setup
  lang="ts"
  generic="T extends Type1 & Type2 & (Type3 | Type4), U extends string | number | boolean"
></script>

<!-- Prettier 3.0.1 -->
<script
  setup
  lang="ts"
  generic="
    T extends Type1 & Type2 & (Type3 | Type4),
    U extends string | number | boolean
  "
></script>
Fix comments print in IfStatement (#​15076 by @​fisker)
function a(b) {
  if (b) return 1; // comment
  else return 2;
}

/* Prettier 3.0.0 */
Error: Comment "comment" was not printed. Please report this error!

/* Prettier 3.0.1 */
function a(b) {
  if (b) return 1; // comment
  else return 2;
}
Add missing type definition for printer.preprocess (#​15123 by @​so1ve)
export interface Printer<T = any> {
  // ...
+ preprocess?:
+   | ((ast: T, options: ParserOptions<T>) => T | Promise<T>)
+   | undefined;
}
Add missing getVisitorKeys method type definition for Printer (#​15125 by @​auvred)
const printer: Printer = {
  print: () => [],
  getVisitorKeys(node, nonTraversableKeys) {
    return ["body"];
  },
};
Add typing to support readonly array properties of AST Node (#​15127 by @​auvred)
// Input
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");

// Prettier 3.0.0
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
//                  ^ Argument of type '"readonlyArray"' is not assignable to parameter of type '"regularArray"'. ts(2345)

// Prettier 3.0.1
interface TestNode {
  readonlyArray: readonly string[];
}

declare const path: AstPath<TestNode>;

path.map(() => "", "readonlyArray");
Add space before unary minus followed by a function call (#​15129 by @​pamelalozano)
// Input
div {
  margin: - func();
}

// Prettier 3.0.0
div {
  margin: -func();
}

// Prettier 3.0.1
div {
  margin: - func();
}

v3.0.0

Compare Source

diff

🔗 Release Notes

v2.8.8

Compare Source

This version is a republished version of v2.8.7.
A bad version was accidentally published and it can't be unpublished, apologies for the churn.

v2.8.7

Compare Source

diff

Allow multiple decorators on same getter/setter (#​14584 by @​fisker)
// Input
class A {
  @&#8203;decorator()
  get foo () {}
  
  @&#8203;decorator()
  set foo (value) {}
}

// Prettier 2.8.6
SyntaxError: Decorators cannot be applied to multiple get/set accessors of the same name. (5:3)
  3 |   get foo () {}
  4 |   
> 5 |   @&#8203;decorator()
    |   ^^^^^^^^^^^^
  6 |   set foo (value) {}
  7 | }

// Prettier 2.8.7
class A {
  @&#8203;decorator()
  get foo() {}

  @&#8203;decorator()
  set foo(value) {}
}

v2.8.6

Compare Source

diff

Allow decorators on private members and class expressions (#​14548 by @​fisker)
// Input
class A {
  @&#8203;decorator()
  #privateMethod () {}
}

// Prettier 2.8.5
SyntaxError: Decorators are not valid here. (2:3)
  1 | class A {
> 2 |   @&#8203;decorator()
    |   ^^^^^^^^^^^^
  3 |   #privateMethod () {}
  4 | }

// Prettier 2.8.6
class A {
  @&#8203;decorator()
  #privateMethod() {}
}

v2.8.5

Compare Source

diff

Support TypeScript 5.0 (#​14391 by @​fisker, #​13819 by @​fisker, @​sosukesuzuki)

TypeScript 5.0 introduces two new syntactic features:

  • const modifiers for type parameters
  • export type * declarations
Add missing parentheses for decorator ([#​14393](https:/

Configuration

📅 Schedule: Branch creation - "before 3am on Monday" in timezone Europe/Paris, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-all branch 2 times, most recently from 70a336c to b3ca140 Compare October 9, 2021 22:21
@renovate renovate bot changed the title chore(deps): update dependency p-each-series to v3 chore(deps): update all (major) Oct 9, 2021
@renovate renovate bot force-pushed the renovate/major-all branch from b3ca140 to 60a314e Compare October 14, 2021 04:44
@renovate renovate bot force-pushed the renovate/major-all branch 2 times, most recently from 41fa5e4 to 0b5cf16 Compare October 22, 2021 22:33
@renovate renovate bot force-pushed the renovate/major-all branch 2 times, most recently from 6ef9623 to 395cd38 Compare November 9, 2021 14:18
@renovate renovate bot force-pushed the renovate/major-all branch 5 times, most recently from 0bafbee to 835177e Compare November 21, 2021 09:33
@renovate renovate bot force-pushed the renovate/major-all branch 3 times, most recently from 5186d89 to 9ac69ea Compare December 10, 2021 15:42
@renovate renovate bot force-pushed the renovate/major-all branch from 9ac69ea to 08c2e83 Compare December 17, 2021 23:40
@renovate renovate bot force-pushed the renovate/major-all branch 2 times, most recently from f88748b to a0449b6 Compare January 1, 2022 01:17
@renovate renovate bot force-pushed the renovate/major-all branch 6 times, most recently from 5b7f8e8 to 974160e Compare January 16, 2022 10:26
@renovate renovate bot force-pushed the renovate/major-all branch 5 times, most recently from 9110f48 to 528bc9c Compare January 17, 2022 22:31
@renovate renovate bot force-pushed the renovate/major-all branch from 0bc2380 to 7d5b52b Compare June 11, 2024 06:57
@renovate renovate bot force-pushed the renovate/major-all branch from 7d5b52b to dd02191 Compare July 13, 2024 12:58
@renovate renovate bot force-pushed the renovate/major-all branch from dd02191 to 67a32f6 Compare July 24, 2024 13:45
@renovate renovate bot force-pushed the renovate/major-all branch from 67a32f6 to c34f491 Compare August 3, 2024 21:36
@renovate renovate bot force-pushed the renovate/major-all branch from c34f491 to 0c19396 Compare September 6, 2024 16:31
@renovate renovate bot force-pushed the renovate/major-all branch from 0c19396 to 7372a7b Compare October 29, 2024 15:14
@renovate renovate bot force-pushed the renovate/major-all branch from 7372a7b to 2fcffe1 Compare November 26, 2024 08:44
@renovate renovate bot force-pushed the renovate/major-all branch from 2fcffe1 to a3b2d81 Compare November 26, 2024 17:16
@renovate renovate bot force-pushed the renovate/major-all branch from a3b2d81 to 6a24900 Compare December 4, 2024 11:09
@renovate renovate bot force-pushed the renovate/major-all branch from 6a24900 to cbae276 Compare February 9, 2025 13:57
@renovate renovate bot force-pushed the renovate/major-all branch from cbae276 to 448a219 Compare February 13, 2025 19:36
@renovate renovate bot force-pushed the renovate/major-all branch from 448a219 to 839ffce Compare February 22, 2025 06:42
@renovate renovate bot force-pushed the renovate/major-all branch from 839ffce to df6f1ff Compare March 3, 2025 02:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants