GeezerVison is showing github.com — module: add --experimental-strip-types · nodejs/node@92439fc
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/tools.yml +9Lines changed: 9 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | - acorn | 17 | 17 | - acorn-walk | 18 | 18 | - ada | | 19 | + - amaro | 19 | 20 | - brotli | 20 | 21 | - c-ares | 21 | 22 | - cjs-module-lexer | | 82 | 83 | cat temp-output | 83 | 84 | tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true | 84 | 85 | rm temp-output | | 86 | + - id: amaro | | 87 | + subsystem: deps | | 88 | + label: dependencies | | 89 | + run: | | | 90 | + ./tools/dep_updaters/update-amaro.sh > temp-output | | 91 | + cat temp-output | | 92 | + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true | | 93 | + rm temp-output | 85 | 94 | - id: brotli | 86 | 95 | subsystem: deps | 87 | 96 | label: dependencies | |
Collapse file Copy file name to clipboardExpand all lines: LICENSE +25Lines changed: 25 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -130,6 +130,31 @@ The externally maintained libraries used by Node.js are: | 130 | 130 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 131 | 131 | """ | 132 | 132 |
| | 133 | +- amaro, located at deps/amaro, is licensed as follows: | | 134 | + """ | | 135 | + MIT License | | 136 | + | | 137 | + Copyright (c) Marco Ippolito and Amaro contributors | | 138 | + | | 139 | + Permission is hereby granted, free of charge, to any person obtaining a copy | | 140 | + of this software and associated documentation files (the "Software"), to deal | | 141 | + in the Software without restriction, including without limitation the rights | | 142 | + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | | 143 | + copies of the Software, and to permit persons to whom the Software is | | 144 | + furnished to do so, subject to the following conditions: | | 145 | + | | 146 | + The above copyright notice and this permission notice shall be included in all | | 147 | + copies or substantial portions of the Software. | | 148 | + | | 149 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | 150 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | 151 | + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | 152 | + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | 153 | + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | | 154 | + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | | 155 | + SOFTWARE. | | 156 | + """ | | 157 | + | 133 | 158 | - ICU, located at deps/icu-small, is licensed as follows: | 134 | 159 | """ | 135 | 160 | UNICODE LICENSE V3 | |
Collapse file Copy file name to clipboard +21Lines changed: 21 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +MIT License | | 2 | + | | 3 | +Copyright (c) Marco Ippolito and Amaro contributors | | 4 | + | | 5 | +Permission is hereby granted, free of charge, to any person obtaining a copy | | 6 | +of this software and associated documentation files (the "Software"), to deal | | 7 | +in the Software without restriction, including without limitation the rights | | 8 | +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | | 9 | +copies of the Software, and to permit persons to whom the Software is | | 10 | +furnished to do so, subject to the following conditions: | | 11 | + | | 12 | +The above copyright notice and this permission notice shall be included in all | | 13 | +copies or substantial portions of the Software. | | 14 | + | | 15 | +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | | 16 | +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | | 17 | +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | | 18 | +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | | 19 | +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | | 20 | +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | | 21 | +SOFTWARE. |
Collapse file Copy file name to clipboard +30Lines changed: 30 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
| | 1 | +# Amaro | | 2 | + | | 3 | +Amaro is a wrapper around `@swc/wasm-typescript`, a WebAssembly port of the SWC TypeScript parser. | | 4 | +It's currently used as an internal in Node.js for [Type Stripping](https://github.com/nodejs/loaders/issues/208), but in the future it will be possible to be upgraded separately by users. | | 5 | +The main goal of this package is to provide a stable API for TypeScript parser, which is unstable and subject to change. | | 6 | + | | 7 | +> Amaro means "bitter" in Italian. It's a reference to [Mount Amaro](https://en.wikipedia.org/wiki/Monte_Amaro_(Abruzzo)) on whose slopes this package was conceived. | | 8 | +
| | 9 | +## How to Install | | 10 | + | | 11 | +To install Amaro, run: | | 12 | + | | 13 | +```shell | | 14 | +npm install amaro | | 15 | +``` | | 16 | + | | 17 | +## How to Use | | 18 | + | | 19 | +By default Amaro exports a `transformSync` function that performs type stripping. | | 20 | +Stack traces are preserved, by replacing removed types with white spaces. | | 21 | + | | 22 | +```javascript | | 23 | +const amaro = require('amaro'); | | 24 | +const { code } = amaro.transformSync("const foo: string = 'bar';"); | | 25 | +console.log(code); // "const foo = 'bar';" | | 26 | +``` | | 27 | + | | 28 | +## License (MIT) | | 29 | + | | 30 | +See [`LICENSE.md`](./LICENSE.md). |
|