-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
match TypeScript and Rust API namespaces (#475)
- Loading branch information
1 parent
8ce1404
commit 0cdfe86
Showing
19 changed files
with
84 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"changelog": minor | ||
--- | ||
|
||
match TypeScript and Rust API namespaces |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[build] | ||
# The monorepo Cargo workspace builds to `$REPO_ROOT/target` by default. | ||
# However, it uses different settings than the one NAPI sets during the build for this crate. | ||
# Let's use a separate target-dir "$THIS_CRATE/target" to avoid invalidating the workspace-level cache. | ||
target-dir = "./target" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# NAPI generated binaries: | ||
# Unfortunately they need to be copied to each individual sub-package directory for execution or publishing. | ||
# Lets hide all of them. | ||
*.node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,20 @@ | |
"email": "[email protected]" | ||
} | ||
], | ||
"main": "src/generated/index.js", | ||
"types": "src/generated/index.d.ts", | ||
"files": [ | ||
"src/generated/index.d.ts", | ||
"src/generated/index.js", | ||
"src/**/*.d.ts", | ||
"src/**/*.js", | ||
"CHANGELOG.md", | ||
"LICENSE", | ||
"README.md" | ||
], | ||
"__exports_comment__": "__SLANG_PUBLIC_API_SYNC__ (please keep in sync across all other instances)", | ||
"exports": { | ||
".": "./src/index.js", | ||
"./syntax": "./src/syntax/index.js", | ||
"./syntax/nodes": "./src/syntax/nodes/index.js", | ||
"./syntax/parser": "./src/syntax/parser/index.js" | ||
}, | ||
"devDependencies": { | ||
"@napi-rs/cli": "2.15.2", | ||
"prettier": "2.8.6" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* __SLANG_PUBLIC_API_SYNC__ (please keep in sync across all other instances) | ||
*/ | ||
|
||
export { Language } from "./generated"; | ||
|
||
export * as syntax from "./syntax"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/* | ||
* __SLANG_PUBLIC_API_SYNC__ (please keep in sync across all other instances) | ||
*/ | ||
|
||
export * as nodes from "./nodes"; | ||
export * as parser from "./parser"; |
5 changes: 5 additions & 0 deletions
5
crates/solidity/outputs/npm/package/src/syntax/nodes/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
* __SLANG_PUBLIC_API_SYNC__ (please keep in sync across all other instances) | ||
*/ | ||
|
||
export { NodeType, RuleKind, RuleNode, TokenNode, TokenKind } from "../../generated"; |
5 changes: 5 additions & 0 deletions
5
crates/solidity/outputs/npm/package/src/syntax/parser/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
* __SLANG_PUBLIC_API_SYNC__ (please keep in sync across all other instances) | ||
*/ | ||
|
||
export { ParseError, ParseOutput, ProductionKind } from "../../generated"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
source "$(dirname "${BASH_SOURCE[0]}")/../_common.sh" | ||
|
||
# _CARGO_CLI_ENV_VARS_ (keep In Sync) | ||
export CARGO="${REPO_ROOT}/bin/cargo" | ||
export RUSTC="${REPO_ROOT}/bin/rustc" | ||
export RUSTFMT="${REPO_ROOT}/bin/rustfmt" | ||
export RUSTUP="${REPO_ROOT}/bin/rustup" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters