Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: update amaro to 0.3.2 #56916

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions deps/amaro/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/amaro/dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"강동윤 <kdy1997.dev@gmail.com>"
],
"description": "wasm module for swc",
"version": "1.10.11",
"version": "1.10.14",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion deps/amaro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amaro",
"version": "0.3.1",
"version": "0.3.2",
"description": "Node.js TypeScript wrapper",
"license": "MIT",
"type": "commonjs",
Expand Down
45 changes: 34 additions & 11 deletions doc/api/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ added: v22.6.0

> Stability: 1.1 - Active development

The flag [`--no-experimental-strip-types`][] prevents Node.js from running TypeScript
files. By default Node.js will execute only files that contain no
TypeScript features that require transformation, such as enums or namespaces.
Node.js will replace inline type annotations with whitespace,
By default Node.js will execute TypeScript files that contains only
erasable TypeScript syntax.
Node.js will replace TypeScript syntax with whitespace,
and no type checking is performed.
To enable the transformation of such features
use the flag [`--experimental-transform-types`][].
TypeScript features that depend on settings within `tsconfig.json`,
To enable the transformation of non erasable TypeScript syntax, which requires JavaScript code generation,
such as `enum` declarations, parameter properties use the flag [`--experimental-transform-types`][].
To disable this feature, use the flag [`--no-experimental-strip-types`][].

Node.js ignores `tsconfig.json` files and therefore
features that depend on settings within `tsconfig.json`,
such as paths or converting newer JavaScript syntax to older standards, are
intentionally unsupported. To get full TypeScript support, see [Full TypeScript support][].

Expand All @@ -71,7 +73,7 @@ By intentionally not supporting syntaxes that require JavaScript code
generation, and by replacing inline types with whitespace, Node.js can run
TypeScript code without the need for source maps.

Type stripping works with most versions of TypeScript
Type stripping is compatible with most versions of TypeScript
but we recommend version 5.7 or newer with the following `tsconfig.json` settings:

```json
Expand Down Expand Up @@ -119,10 +121,30 @@ unless the flag [`--experimental-transform-types`][] is passed.

The most prominent features that require transformation are:

* `Enum`
* `namespaces`
* `legacy module`
* `Enum` declarations
* `namespace` with runtime code
* legacy `module` with runtime code
* parameter properties
* import aliases

`namespaces` and `module` that do not contain runtime code are supported.
This example will work correctly:

```ts
// This namespace is exporting a type
namespace TypeOnly {
export type A = string;
}
```

This will result in [`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`][] error:

```ts
// This namespace is exporting a value
namespace A {
export let x = 1
}
```

Since Decorators are currently a [TC39 Stage 3 proposal](https://github.com/tc39/proposal-decorators)
and will soon be supported by the JavaScript engine,
Expand Down Expand Up @@ -186,6 +208,7 @@ with `#`.
[Full TypeScript support]: #full-typescript-support
[`--experimental-transform-types`]: cli.md#--experimental-transform-types
[`--no-experimental-strip-types`]: cli.md#--no-experimental-strip-types
[`ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX`]: errors.md#err_unsupported_typescript_syntax
[`tsconfig` "paths"]: https://www.typescriptlang.org/tsconfig/#paths
[`tsx`]: https://tsx.is/
[`verbatimModuleSyntax`]: https://www.typescriptlang.org/tsconfig/#verbatimModuleSyntax
Expand Down
2 changes: 1 addition & 1 deletion src/amaro_version.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
// Refer to tools/dep_updaters/update-amaro.sh
#ifndef SRC_AMARO_VERSION_H_
#define SRC_AMARO_VERSION_H_
#define AMARO_VERSION "0.3.1"
#define AMARO_VERSION "0.3.2"
#endif // SRC_AMARO_VERSION_H_
Loading