Here's a list of the notable changes in the Scroll SDK.
section
gettergetParticles
alias to findParticles
isLast
getterisFirst
getterisBlank
getterfrequency
in Parsers is now popularity
versionParser
parser from ParsershighlightScope
is now called paint
globallysortTemplate
. Use sortIndex
in Scroll instead.getRunTimeEnumOptionsForValidation
makeError
method to ParserBackedNodeGrammar
language is now called Parsers
. This is a massive change but a simple Grammar/Parsers and grammar/parsers find/replace should update any affected code..parsers
file extension instead of .grammar
.parsers
programUrl
as well.assembleFile
(formerly evaluateImports
) is now faster by stripping Parser Definitions from assembled files, using them only in the returned parsers. (There are still many speed improvements to be had here)ParticleFileSystem.evaluateImports
method is now ParticleFileSystem.assembleFile
, and the interface of the returned object has changed.devDependencies
main
entry to package.json so require.resolve
worksjtree/products/Path.js
ParticleFileSystem.broswer.js
imports
code from Scroll into the ParticleFileSystem
package for other TreeLangs to reuseThis is purely a maintenance release. Unused code and npm packages were removed. The minimum supported NodeJS version is now 16.
This is a major release with significant name breaks. All logic is the same but methods have been renamed to better express the core idea of Languages as small simple parsers combined.
sortTemplate
. You can now use sortKey
in addition to keywords.sortTemplate
.cruxPathAsColumnName
method on parser definition nodesconcreteDescendantDefinitions
now recurses. use concreteInScopeDescendantDefinitions
for old behavior.This was a refactor of Grammar to support scoped parsers. I also took the opportunity to switch more get()
methods to getters.
getX()
have been changed to getters like get x()
:toX()
have been changed to getters like get asX()
:Disk.writeObjectToDisk
Utils.isAbsoluteUrl
, Particle.toFlatObject
, Disk.recursiveReaddirSync
, Disk.writeObjectToDisk
appendUniqueLine
methodgetCustomIndex
should return arrays of hits to work for non unique keys as wellgetCustomIndex
fnrunCommand
now also looks for commands on the parent classTrueBase
and tql
are now in the repo https://github.com/breck7/truebase
and npm package truebase
.selectAll
keywordquickCache
TrueBaseFolder:
makeId
getFile
rename
createFile
searchIndex
TrueBaseFile:
sort
prettifyAndSave
parsed
updatePermalinks
names
linksToOtherFiles
TrueBaseServer:
applyPatch
validateSubmission
requestTimes.log
writeIfChanged
method.products/jtree.browser.js
has been removed.get
methods with zero params.Before | After |
---|---|
getParent() | parent |
getContent() | content |
getRootNode() | root |
getAtoms() | atoms |
getFirstAtom() | firstAtom |
titleToPermalink
method from pldbsortFromSortTemplate
method from pldbpatch
method from pldbrename
keywordinitSearch
or listenProd
methods.limit
keywordoneOf
operatortitle
and description
fieldsgithub.stars
has
to hasFirstAtom
and has
now works correctly for deep paths.sortBy
and reverse
keywords.csv
, text
, and scroll
output formats.This releases introduced a new language called Tree Query Language (TQL) for quering TrueBases. This release may have some bugs, you may want to wait before upgrading.
This is a major release that makes the code more modular and eliminates a lot of technical debt. In the past to simplify NodeJs+Browser isomorphism I created the jtree
namespace and bundled everything together. This was a mistake. This release fixes that, and makes each subproject more independent. This should speed up future development.
jtree.getVersion()
with Particle.getVersion()
products/TreeNotationCodeMirrorMode.js
is now products/ParsersCodeMirrorMode.js
jtree.browser.js
is now deprecated. That file will be kept for now (for external links) but will no longer be updated and will be removed in a future version. Include exactly what you need.Before:
<script src="../products/jtree.browser.js"></script>
After: (to get everything that was previously in the bundle)
<script src="../products/Utils.browser.js"></script>
<script src="../products/Particle.browser.js"></script>
<script src="../products/Parsers.ts.browser.js"></script>
<script src="../products/ParsersCodeMirrorMode.browser.js"></script>
jtree
namespace is no more. Include exactly what you need:Before:
const {jtree} = require("jtree")
const tree = new jtree.Particle("hello world")
After:
const {Particle} = require("jtree/products/Particle.js")
const tree = new Particle("hello world")
Utils
as top level exportParticle.fromFolder
methodlist
getter on Grammar backed nodes returns an array of strings split by listDelimiter
. Fallback is same behavior as if
is the listDelimiter.contentDelimiter
is now listDelimiter
uniqueLine
to check for duplicate lines.This is an unstable release. Please wait a few days for bug fix releases before using.
trueBaseServer.node.js
and has been rewrittentrueBaseServer.node.js
TrueBaseBuilder
and rewritten class TrueBaseServer
rank
and webPermalink
abstract
from Grammar Language. Grammar Language is now a suffix AND prefix language. The functionality of abstract node type definitions is identical, but now instead of flagging them with the abstract
keyword, you need to ensure that the node type definition id begins with the atom abstract
. This turned out to be the best design pattern already, so you may already do this, and then the migration step is simpleโjust delete all occurrences of /^ abstract\n/
in your *.grammar
files. In the rare chance you have any nodes that are not abstract whose id's begin with the prefix abstract
, you will need to give those nodes a new id._getDir
(use dir
); removed toProgram; _getGrammarPaths is now grammarFilePathscontentDelimiter
propertysingle
keyword in a parent nodeType now propogates to child nodeTypestree.toDelimited("|", undefined, false)
where
query with notEmpty
operator would failsetStumpNodeCss
setShadowCss
๐งน general refactor to prep for switch to have Grammar entirely written in Grammar
๐งน generally use "products/" folder now to use compiled grammars instead of recompiling everytime
๐งน Performance improvements via caching parsers
๐งน Created TestRacer and moved tests and swarm to that
๐งน builder will now look for compiled builder.js first
๐งน commandLineapp will now will first look for compiled grammar when executing a Tree program
๐งน removed qunit, tap, and tap mocha dependencies
๐งน PCF debugger work
๐งน added swim tests
๐งน moved papers to treenotation/research
๐งน build fixes. No more manually fixing TypeScript build artifacts
๐งน wwt types
๐งน command line app now shows options when invalid command entered
๐งน ParticleComponentFramework work
๐งน builder improvements
๐งน migrated Sandbox and Designer apps to PCF
๐งน refactored build system
๐งน moved Disk to products
๐งน removed tsconfigs
๐งน created products.scroll
๐งน started worldWideTypes folder
๐งน PCF tests now included in npm test
๐งน now run UnknownParsersProgram against all sample grammars
๐งน builder is now compiled into a product
๐งน switched to TypeScript for all JS src files and test files.
๐งน new folders for each product
๐งน "products" folder. Currently checking in compiled versions as this makes distribution simpler. In the future maybe move products to separate repo.
๐งน jBuild
๐งน improved error messaging for invalid nodeType.
๐งน added basic tests for trueBase and made sure particleComponent framework test getting run
๐งน moved repo from breck7/jtree to treenotation/jtree
nodeType person
now do personNode
and instead of atomType int
do intAtom
๐งน upgrade version script
๐งน removed dead code
๐งน compiled grammars are now much less code and rely on native JS class tree
๐งน compiled grammar vs runtime code paths are largely merged
๐งน fixed 2.5x test speed regression and got them back down to 2s
๐งน refactor of Swarm/Stamp/Project/Jibberish/Stump to be 1 file.
๐งน more testing of compiled code
A regex for finding breaks in untyped code:
\b(defaults|getExpectedLineAtomTypes|nodeTypes|isLeafColumn|_getDuplicateLinesMap|_getFirstAtomByIndex|toFlatTree|fromJson|toJson|getExpanded|getCompiledProgramName|getAncestorNodeTypeNamesArray|getCatchAllAtomTypeName|getRequiredAtomTypeNames|getRunTimeNodeTypeNames|getProgramErrorMessages|getFirstAtomType|getProgram|getParsersProgram|getParsedAtoms|getAtomTypeName|getAtomTypeDefinition|getNodeTypeDefinitionByName|getProgramErrors|getCompiledIndentation|getCompiledLine|getCompilerNode|getProgramErrorsIterator)\b
๐งน refactored "types" file into "jTreeTypes"
๐งน removed unneeded npm packages
๐งน fixed TypeScript browser target build issues
๐งน added prettier config to package.json
Use code below to update programs:
swarmProgram.updateNodeTypeIds(`#setup arrange
%%| constructWith
%| blockStringParam
=๐ฆ lengthIs
=+ stringIncludes
=- stringExcludes
== stringIs
=| blockStringIs
=~ typeIs
#test test
+#test testOnly
-#test skipTest`)
def.getId
is now def.getNodeTypeIdFromDefinition
, def.getTopNodeTypes is now def.getTopNodeTypeIds, def.getKeywordDefinitionByName is now def.getNodeTypeDefinitionByName, def.getRunTimeKeywordMap is now def.getRunTimeFirstAtomMap, def.getRunTimeKeywordNames is def.getRunTimeNodeTypeNames, def.getRunTimeKeywordMapWithDefinitions is def.getRunTimeFirstAtomMapWithDefinitions, def.isOrExtendsAKeywordInScope is def.isOrExtendsANodeTypeInScope, def.getKeywordInheritanceSet is def.getNodeTypeInheritanceSet, def.getSyntaxContextId is def.getSublimeSyntaxContextId๐งน repo folder cleanup
.?
should now be .*
๐งน added tap-mocha-reporter for clearer test run output
๐งน minor CLI app refactor
๐งน migrated to TypeScript
๐งน makeRandomParticles method & updates to perf test pages
๐งน Default sandbox port now 3333
getNumberOfLines
method๐งน sandbox cleanup
๐งน renamed "garden" to "sandbox" for clarity
๐งน moved "papers" to one folder
๐งน removed dead code
๐งน renamed TreeGrammar.grammar to grammar.grammar
๐งน removed ohayo constants
๐งน Moved dependencies to devDependencies
๐งน TestCoverage 90.44% Smt 2137/2363 72.32% Brnch 384/531 85.37% Fn 496/581 91.89% Loc 2017/2195
๐งน updated ProjectLang
๐งน rearranged code into base node and grammar backed folders
๐งน started tests for console, static, and grammar classes
๐งน cleanup for making grammar files source of truth
๐งน renamed slot types to columnTypes and better error messaging for when graph expansion fails
๐งน added a tiny bit of documentation to readme
๐งน minor cleanup of cli app
๐งน recursive dependency fix and console code cleanup
๐งน prep work for grammar and blaze library merger -- consoleApp and src directory
๐งน removed outdated ETNs
๐งน switched to Tap from Tape to get code coverage working again with nyc