Skip to content

Releases: snowcoders/sortier

Release 2.1.1

Choose a tag to compare

@github-actions github-actions released this 06 Mar 22:48
258d619
  • Fixed config file not being used if not in current working directory (thanks @jpaas)

Release 2.1.0

Choose a tag to compare

@github-actions github-actions released this 26 Jan 05:47
f55d495
  • Updated our typescript parsing dependencies
  • Fixed bug when sortContents is enabled, sometimes member functions aren't sorted

Release 2.0.2

Choose a tag to compare

@github-actions github-actions released this 30 Sep 21:23
430571a
  • Fixed files with special characters not being recognized (ex. ./src/[...something].ts)

Release 2.0.1

Choose a tag to compare

@github-actions github-actions released this 06 Aug 20:40
0d29176
  • Fixed generics not being sorted
  • Refactored code for sorting switch cases
  • Avoid sorting polyfill imports as it could result in incorrect import order

Release 2.0.0

Choose a tag to compare

@github-actions github-actions released this 10 Feb 09:34
  • Added --ignore-unknown flag support so sortier can return an exit code of 0 on files it doesn't support. For those using lint-staged, your config can be simplified to something like:
    {
      "*": ["prettier --ignore-unknown --write", "sortier --ignore-unknown"]
    }
  • Better console output now prints each matched file, any errors if encountered, and the time it takes to sort that file. For example running sortier "*{package,sortier}*" in this repository prints:
    .sortierignore - No parser could be inferred - 2ms
    .sortierrc.cjs - 28ms
    package.json - 23ms
    
  • Breaking
    • Fixed dot files being skipped
    • formatFile throws an error when run on an ignored filepath
    • Dropped support for node 12 and 14, only support >=16

Release 2.0.0-beta.0

Release 2.0.0-beta.0 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 16 Jan 06:47
  • Added --ignore-unknown flag support so sortier can return an exit code of 0 on files it doesn't support. For those using lint-staged, your config can be simplified to something like:
    {
      "*": ["prettier --ignore-unknown --write", "sortier --ignore-unknown"]
    }
  • Better console output now prints each matched file, any errors if encountered, and the time it takes to sort that file. For example running sortier "*{package,sortier}*" in this repository prints:
    .sortierignore - No parser could be inferred - 2ms
    .sortierrc.cjs - 28ms
    package.json - 23ms
    
  • Breaking
    • Fixed dot files being skipped
    • formatFile throws an error when run on an ignored filepath
    • Dropped support for node 12 and 14

1.0.1

Choose a tag to compare

@k2snowman69 k2snowman69 released this 22 Dec 04:13
  • Fixed bug where imports would be mangled intermittently (depends on version of parser that is installed)

1.0.1-beta.0

1.0.1-beta.0 Pre-release
Pre-release

Choose a tag to compare

@k2snowman69 k2snowman69 released this 22 Dec 03:47
  • Fixed bug where imports would be mangled intermittently (depends on version of parser that is installed)

1.0.0

Choose a tag to compare

@github-actions github-actions released this 20 Dec 00:33

Breaking from @snowcoders/sortier@3

  • Sortier is now written in ESM which means
    • We only support node versions "^12.20.0 || ^14.13.1 || >=16.0.0"
    • You might be required to use the --experimental-vm-modules flag
  • JS parsing will now default to using the typescript parser. If you use flow, you'll need to explicitly configure sortier to use flow by setting js.parser: "flow" in your config.
  • Changed options.js.sortClassContents to options.js.sortContents. In the future we might support sorting functions within a file and they will share the same sort criteria.
  • Renamed type ReprinterOptions to SortierOptions
  • Functions formatFile and formatText both now throw errors if a file does not have a supported parser.

Other changes

  • Refactored Import/Export declarations sorting to handle comments more consistently with the rest of the program.
    • If there is one comment above the group, it's considered a comment for the whole group
    • If there are 2+ comments in the group, those comments will be assumed to be tied to the item either below or to the left of the comment
  • Removed sorting of all BinaryExpressions. Honestly we got a lot of feedback that this wasn't super useful and the risk of bugs was higher than the benefit. We can revisit if others voice alternative opinions.
  • Fixed bug where sorting nodes at the very beginning or very end with comments would result in incorrect output
  • Added resolveOptions to resolve the options for a given filepath
  • Added isIgnored to determine if a given file path is ignored
  • Improved error output for cli
  • Fixed exit code not 0 when encountering unsupported file types (instead we should just skip them)

1.0.0-beta.9

1.0.0-beta.9 Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Dec 18:02
  • Reverted all changes in beta.8