strict-script strict-script

The project

Contributing

corepack enable && pnpm install
pnpm lint && pnpm build && pnpm test && pnpm check

pnpm check runs strict-ts on the compiler and on the command line, with no baseline, as the CI does. The runtime library is not under it: it is where exceptions are caught and values of unknown type are read, and it is tested. Build before testing: the tests of the command line run the built packages.

Node ≥ 22.13. The work (backlog, milestones), the decisions and one RFC page per design are in Plane, project SSC; this repository holds the code, its documentation, the pull requests and the CI. One task is one branch and one pull request into main; commits say Refs SSC-n, or Closes SSC-n when the task is done.

#A change to the language

  • It starts with a short RFC: what it guarantees, one refused example and its fix, what it costs to write measured on the examples, what correct code it refuses.
  • docs/language.md is changed in the same pull request as the code it describes.
  • A step that is not sure refuses the program. What is taken on trust is written where it is taken, and in Known limits.
  • The compiler imports nothing from Node and nothing from the TypeScript compiler. No rule of the language goes into an adapter: the command line, the playground, the editor.

#The parts written in strict-script

packages/self/src holds the parts of the compiler that are written in the language, and packages/self/lib what the compiler wrote for them. lib/ is kept in the repository, since the compiler needs it to be built. After a change to src/, or to what the compiler writes:

pnpm build && pnpm self && pnpm build

A test fails when the two differ.

#The website and the editor extension

pnpm build && pnpm site            # packages/site/dist/: the front page, the documents, the playground
pnpm vscode                        # packages/vscode/dist/strict-script.vsix

The website is built and shown again at each push to main: the playground of the site has the compiler of that commit inside.

#Releasing

Nothing is released, and nothing is published without a word from Alex. pnpm run pack writes the packages as files under tarballs/ for another project to install.

Esc

    Type a word of the language, a rule, a command: mut, extern, match-not-covered.