Skip to content

Version Packages - #7

Merged
schallm merged 1 commit into
mainfrom
changeset-release/main
Sep 27, 2026
Merged

schallm merged 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

prettier-plugin-postgresql@0.3.1

Patch Changes

  • bdd66bc: Fix formatting that changed what SQL means or produced SQL that doesn't parse:

    • UNION / INTERSECT / EXCEPT kept their WITH, ORDER BY, LIMIT and locking clauses, and operands are parenthesized where needed.
    • ARRAY(subquery), (f(x)).*, ROW(...) and row comparisons with a subquery are preserved.
    • Type names resolve as written (float8, "char", int[3], pg_catalog.text), and casts to interval of non-literals stay casts.
    • Constraints keep every clause: EXCLUDE, MATCH FULL, NO INHERIT, NOT VALID, INCLUDE / WITH / USING INDEX TABLESPACE, ON DELETE SET NULL (cols), identity options, table-level DEFERRABLE, and USING INDEX.
    • ON CONFLICT keeps expression targets and the partial-index WHERE.
    • ALTER ... RENAME works for every object kind, including ALTER TYPE ... RENAME VALUE, which had become ADD VALUE.
    • DROP TRIGGER / POLICY / RULE ... ON, DROP OPERATOR CLASS ... USING, DROP CAST and DROP TRANSFORM are printed correctly.
    • Kept: COMMIT AND CHAIN, ALTER COLUMN ... TYPE ... USING, ALTER TYPE ... ADD / DROP / ALTER ATTRIBUTE, VACUUM / ANALYZE option values, current_timestamp(0)-style precision, schema-qualified OPERATOR(...), SQL/JSON PASSING, wrapper, quotes and ON EMPTY / ON ERROR clauses, and JSON aggregate ORDER BY / FILTER / OVER.
    • Quotes in enum values are escaped, and DO blocks no longer gain a LANGUAGE plpgsql.
  • 4750d81: A schema-qualified operator in ANY / ALL (a OPERATOR(pg_catalog.=) ANY (...)) is kept; it printed the schema name as the operator, which doesn't parse.

  • c504901: A VALUES query keeps its WITH clause (WITH c AS (...) VALUES (...)); the CTEs were dropped.

prettier-plugin-tsql@0.9.1

Patch Changes

  • 385d3b5: ALTER TABLE ... ADD keeps DEFAULT ... WITH VALUES (which fills existing rows), PERIOD FOR SYSTEM_TIME (...) (it printed add ;) and INDEX definitions; a masking function containing a quote is escaped.
  • 7d4fc53: Bracketed names containing ] keep it escaped ([a]]b]); it was printed unescaped, which doesn't parse.
  • d3d3ac0: COLLATE is kept after any expression — literals, variables, function calls, CAST, CASE, subqueries and parenthesized expressions. It was only kept after column names and silently dropped elsewhere, changing how comparisons and sorts behave.
  • a84657d: Comments inside a statement are no longer dropped. A comment after the last select item, a table name, a join condition, a column definition, a CTE body or a UNION disappeared; every comment is now printed where it was, or at worst right after its statement. Line comments in fill-packed lists (UPDATE ... SET, compact lists) also end their line, instead of swallowing the items that followed.
  • 918848b: CREATE SCHEMA keeps the tables, views and permissions created with it (CREATE SCHEMA s CREATE TABLE ... GRANT ...); they were dropped.
  • bac1614: UPDATE / DELETE ... WHERE CURRENT OF cursor kept its WHERE: it was dropped, which turned a one-row change into one affecting every row.
  • 7e2a4b4: OPEN, FETCH, CLOSE and DEALLOCATE GLOBAL cursor keep GLOBAL — without it a local cursor of the same name is used — and DECLARE c INSENSITIVE SCROLL CURSOR keeps its ISO form instead of becoming invalid.
  • 55014c6: Kept clauses that were dropped from DML: OPTION (...) query hints on INSERT, UPDATE, DELETE and MERGE; column names on a derived table ((SELECT ...) AS s (a, b)); and MERGE ... INSERT DEFAULT VALUES, which printed as insert values ().
  • b365ff1: A double negation such as - -a printed as --a, which starts a comment and drops the rest of the line; it now prints - -a.
  • 77efa73: DROP INDEX keeps its WITH (ONLINE = ON, MOVE TO ...) options, and the old DROP INDEX table.index form is supported (it printed drop index ;).
  • 5b8d23b: EXECUTE keeps everything it was written with: AS USER / AS LOGIN = 'name', pass-through parameters for EXECUTE ('...', 1) AT server, a bracketed linked-server name, a procedure number (dbo.p;2), and WITH RESULT SETS — which was found by searching the text, so a string containing those words produced broken output.
  • 95e1522: Function parameters keep their defaults (@a int = 1) and READONLY; they were dropped.
  • a64084f: Indexes declared in a table body are kept: column-level INDEX ix in CREATE TABLE, and INDEX definitions in table variables and table types, along with a table type's WITH (MEMORY_OPTIMIZED = ON). All were dropped.
  • a8d12f0: WITH INLINE = OFF on a function stays OFF; it printed as INLINE, which turns scalar UDF inlining on.
  • 0729aa3: SET @x.modify(...) keeps the method name's case with sqlKeywordCase: "upper": xml and CLR type methods are case-sensitive, so @x.MODIFY(...) failed to run.
  • 6ec04eb: Triggers keep their WITH options (EXECUTE AS, ENCRYPTION, ...), procedures keep FOR REPLICATION, and an EXECUTE AS 'principal' containing a quote is escaped.
  • b2057bd: A trailing comment on a statement inside IF, WHILE or another block is printed once; it was repeated after the block.
  • 5b4f720: ODBC function escapes such as {fn UCASE('a')} keep their {fn ...} wrapper; without it the functions don't exist.
  • 90e0963: ALTER TABLE ... REBUILD without a partition no longer prints an empty PARTITION =, and partition numbers given as variables (REBUILD PARTITION = @p, SWITCH PARTITION @p) are kept.
  • 5546526: A comment at the end of a statement inside a block stays on that statement's line. A comment after the last statement of a TRY block moved to the top of the CATCH block.
  • 08d5f5a: SELECT ... INTO t ON filegroup keeps its ON filegroup.
  • 9dd2b7e: Storage clauses are kept on indexes and constraints: ON scheme(column) keeps its partitioning column, and ON filegroup / FILESTREAM_ON are no longer dropped from constraints, inline indexes, CREATE INDEX and columnstore indexes. Column-level PRIMARY KEY / UNIQUE also keep their WITH (...) options.
  • 9ebdf20: Transaction statements keep everything they were written with: names and savepoints given as variables (ROLLBACK TRAN @savepoint had become a full ROLLBACK), COMMIT ... WITH (DELAYED_DURABILITY = ON), and WITH MARK descriptions that are variables or contain quotes.
  • 4b4f71c: A view whose body starts with WITH keeps its CTEs (and XMLNAMESPACES); they were dropped, leaving a view that referenced a missing name. View column names that need brackets keep them.
  • 0924b2d: WAITFOR (RECEIVE ...), TIMEOUT n and WAITFOR (GET CONVERSATION GROUP ...) are kept; they printed as waitfor delay ;.
  • 1093422: A WINDOW clause is printed before ORDER BY, where T-SQL requires it; after it, the output didn't parse.

@schallm
schallm merged commit 5b8fe91 into main Sep 27, 2026
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.

1 participant