Skip to content

Commit

Permalink
Merge pull request #884 from neon-bindings/kv/re-org
Browse files Browse the repository at this point in the history
Re-organize the Neon directory structure a bit
  • Loading branch information
kjvalencik authored Apr 26, 2022
2 parents db080d2 + 53914f2 commit 09c04b3
Show file tree
Hide file tree
Showing 86 changed files with 1,430 additions and 1,453 deletions.
2 changes: 1 addition & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
neon-check = " check --all --all-targets --features napi-experimental"
neon-clippy = "clippy --all --all-targets --features napi-experimental -- -A clippy::missing_safety_doc"
neon-test = " test --all --features=napi-experimental"
neon-doc = " rustdoc --features=napi-experimental -- --cfg docsrs"
neon-doc = " rustdoc -p neon --features=napi-experimental -- --cfg docsrs"
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Cargo.lock
**/index.node
**/artifacts.json
cli/lib
create-neon/dist
create-neon/create-neon-test-project
create-neon/create-neon-manual-test-project
**/dist
pkgs/create-neon/create-neon-test-project
pkgs/create-neon/create-neon-manual-test-project
test/cli/lib
npm-debug.log
rls*.log
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
cli/lib/
test/cli/lib/
node_modules/
create-neon/dist/
**/dist/
target/
artifacts.json
70 changes: 2 additions & 68 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,71 +1,5 @@
[package]
name = "neon"
version = "0.10.0"
authors = ["Dave Herman <david.herman@gmail.com>"]
description = "A safe abstraction layer for Node.js."
readme = "README.md"
homepage = "https://www.neon-bindings.com"
repository = "https://github.com/neon-bindings/neon"
license = "MIT/Apache-2.0"
exclude = ["neon.jpg", "doc/**/*"]
build = "build.rs"
edition = "2018"

[dev-dependencies]
nodejs-sys = "0.13.0"
semver = "0.9"
psd = "0.1.9" # used for a doc example
failure = "0.1.5" # used for a doc example

[dependencies]
libloading = "0.7.3"
semver = "0.9.0"
smallvec = "1.4.2"
neon-macros = { version = "=0.10.0", path = "crates/neon-macros" }

[features]
default = ["napi-1"]

# Default N-API version. Prefer to select a minimum required version.
# DEPRECATED: This is an alias that should be removed
napi-runtime = ["napi-8"]

# Select the N-API version
# Feature flags to enable the experimental N-API runtime. For now, this feature
# is disabled by default.
# The Node N-API documentation specifies N-API and Node version requirements
# https://nodejs.org/api/n-api.html
napi-1 = []
napi-2 = ["napi-1"]
napi-3 = ["napi-2"]
napi-4 = ["napi-3"]
napi-5 = ["napi-4"]
napi-6 = ["napi-5"]
napi-7 = ["napi-6"]
napi-8 = ["napi-7"]
napi-latest = ["napi-8"]
napi-experimental = ["napi-8"]

# DEPRECATED: These perform no action and will be removed in 1.0
try-catch-api = []
channel-api = []
event-queue-api = []
promise-api = []
task-api = []

# Feature flag to include procedural macros
# DEPRECATED: This is always enabled and should be removed.
proc-macros = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
features = [
"napi-experimental",
]

[workspace]
members = [
"crates/neon-macros",
"test/electron",
"test/napi"
"crates/*",
"test/*",
]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# <img src="neon.png" alt="neon" width="100%" />
# <img src="doc/neon.png" alt="neon" width="100%" />

[![Cargo](https://img.shields.io/crates/v/neon.svg)](https://crates.io/crates/neon)
[![npm](https://img.shields.io/npm/v/neon-cli.svg)](https://www.npmjs.com/package/neon-cli)
Expand Down Expand Up @@ -29,7 +29,8 @@ our [API docs](https://docs.rs/neon/latest/neon).

The latest version of Neon, 0.10, includes a few small breaking changes in order to clean up and improve the usability of our APIs.

**Read the new [migration guide](https://github.com/neon-bindings/neon/blob/main/MIGRATION_GUIDE_0.10.md)** to learn how to port your Neon projects to 0.10!
**Read the new [migration guide](https://github.com/neon-bindings/neon/blob/main/docs/MIGRATION_GUIDE_0.10.md)** to learn how to port your
Neon projects to 0.10!

## Platform Support

Expand Down
2 changes: 1 addition & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Version 0.10

See the [Neon 0.10 Migration Guide](MIGRATION_GUIDE_0.10.md) for more details about new features and breaking changes.
See the [Neon 0.10 Migration Guide](docs/MIGRATION_GUIDE_0.10.md) for more details about new features and breaking changes.

## Features

Expand Down
7 changes: 0 additions & 7 deletions build.rs

This file was deleted.

63 changes: 63 additions & 0 deletions crates/neon/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[package]
name = "neon"
version = "0.10.0"
authors = ["Dave Herman <david.herman@gmail.com>"]
description = "A safe abstraction layer for Node.js."
readme = "README.md"
homepage = "https://www.neon-bindings.com"
repository = "https://github.com/neon-bindings/neon"
license = "MIT/Apache-2.0"
exclude = ["neon.jpg", "doc/**/*"]
edition = "2018"

[dev-dependencies]
nodejs-sys = "0.13.0"
semver = "0.9"
psd = "0.1.9" # used for a doc example
failure = "0.1.5" # used for a doc example

[dependencies]
libloading = "0.7.3"
semver = "0.9.0"
smallvec = "1.4.2"
neon-macros = { version = "=0.10.0", path = "../neon-macros" }

[features]
default = ["napi-1"]

# Default N-API version. Prefer to select a minimum required version.
# DEPRECATED: This is an alias that should be removed
napi-runtime = ["napi-8"]

# Select the N-API version
# Feature flags to enable the experimental N-API runtime. For now, this feature
# is disabled by default.
# The Node N-API documentation specifies N-API and Node version requirements
# https://nodejs.org/api/n-api.html
napi-1 = []
napi-2 = ["napi-1"]
napi-3 = ["napi-2"]
napi-4 = ["napi-3"]
napi-5 = ["napi-4"]
napi-6 = ["napi-5"]
napi-7 = ["napi-6"]
napi-8 = ["napi-7"]
napi-latest = ["napi-8"]
napi-experimental = ["napi-8"]

# DEPRECATED: These perform no action and will be removed in 1.0
try-catch-api = []
channel-api = []
event-queue-api = []
promise-api = []
task-api = []

# Feature flag to include procedural macros
# DEPRECATED: This is always enabled and should be removed.
proc-macros = []

[package.metadata.docs.rs]
rustdoc-args = ["--cfg", "docsrs"]
features = [
"napi-experimental",
]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 0 additions & 10 deletions src/meta.rs → crates/neon/src/meta.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,3 @@ pub fn version() -> Version {
build: vec![],
}
}

// We captured the build profile from build.rs and saved it in the cfg variable `neon_profile`.

/// The current build profile (either `"release"` or `"debug"`).
#[cfg(neon_profile = "release")]
pub const BUILD_PROFILE: &str = "release";

/// The current build profile (either `"release"` or `"debug"`).
#[cfg(not(neon_profile = "release"))]
pub const BUILD_PROFILE: &str = "debug";
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
Loading

0 comments on commit 09c04b3

Please sign in to comment.