Repository navigation
Version Packages - #7
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/EXCEPTkept theirWITH,ORDER BY,LIMITand locking clauses, and operands are parenthesized where needed.ARRAY(subquery),(f(x)).*,ROW(...)and row comparisons with a subquery are preserved.float8,"char",int[3],pg_catalog.text), and casts tointervalof non-literals stay casts.EXCLUDE,MATCH FULL,NO INHERIT,NOT VALID,INCLUDE/WITH/USING INDEX TABLESPACE,ON DELETE SET NULL (cols), identity options, table-levelDEFERRABLE, andUSING INDEX.ON CONFLICTkeeps expression targets and the partial-indexWHERE.ALTER ... RENAMEworks for every object kind, includingALTER TYPE ... RENAME VALUE, which had becomeADD VALUE.DROP TRIGGER / POLICY / RULE ... ON,DROP OPERATOR CLASS ... USING,DROP CASTandDROP TRANSFORMare printed correctly.COMMIT AND CHAIN,ALTER COLUMN ... TYPE ... USING,ALTER TYPE ... ADD / DROP / ALTER ATTRIBUTE, VACUUM / ANALYZE option values,current_timestamp(0)-style precision, schema-qualifiedOPERATOR(...), SQL/JSONPASSING, wrapper, quotes andON EMPTY/ON ERRORclauses, and JSON aggregateORDER BY/FILTER/OVER.DOblocks no longer gain aLANGUAGE 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
VALUESquery keeps itsWITHclause (WITH c AS (...) VALUES (...)); the CTEs were dropped.prettier-plugin-tsql@0.9.1
Patch Changes
ALTER TABLE ... ADDkeepsDEFAULT ... WITH VALUES(which fills existing rows),PERIOD FOR SYSTEM_TIME (...)(it printedadd ;) andINDEXdefinitions; a masking function containing a quote is escaped.]keep it escaped ([a]]b]); it was printed unescaped, which doesn't parse.COLLATEis 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.UNIONdisappeared; 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.CREATE SCHEMAkeeps the tables, views and permissions created with it (CREATE SCHEMA s CREATE TABLE ... GRANT ...); they were dropped.UPDATE/DELETE ... WHERE CURRENT OF cursorkept itsWHERE: it was dropped, which turned a one-row change into one affecting every row.OPEN,FETCH,CLOSEandDEALLOCATE GLOBAL cursorkeepGLOBAL— without it a local cursor of the same name is used — andDECLARE c INSENSITIVE SCROLL CURSORkeeps its ISO form instead of becoming invalid.OPTION (...)query hints onINSERT,UPDATE,DELETEandMERGE; column names on a derived table ((SELECT ...) AS s (a, b)); andMERGE ... INSERT DEFAULT VALUES, which printed asinsert values ().- -aprinted as--a, which starts a comment and drops the rest of the line; it now prints- -a.DROP INDEXkeeps itsWITH (ONLINE = ON, MOVE TO ...)options, and the oldDROP INDEX table.indexform is supported (it printeddrop index ;).EXECUTEkeeps everything it was written with:AS USER/AS LOGIN = 'name', pass-through parameters forEXECUTE ('...', 1) AT server, a bracketed linked-server name, a procedure number (dbo.p;2), andWITH RESULT SETS— which was found by searching the text, so a string containing those words produced broken output.@a int = 1) andREADONLY; they were dropped.INDEX ixinCREATE TABLE, andINDEXdefinitions in table variables and table types, along with a table type'sWITH (MEMORY_OPTIMIZED = ON). All were dropped.WITH INLINE = OFFon a function staysOFF; it printed asINLINE, which turns scalar UDF inlining on.SET @x.modify(...)keeps the method name's case withsqlKeywordCase: "upper": xml and CLR type methods are case-sensitive, so@x.MODIFY(...)failed to run.WITHoptions (EXECUTE AS,ENCRYPTION, ...), procedures keepFOR REPLICATION, and anEXECUTE AS 'principal'containing a quote is escaped.IF,WHILEor another block is printed once; it was repeated after the block.{fn UCASE('a')}keep their{fn ...}wrapper; without it the functions don't exist.ALTER TABLE ... REBUILDwithout a partition no longer prints an emptyPARTITION =, and partition numbers given as variables (REBUILD PARTITION = @p,SWITCH PARTITION @p) are kept.TRYblock moved to the top of theCATCHblock.SELECT ... INTO t ON filegroupkeeps itsON filegroup.ON scheme(column)keeps its partitioning column, andON filegroup/FILESTREAM_ONare no longer dropped from constraints, inline indexes,CREATE INDEXand columnstore indexes. Column-levelPRIMARY KEY/UNIQUEalso keep theirWITH (...)options.ROLLBACK TRAN @savepointhad become a fullROLLBACK),COMMIT ... WITH (DELAYED_DURABILITY = ON), andWITH MARKdescriptions that are variables or contain quotes.WITHkeeps its CTEs (andXMLNAMESPACES); they were dropped, leaving a view that referenced a missing name. View column names that need brackets keep them.WAITFOR (RECEIVE ...), TIMEOUT nandWAITFOR (GET CONVERSATION GROUP ...)are kept; they printed aswaitfor delay ;.WINDOWclause is printed beforeORDER BY, where T-SQL requires it; after it, the output didn't parse.