Here's a list of the notable changes in the Scroll SDK.
asSExpression
getterkeywordAtom
is now cueAtom
bitsRequired
methodparseCode
method.parsers.parsers
for latest scrollparsers.parsers
to clean up namespace for usersparsers.parsers
have been renamedparserIdIndex
usesParser
now recursescue
setterusesParser
methodfirstAtom
is now called cue
everywherecrux
, a "temporary" word that lasted many years, is now "cue"getIndex()
is now just index
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
.cuePathAsColumnName
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:
loop
TrueBaseFile:
loop
TrueBaseServer:
loop
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 integerAtom
🧹 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