GithubHelp home page GithubHelp logo

isabella232 / ts Goto Github PK

View Code? Open in Web Editor NEW

This project forked from widgetworks/ts

0.0 0.0 0.0 47.79 MB

Monorepo of assorted typescript projects

License: Apache License 2.0

JavaScript 8.37% TypeScript 91.15% Shell 0.48%

ts's Introduction

ts

Node CI codecov

Monorepo of typescript projects.

Packages

  • eslint-plugin-codegen - An eslint plugin for inline codegen, with presets for barrels, jsdoc to markdown and a monorepo workspace table of contents generator. Auto-fixes out of sync code.
  • expect-type - Compile-time tests for types. Useful to make sure types don't regress into being overly-permissive as changes go in over time.
  • fs-syncer - A helper to recursively read and write text files to a specified directory.
  • io-ts-extra - Adds pattern matching, optional properties, and several other helpers and types, to io-ts.
  • memorable-moniker - Name generator with some in-built dictionaries and presets.

Development

Packages are managed using rush. Make sure rush is installed:

npm install --global @microsoft/rush

Then install, build, lint and test with:

rush update
rush build
rush lint
rush test

rush update should be run when updating the main branch too.


Add a dependency to a package (for example, adding lodash to fictional package in this monorepo some-pkg):

cd packages/some-pkg
rush add --package lodash
rush add --package @types/lodash --dev

You can also manually edit package.json then run rush update.

Create a new package:

cd packages
mkdir new-pkg
cd new-pkg
node ../../tools/rig/init # sets up package.json, .eslintrc.js, tsconfig.json, jest.config.js

Then open rush.json, find the projects array, and adda new entry: { "packageName": "new-pkg", "projectFolder": "packages/new-pkg" }

Publishing

publish

Publishing is automated, but kicked off manually. The process is:

  • Changes to published packages in this repo should be proposed in a pull request
  • On every pull request, a GitHub action uses the rush change command to create a changefile:
    • the change is based on the PR title and body:
      • if the words "BREAKING CHANGE" appear anywhere, it's considered "major"
      • if the PR title starts with "chore", or "fix", it's considered a "patch"
      • otherwise, it's considered "minor"
    • the created changefile is pushed to the PR's branch, and a comment is left on the PR (example PR, comment and change)
    • if the PR title or body is edited, or changes are pushed, the job will re-run and push a modification if necessary
    • most of the time, no change is necessary and the job exits after no-oping
    • if necessary, rush change can also be run locally to add additional messages - but ideally the PR title would be descriptive enough
    • the changefile should be merged in along with the rest of the changes

When a PR is merged, publishing is initiated by kicking off the publish worfklow:

  • Clicking "Run workflow" will start another GitHub action:
    • The workflow runs rush publish, which uses the changefiles merged with feature PRs, bumps versions and create git tags
    • When the publish step succeeds, a custom script reads the generated CHANGELOG.json files to create a GitHub release
Old instructions

Links to trees with previous iteration of publish instructions:

ts's People

Contributors

dependabot[bot] avatar mmkal avatar renovate[bot] avatar yenbekbay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.