- Add
evaluateContent
to safely evaluate snippet/helper content
- Rewrite
evalHelper
to avoid usingeval
- Rewrite
evalSnippet
to avoid usingeval
- Support node v22 on github actions
- Read node version from
package.json
- Eval snippet on gist.github.com
- Add
Configuration.strict
- Skip NpmVersion match if
Configuration.strict
is false - Skip NodeVersion match if
Configuration.strict
is false
- Use
spawnSync
for git command
- Require
@synvert-hq/synvert-core
- Rename package to
@synvert-hq/synvert-core
- Moving from
@xinminlabs
to@synvert-hq
- Add
Configuration.respectGitignore
- Glob files with
git check-ignore
ifConfiguration.respectIgnore
is true
- Update
@xinminlabs/node-mutation
to 1.17.1 - Make
group
dsl work both sync and async
- Update
@xinminlabs/node-query
to 1.19.0 - Update
@xinminlabs/node-mutation
to 1.16.0 - Initialize
NodeQuery
andNodeMutation
withadapter
- Update
@xinminlabs/node-mutation
to 1.15.11
- Update
@xinminlabs/node-mutation
to 1.15.9
- Update
@xinminlabs/node-mutation
to 1.15.3 - Fix
insertAfter
to child node
- Update
@xinminlabs/node-mutation
to 1.15.1 - Prepare before
processSync
- Update
@xinminlabs/node-mutation
to 1.15.0 - Remove
newLinePosition
option frominsertAfter
dsl
- Update
@xinminlabs/node-mutation
to 1.14.1 - Update
insert
,delete
andremove
options
- Allow
indent
negative value
- Add
group
toACTION_METHODS
- Update
@xinminlabs/node-mutation
to 1.13.0 - Add
group
dsl
- Do not rename file if options
writeToFile
is false
- Update
@xinminlabs/node-query
to 1.18.2 - Update
@xinminlabs/node-mutation
to 1.12.0
- Fix file path when sync parse code
- Fix jsdoc
- Add default value to
insertAfter
andinsertBefore
apis - Remove
newLinePosition
option forinsertBefore
api
- Export
ALL_CSS_FILES
,ALL_LESS_FILES
,ALL_SASS_FILES
, andALL_SCSS_FILES
- Drop
renameFileTo
from Instance and addrenameFile
to Rewriter - Fix
insertAfter
andinsertBefore
code
- Remove
ALLOW_INSERT_AT_SAME_POSITION
strategy - Add
GonzalesPe
to parse css, less, sass, and scss - Add new api
renameFileTo
andrenameFileToSync
- Add
Helper
for shared snippet - Rewrite
callHelper
- Update
@xinminlabs/node-query
to 1.18.0 and@xinminlabs/node-mutation
to 1.9.0
- Add
type
toAction
addFile
work for testremoveFile
work for test- Update
@xinminlabs/node-mutation
to 1.8.0
- Use Generic Type
- Update
@xinminlabs/node-mutation
to 1.17.0 and@xinminlabs/node-query
to 1.7.0
- Add
skipFirstLine
option toindent
api - Update
@xinminlabs/node-mutation
to 1.6.2
- Support Html files
- Support Rails Erb files
- Fix typo
ArrayLiteralExpression
- Add
tabSize
option toaddLeadingSpaces
- Rename
deleteNode
dsl todelete
- Add
Configuration#tabWidth
- Add
Instance#addLeadingSpaces
- Add
Configuration#semi
- Add
Instance#appendSemicolon
- Add
Instance#wrapWithQuotes
- Add
Configuration#singleQuote
- Add
quote
util
- Insert
require("synvert-core")
if missing in snippet
- Remove
Instance#queryAdapter
- Heredoc for
description
- Use Typescript instead of Espree by default
- Add
Instance#mutationAdapter
andInstance#queryAdapter
when test
- Fix typo
- Rename
largeFileSizeThreshold
Configuration tomaxFileSize
- Add
Configuration#largeFileSizeThreshold
- Update
this.mutationAdapter
andthis.queryAdapter
properly - Await
Rewriter#process
inaddSnippet
- Do not add
this.
before queryAdapter and mutationAdapter
- Process scopes in serial
- One Instance handles only one file
- Add
Instance#filePath
,Instance#mutationAdapter
andInstance#queryAdapter
properties
- Move
indent
to be an Instance method - Add
queryAdapter
method - Define both sync and async conditions and scopes
- Remove
Instance#currentFilePath
andInstance#currentFileSource
- Await
callHelper
- Remove unnecessary async/await
- Rewrite snippet twice still gets the same result
- Expose
rewriteSnippetToSyncVersion
andrewriteSnippetToAsyncVersion
- Load snippet will do rewrite internally
- Rewrite snippet before eval
- Drop global variables
- Add utilities to rewrite snippets to sync and async versions
- Fix load file snippet
- Format remote snippet url
- Load snippet from github
- export
SnippetNotFoundError
- Add
Rewriter#affectedFiles
after processing - Set
types
inpackage.json
Condition
options
is optional
- Add
elseFunc
to all conditions
- Revert "remove EspreeAdapter#getIndent"
- Use
Adapter#getIndent
forgetSource#indent
- node-mutation
espree
adaptergetSource
supportsfixIndent
option
- Add global variable
mutationAdapter
- Remove
EspreeAdapter#getIndent
- Remove unused
ast-node-ext
andarray-ext
- Export
Parser
andStrategy
- Add
allow_insert_at_same_position
strategy - Uppercase for enum keys
insertAfter
andinsertBefore
acceptInsertOptions
- Add
callHelper
dsl
- Add
insertAfter
dsl - Add
insertBefore
dsl
- Condition accepts both nql and rules
- Make
findNode
as an alias towithinNode
- Ignore if parse is espree and extname is ts or tsx
- Add
addFile
dsl - Add
removeFile
dsl
- Fix eval a snippet
- Export
evalSnippet
function
- Add
processWithSandbox
- Revert "remove runInstance option"
- Remove error.ts
Rewriter.fetch
does not raise error if rewriter not found
addSnippet
supports http url and file path- Remove
Rewriter.execute
- Remove
Rewriter.call
- Remove
runInstance
option
- Remove
Configuration.enableEcmaFeaturesJsx
- Add method
Rewriter.clear
- Add
noop
dsl
QueryScope
andWithinScope
accept aQueryOptions
- Always enable jsx
- Write absolute path
- Export
TestResultExt
- Read absolute path
- Return relative path instead of absolute path
- Use
fast-glob
instead ofnode-glob
- Add
Configuration.onlyPaths
- Rename
Configuration.skipFiles
toConfiguration.skipPaths
- Set
Configuration.skipPaths
to["**/node_modules/**"]
by default - Rename
Configuration.path
toConfiguration.rootPath
- Use
NodeMutation#test
method
- Do not override default rewriter
options
- Debug
process
andtest
result
- Add
ALL_FILES
constant
testResults
only contain affected results
- Rename
sandbox
torunInstance
option - Add
writeToFile
option - Add
Rewriter#test
method
- Explicitly set typescript adapter
- Fix
EspreeAdapter#rewrittenSource
if regex does not match
- Rename
type
tonodeType
- Use
NodeQuery
to read node rules - Read target node in EspreeAdapter itself
- Add
Rewriter.execute
method.
- Use
NodeMutation
new api
- Configure NodeMutation
strategy
- Update
@xinminlabs/node-query
to 1.8.5
- Configure
parser
- Rename
ALL_FILES
toALL_JS_FILES
- Add
ALL_TS_FILES
- Support both
espree
andtypescript
parsers
- Configure
sourceType
- Add
@xinminlabs/node-mutation
and remove action - Simplify
ast-node-ext
- Fix
Rewriter#description
signature - Make
NodeVersion
andNpmVersion
fields public - Update
@xinminlabs/node-query
to 1.7.1
- Add
findNode
dsl - Migrate to Typescript
- Remove space when removing a property in jsx element.
- Support
ClassDeclaration
class
inchildNodeRange
. - Support
arguments.0
for empty argument call inchildNodeRange
. - Deprecate
fixIndentToSource
, usetoSource({ fixIndent: true })
instead.
- Process with sandbox
- Set
Rewriter.current
properly after calling sub snippet
- Remove
dedent
util - Set
in
option for condition
- Strict rewritten code regex
- Fix fixIndentToSource when end indent does not match start indent
- Add
commentOut
action - Set currentFilePath as absolute path
- Add
minimatch
to check path
- Process single file
- Set and get rewriter
options
- Use
xinminlabs-espree
instead ofespree
- Update
eslint-visitor-keys
to 3.2.0 - Match regexp on number and node source
- Add
to
option toInsertAction
- Add
Instance#currentFilePath
- Remove braces
- Support function name in
Node#childNodeRange
- Match
gt
,gte
,lt
andlte
value.
- Add
Array#fixIndentToSource
- Catch
SyntaxError
- Add
autoIndent
option toReplaceWithAction
- Add
global.indent
andglobal.dedent
- Add
Array#toSource
- Dedent multiline code
- Use our own fork
eslint-visitor-keys
- Improve remove comma function
- Export
ALL_FILES
constant
- Support
Property
semicolon
inchildNodeRange
options.match
can be function forifAll
dsl
- Support
ImportDeclaration
specifierschildNodeRange
- Add
ifAll
dsl
- Remove unused comma after delete/remove action
- Match
in
andnotIn
array value
- Drop
withFiles
, addwithinFile
dsl - Update espree github url
- Export
Synvert.version
- Return the range of source code in
rewrittenSource
- Fix
remove
endPos - Fix
remove
parameter - Compatible with npm lockfile version 1 and 2
- Add
ifNode
dsl - Add
ifNpm
dsl - Squeeze spaces and lines
- Handle array child node in
childNodeRange
- Handle function params in
childNodeRange
- Add
Node#childNodeSource
- Add
Node#fixIndentToSource
- Match
super
- Fix action indent
- Update espree
- Add
Configuration.enableEcmaFeaturesJsx
- Support
MethodDefinition
asyncchildNodeRange
- Add
Configuration.showRunProcess
- Check
arrayBody()
- Add
ifOnlyExistNode
dsl - Fix PrependAction
beginPos
- Add
addSnippet
dsl
- Add
remove
dsl
- Support .jsx
- Fix
append
/prepend
without indent forProgram
node
- Add
append
dsl - Add
prepend
dsl
- Add global
Configuration
- Ignore node_modules
- Set sourceType to module
- Add
NotSupportedError
- Add
RewriterNotFoundError
- Call a rewriter
- Add node
actualValue
to match rules by function - Add
gotoNode
dsl - Add
Array.prototype.first
andArray.prototype.last
- Add
get
/set
instancecurrentFileSource
- Match
not
- Match regexp
- Add
unlessExistNode
dsl
- Add
ifExistNode
dsl - Match
this
shorts for match{ type: 'ThisExpression' }
- Rename
delete
dsl todeleteNode
- Add
insert
dsl - Add
delete
dsl ReplaceAction
supports multiple selectorschildNodeRange
supportsMemberExpression
arguments
anddot
- Add
replaceWith
dsl - Add
Rewriter.current
- Add
Instance.current
- Fix
Instance#process
for multiplewithNode
- Get nested
childNodeRange
- Match value
id.name === id
- Add
ReplaceWithAction
- Rename
Node#indent
toNode#column
- Add
description
dsl - Add github actions
- Initial commit