Skip to content

Commit

Permalink
Fork the library
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Sep 27, 2024
1 parent 9e65900 commit c309676
Show file tree
Hide file tree
Showing 5 changed files with 6,322 additions and 4,404 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI

on:
push:
branches:
- main
- master
pull_request: {}

concurrency:
group: ci-${{ github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm run lint

test:
runs-on: ubuntu-latest
timeout-minutes: 10

strategy:
matrix:
node-version: ['18.x', '20.x', '22.x']

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- run: pnpm i --frozen-lockfile
- run: pnpm test

floating:
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: pnpm
- run: pnpm i --no-lockfile
- run: pnpm test
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# `remove-types`
# `babel-remove-types`

> [!NOTE]
> This is a fork of https://github.com/cafreeman/remove-types. It's not marked as a fork because we want pull requests to target this repo and not "upstream".
A small library for transforming TypeScript code into JavaScript code in the least destructive way possible. This library exports a single function whose purpose is to preserve everything else about the code except for the actual TypeScript syntax itself. As a result, things like decorators and class fields should pass straight through without being transformed in any way.

## Usage

```js
import { removeTypes } from 'remove-types';
import { removeTypes } from 'babel-remove-types';

const original = `
type AnimalType = 'cat' | 'dog';
Expand Down
21 changes: 13 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "remove-types",
"author": "Chris Freeman",
"version": "1.0.0",
"name": "babel-remove-types",
"contributors": [
"Chris Freeman",
"Chris Manson <[email protected]>"
],
"version": "0.0.0",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/cafreeman/remove-types"
"url": "https://github.com/ember-cli/babel-remove-types"
},
"keywords": [
"typescript",
Expand All @@ -28,18 +31,20 @@
"ts:cjs": "tsc -p ts/cjs.tsconfig.json",
"ts:esm": "tsc -p ts/esm.tsconfig.json",
"ts:typedefs": "tsc -p ts/types.tsconfig.json && mv defs/* . && rimraf defs",
"ts:all": "yarn ts:esm && yarn ts:cjs && yarn ts:typedefs",
"build": "yarn clean && yarn ts:all",
"ts:all": "pnpm ts:esm && pnpm ts:cjs && pnpm ts:typedefs",
"build": "pnpm clean && pnpm ts:all",
"clean": "rimraf ./*.d.ts ./*.d.ts.map ./dist",
"lint": "eslint src test",
"prepublishOnly": "yarn test && yarn build",
"postpublish": "yarn clean",
"prepublishOnly": "pnpm test && pnpm build",
"prepare": "pnpm build",
"postpublish": "pnpm clean",
"release": "release-it",
"test": "jest",
"test:watch": "jest --watch"
},
"devDependencies": {
"@types/babel__core": "^7.1.18",
"@types/babel__traverse": "^7.20.6",
"@types/jest": "^27.4.0",
"@typescript-eslint/eslint-plugin": "^5.10.0",
"@typescript-eslint/parser": "^5.10.0",
Expand Down
Loading

0 comments on commit c309676

Please sign in to comment.