Tony Garnock-Jones
075893fc85
TypeScript has been moving on while the plugin has been staying still, and that has caused the plugin to stop working well. This patch gets things back into somewhat workable state, but I'm sure more will be required. Changes include: - `hookHost` is no longer required: instead, we hook ts.createSourceFile. - `shouldExpand` abstracts away details of whether a file is considered Syndicateish or not. - The code that does the Syndicate expansion has been abstracted out of the detail of how expansion is invoked by the language server. - I've had to monkey-patch ScriptInfo in order to get access to the `editContent` method. - As a consequence, at plugin startup, we invalidate existing ScriptInfo instances so they are rebuilt with our SyndicateScriptInfo constructor. |
||
---|---|---|
examples | ||
git-hooks | ||
packages | ||
todo | ||
.gitignore | ||
.npmignore | ||
LICENCE | ||
Makefile | ||
README.md | ||
TODO.md | ||
lerna.json | ||
package.json | ||
rollup.js | ||
setup.sh | ||
watchall | ||
yarn.lock |
README.md
Syndicate/js
A fourth-generation implementation of Dataspaces and Syndicate for TypeScript and JavaScript, in both node.js and the browser. The implementation techniques herein are the subject of a forthcoming paper.
Branches
The main
branch is where active development happens:
git clone -b main https://git.syndicate-lang.org/syndicate-lang/syndicate-js
An earlier TypeScript+JavaScript implementation from early 2021 (the
primary difference to main
being a lack of object-capability
support) can be found on the typescript1
branch:
git clone -b typescript1 https://git.syndicate-lang.org/syndicate-lang/syndicate-js
Finally, the babel-based
branch is from 2018, and is an
implementation for JavaScript only. It extends babel with new syntax
and new plugins, (rather than implementing its own error-tolerant
parser, like typescript1
and main
):
git clone -b babel-based https://git.syndicate-lang.org/syndicate-lang/syndicate-js
Building
These instructions are for the main
branch.
This project uses yarn
, not npm
.
The repository is a monorepo, using yarn workspaces. Lerna is used as a thin veneer atop yarn workspaces, providing convenient automation for package version management and publication.
After a checkout, run:
make bootstrap
Alternatively, running:
yarn install
./node_modules/.bin/lerna exec yarn prepare
will download and install all dependencies and then build all the packages.
Licence
@syndicate-lang, an implementation of Syndicate for TypeScript and JavaScript.
Copyright (C) 2016-2021 Tony Garnock-Jones tonyg@leastfixedpoint.com
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.