Skip to content

merge #1

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

Open
wants to merge 238 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
238 commits
Select commit Hold shift + click to select a range
808f63f
Bump http-cache-semantics from 4.1.0 to 4.1.1
dependabot[bot] Feb 3, 2023
641b4d2
Lifecycle supports 32-bit architectures
staltz Mar 21, 2023
3e83d73
Merge pull request #977 from staltz/support-32-archs
kjvalencik Mar 23, 2023
738bbad
feat(neon): sys feature to give access to Node-API
kjvalencik Feb 27, 2023
4ff5555
Merge pull request #970 from neon-bindings/kv/sys
kjvalencik Apr 14, 2023
a02b1bc
Bump tokio from 1.23.1 to 1.24.2
dependabot[bot] Apr 14, 2023
d81940c
Merge pull request #962 from neon-bindings/dependabot/cargo/tokio-1.24.2
kjvalencik Apr 14, 2023
a4c17d8
Merge pull request #961 from neon-bindings/dependabot/npm_and_yarn/ht…
kjvalencik Apr 14, 2023
36a57a3
Relax Send constraints
kjvalencik Apr 14, 2023
a40c012
Merge pull request #979 from neon-bindings/kv/unnecessary-send
kjvalencik Apr 14, 2023
35721ea
1.0.0-alpha.3
kjvalencik Apr 14, 2023
421a151
Merge pull request #984 from neon-bindings/kv/1.0.0-alpha.3
kjvalencik Apr 14, 2023
32802cc
Add missing release information
kjvalencik Apr 14, 2023
5854a5f
1.0.0-alpha.4
kjvalencik Apr 14, 2023
69e70ef
Merge pull request #985 from neon-bindings/kv/v1.0.0-alpha.4
kjvalencik Apr 14, 2023
452d761
Step 1: rename global() to global_object()
dherman May 26, 2023
3169add
Step 2: Add `cx.global::<JsFunction>("Array")` convenience shorthand
dherman May 26, 2023
1072e05
Step 3: API docs
dherman May 27, 2023
8efd149
`JsArray::new()` takes a usize
dherman May 27, 2023
9a2e548
remove JsFunction type parameter
dherman May 28, 2023
b376826
add unit tests to demonstrate safety with non-objects and exotic objects
dherman May 28, 2023
5f629b9
Merge pull request #987 from neon-bindings/global_object
dherman Jun 2, 2023
dd534ac
Merge pull request #988 from neon-bindings/array-new-usize
dherman Jun 2, 2023
f0f35bc
Merge branch 'main' into monomorphize-jsfunction
dherman Jun 2, 2023
929d6e5
rustfmt
dherman Jun 2, 2023
334c000
clippy
dherman Jun 2, 2023
9519abd
prettier
dherman Jun 2, 2023
4c2e455
Merge pull request #989 from neon-bindings/monomorphize-jsfunction
dherman Jun 2, 2023
c093512
Fix typo
erics118 Aug 19, 2023
910a548
Merge pull request #998 from erics118/fix-typo
kjvalencik Aug 19, 2023
cd740c9
Clippy fixes
kjvalencik Nov 17, 2023
f8cedab
Avoid leaving a dangling future when handling a rejection in JsPromis…
kjvalencik Nov 27, 2023
a6b4d13
Merge pull request #1008 from neon-bindings/kv/to-future-fix
kjvalencik Nov 27, 2023
5d12516
Update all dependencies, Rust edition, and support matrix.
kjvalencik Dec 1, 2023
3886df4
Merge pull request #1010 from neon-bindings/kv/dep-update
kjvalencik Dec 1, 2023
36076d9
Update README.md
xyloflake Dec 2, 2023
c281ffe
Merge pull request #1012 from xyloflake/patch-1
kjvalencik Dec 2, 2023
625aab0
Release 1.0.0
kjvalencik Dec 1, 2023
f2ad8fd
Make Node-API 8 the default
kjvalencik Dec 4, 2023
3936828
Merge pull request #1011 from neon-bindings/kv/1.0
kjvalencik Dec 8, 2023
5ed5689
create-neon 0.3: Create Neon 1.0 project with default feature flags
kjvalencik Dec 8, 2023
09fce79
Merge pull request #1013 from neon-bindings/kv/remove-version-check
kjvalencik Dec 8, 2023
d87eaf3
Bump shlex from 1.2.0 to 1.3.0
dependabot[bot] Jan 22, 2024
d6db6ed
Merge pull request #1016 from neon-bindings/dependabot/cargo/shlex-1.3.0
kjvalencik Jan 22, 2024
5d998c3
README fixes
kjvalencik Feb 12, 2024
c7d2989
Merge pull request #1018 from neon-bindings/kv/docs-fixes
kjvalencik Feb 12, 2024
98cb775
Remove link to deprecated NPM package
kjvalencik Feb 12, 2024
50c74c0
Merge pull request #1019 from neon-bindings/kv/remove-npm-links
kjvalencik Feb 12, 2024
db4d354
feat(neon): Extractors
kjvalencik Feb 23, 2024
2b6476b
Use tsconfig/node18 as base TS config
Dec 2, 2023
6633fb5
generate more modern ES, which unfortunately means we can't as easy i…
Dec 9, 2023
f3be15e
consolidate Versions type handling
Dec 9, 2023
d79a4a6
get the tests passing again with modern TS and modern node versions
Dec 9, 2023
aa6ce0f
single quotes for imports
Dec 9, 2023
bdf24a9
simplify unnecessary type test that I added during debugging
Dec 9, 2023
827016b
add top-level comment explaining the versions.ts wrapper module
Dec 9, 2023
7804e07
WIP
dherman Jan 7, 2024
23585f1
rename "release" to "remote-publish" to avoid ambiguity with GitHub R…
dherman Jan 8, 2024
3555443
Initial version of `npm init neon --lib`
dherman Feb 26, 2024
a2ce7a5
First working draft of build automation for libraries!
dherman Mar 27, 2024
7460c7c
move hbs delegate into GitHub CI plugin
dherman Mar 27, 2024
00394f8
update versions
dherman Mar 27, 2024
88e8bb7
npm run prettier
dherman Mar 27, 2024
74fe46a
bugfix: PackageSpec needs version (default is "0.1.0") and manifest t…
dherman Mar 28, 2024
2a68374
add a newline to the manifest
dherman Mar 28, 2024
e54a1de
diagnostics
dherman Mar 28, 2024
4b301e3
build fix
dherman Mar 28, 2024
1b28463
PR review follow-up
kjvalencik Apr 1, 2024
2e0a0f1
Merge pull request #1024 from neon-bindings/kv/extract
kjvalencik Apr 2, 2024
bca9364
chore(tests): Ignore clippy lint in complex type
kjvalencik Apr 2, 2024
126d919
feat(neon): Add `JsFunction::with_name` to create a function with a s…
kjvalencik Apr 2, 2024
46905cd
feat(neon): Add TryIntoJs trait
kjvalencik Apr 2, 2024
50705bd
fix(neon-macros): Use linkme to register main function instead of gen…
kjvalencik Apr 2, 2024
f6b1218
feat(neon-macros): Export const and static
kjvalencik Apr 2, 2024
167b9d6
feat(neon-macros): Export functions
kjvalencik Apr 2, 2024
fdd31f1
chore(neon): Move neon-macros docs to re-exports and remove ignore
kjvalencik Apr 2, 2024
9e38acd
chore(neon): Add tests for neon::export
kjvalencik Apr 3, 2024
d995950
export * from './index.cts'
dherman Apr 7, 2024
b2e0535
better ways to extract node and rust versions
dherman Apr 7, 2024
86cfc2f
bugfix: steps.build.outputs.filename => steps.pack.outputs.filename
dherman Apr 7, 2024
4741f2a
Update pkgs/create-neon/data/templates/ci/github/build.yml.hbs
dherman Apr 7, 2024
cda4804
bugfix: packageSpec.library not package.library
dherman Apr 7, 2024
86c7daa
node 20.x
dherman Apr 14, 2024
e965176
remove .npmignore since it's only for libraries, which already use `"…
dherman Apr 14, 2024
24e8898
complete the node v20 changes
dherman Apr 14, 2024
a36e170
generate the right README details for the more nested repo layout of …
dherman Apr 14, 2024
66148cf
fix the conditional logic for the directory layout in README
dherman Apr 14, 2024
d27655d
create-neon now generates the nested directory structure for TS libra…
dherman Apr 14, 2024
c8b804e
command-line option documentation in the main README
dherman Apr 14, 2024
4bbafb2
tee all the GITHUB_OUTPUT for simple diagnostics
dherman Apr 14, 2024
4ec45b3
no default since it's required
dherman Apr 14, 2024
eb6ac15
a few more GHA details:
dherman Apr 15, 2024
d3aa32c
replace the magic comments with a magic label
dherman Apr 15, 2024
8de9b14
remove comments.yml.hbs from templates
dherman Apr 15, 2024
1150668
comment copy-edits
dherman Apr 15, 2024
36a002f
eliminate two more magic feathers
dherman Apr 15, 2024
e6eef73
slight improvements to the generated index.cts boilerplate:
dherman Apr 15, 2024
970aff8
different hello world for libraries vs simple projects
dherman Apr 15, 2024
8830100
add some explanatory comments to the generated code
dherman Apr 16, 2024
a7168c0
oops, copy-pasta bug
dherman Apr 16, 2024
e2b3792
missed one {{#$}}
dherman Apr 16, 2024
8c59954
id: tag
dherman Apr 16, 2024
8d68793
bugfixes:
dherman Apr 19, 2024
a24ab89
more detailed instructions for setting up npm tokens
dherman Apr 19, 2024
b2c69e0
bump @neon-rs/manifest so saving manifests includes a final newline
dherman Apr 20, 2024
4091edf
use the new more ergonomic CLI syntax
dherman May 6, 2024
895361e
harden the use of third-party GH actions by using explicit SHAs for a…
dherman May 6, 2024
4ecd9b1
explain what "portable library" means in the README
dherman May 6, 2024
9dce892
Fix PR review comments
kjvalencik May 6, 2024
fd212c1
fix failing test for --yes
dherman May 6, 2024
62440e2
Merge pull request #1014 from neon-bindings/create-neon-lib
dherman May 6, 2024
c4a8e9b
[email protected]
dherman May 6, 2024
a328375
fix(cargo-cp-artifact): Hotfix for change in cargo diagnostics naming
kjvalencik May 8, 2024
6c655cf
Remove TryFromJs on Error
kjvalencik May 10, 2024
91427d2
Merge pull request #1039 from neon-bindings/kv/cp-artifact-hotfix
kjvalencik May 10, 2024
84781a5
Bump time in concurrent test
kjvalencik May 10, 2024
f0e8547
Merge pull request #1025 from neon-bindings/kv/export
kjvalencik May 10, 2024
7661e45
require user to specify the Neon project type:
dherman May 12, 2024
ab61472
update README to include the mandatory `--`
dherman May 12, 2024
34159d6
simplify NpmInit logic -- we know the prompt will always be at the en…
dherman May 12, 2024
97e1a5e
bump create-neon version to v0.5
dherman May 12, 2024
662f1e0
prettier
dherman May 12, 2024
928af69
update @neon-rs/manifest to 0.1.0 for https://github.com/neon-binding…
dherman May 12, 2024
78c14ce
remove useless check
dherman May 13, 2024
41b808c
update create-neon to bump the CLI version to 0.1.72.
dherman May 18, 2024
56d07f9
Add `"prepare"` hook for `--app` projects so they'll build on `npm in…
dherman May 19, 2024
6d21027
bump 0.1.72 -> 0.1.73
dherman May 19, 2024
f37c1f9
improvements based on @kjvalencik's review:
dherman May 20, 2024
b57ab4f
Merge pull request #1041 from neon-bindings/create-neon-requires-proj…
dherman May 20, 2024
a07025c
Merge pull request #1044 from neon-bindings/create-neon-bump-cli-0_1_72
dherman May 20, 2024
9556569
lots of little maintainability improvements to create-neon:
dherman May 23, 2024
e38e0d5
expand/ subdirectory:
dherman May 24, 2024
1abeaaf
replace package.ts with a create/ directory:
dherman May 28, 2024
e7aa979
bugfix: forward exit codes and signals from npm init to the main process
dherman May 28, 2024
66f8b1b
prettier
dherman May 28, 2024
64ac403
bugfix: test directory before any interactive console dialog
dherman May 29, 2024
adfca88
remove dead imports
dherman May 29, 2024
3bd98e0
`cargo.escaped.name` instead of `cargoStrings.name` -- it's a little …
dherman May 29, 2024
f2f19d4
Merge pull request #1047 from neon-bindings/create-neon-refactor
dherman Jun 3, 2024
9edc005
bump create-neon to 0.5.1 to publish
dherman Jun 3, 2024
1fcadd0
fix: usage of `deprecated` version of `Node.js`
hamirmahal Jun 27, 2024
5d16c4d
Merge pull request #1053 from hamirmahal/fix/usage-of-actions-that-us…
kjvalencik Jun 27, 2024
6124040
ci(fix): Remove deprecated actions
kjvalencik Jun 28, 2024
5604b8f
Merge pull request #1054 from neon-bindings/kv/ci-fixes
kjvalencik Jul 15, 2024
86a07da
fix(neon): Fix a panic when borrowing an empty buffer or typed array
kjvalencik Jul 17, 2024
70b5a6f
fix(ci): Temporarily remove 20.x from the build matrix to workaround …
kjvalencik Jul 18, 2024
922e93a
Merge pull request #1058 from neon-bindings/kv/borrow-fix
kjvalencik Jul 23, 2024
6994f0c
Remove unused type
kjvalencik Jul 16, 2024
5b6f345
improve(neon): Use autoref specialization for JSON wrapping return va…
kjvalencik Jul 16, 2024
37e43cc
Merge pull request #1057 from neon-bindings/kv/autoref
kjvalencik Jul 23, 2024
b06c56a
Fix clippy lint
kjvalencik May 30, 2024
d282473
Replace all generic contexts with a single Ctx type
kjvalencik May 30, 2024
af6c759
Rename Ctx to Cx and add Deref/DerefMut for coercions
kjvalencik Jun 3, 2024
c000f75
Remove unnecessary AsRef and AsMut
kjvalencik Jun 3, 2024
19143c6
Mark context aliases as `#[doc(hidden)]` and remove all internal refe…
kjvalencik Jul 24, 2024
bdf0183
Add an example of using Cx
kjvalencik Jul 24, 2024
d14c1e1
Add methods to get Cx to ContextInternal
kjvalencik Jul 24, 2024
a4327a0
style: simplify string formatting
hamirmahal Aug 11, 2024
43e0eee
Merge pull request #1060 from hamirmahal/style/simplify-string-format…
kjvalencik Aug 19, 2024
dae95b1
Merge pull request #1048 from neon-bindings/kv/generic-ctx
kjvalencik Aug 28, 2024
f25ef4d
feat(neon): With wrapper for TryIntoJs
kjvalencik Jul 24, 2024
471a70e
Merge pull request #1059 from neon-bindings/kv/with
kjvalencik Aug 28, 2024
5e1b9f8
change(neon): Change TryIntoJs and TryFromJs accept Cx instead of bei…
kjvalencik Aug 28, 2024
88581a0
chore(neon): Convert examples to use Cx
kjvalencik Sep 3, 2024
63551b1
Merge pull request #1062 from neon-bindings/kv/concrete-try-js
kjvalencik Sep 3, 2024
ecfeaee
Add missing easy_cast dep for doc example
akonradi-signal Sep 5, 2024
0cd37f8
Merge pull request #1063 from akonradi-signal/easy-cast
kjvalencik Sep 16, 2024
dbb93bb
feat(neon): Add TryFromJs implementation for Root
kjvalencik Sep 16, 2024
b61c62c
chore(neon): Fix clippy lints
kjvalencik Sep 16, 2024
75d5e00
feat(neon-macros): Allow `Cx` in exported functions
kjvalencik Sep 19, 2024
f6a6e92
feat(neon): Add TryIntoJs implementations for more types
kjvalencik Sep 17, 2024
6b541a2
Merge pull request #1067 from neon-bindings/kv/clippy
kjvalencik Sep 20, 2024
9223337
feat(neon): Add support for async functions in `#[neon::export]`
kjvalencik Sep 5, 2024
df091a2
test(neon): Add new feature flags to the build matrix and unignore th…
kjvalencik Jul 16, 2024
68c48ef
Merge pull request #1055 from neon-bindings/kv/async-runtime
kjvalencik Sep 20, 2024
ffb3f99
Merge pull request #1066 from neon-bindings/kv/extract-types
kjvalencik Sep 20, 2024
2083aed
Merge pull request #1068 from neon-bindings/kv/allow-cx-in-export
kjvalencik Sep 20, 2024
1af433d
chore(neon): Fix doc test
kjvalencik Sep 20, 2024
9d59b71
fix(create-neon): Render diagnostics to stderr in cargo build
kjvalencik Sep 23, 2024
e281554
Merge pull request #1071 from neon-bindings/kv/render-diagnostics
kjvalencik Sep 23, 2024
d421b00
update create-neon lockfile
dherman Sep 23, 2024
3367d20
feat(neon): Add neon::types::extract::Boxed for JsBox conversions
kjvalencik Sep 27, 2024
d7b27ef
feat(neon): `JsFunction::bind()` and `Object::prop()` (#1056)
dherman Oct 1, 2024
7302671
Un-deprecates `JsFunction::{call, exec, construct}` as lower-level pr…
dherman Oct 2, 2024
482293e
Merge pull request #1077 from neon-bindings/undeprecate-call
dherman Oct 3, 2024
205ed38
Merge pull request #1073 from neon-bindings/kv/extract-box
kjvalencik Oct 7, 2024
ffe6ce4
feat(neon-macros): Add `Channel` context for async functions and `thi…
kjvalencik Oct 1, 2024
4c77978
Add comments to .gitignore
kjvalencik Oct 7, 2024
2c8cd15
Merge pull request #1075 from neon-bindings/kv/export-self-types
kjvalencik Oct 7, 2024
3721a24
fix(neon): Require `TryFromJs::Error` to implement `TryIntoJs`
kjvalencik Oct 7, 2024
afac8e1
fix(test-ui): Only run UI tests on stable
kjvalencik Oct 7, 2024
d79788a
Merge pull request #1076 from neon-bindings/kv/try-from-error
kjvalencik Oct 7, 2024
d10fde3
feat(neon): Implement TryIntoJs/TryFromJs for either::Either
kjvalencik Oct 3, 2024
1efcd4e
Merge pull request #1078 from neon-bindings/kv/either
kjvalencik Oct 7, 2024
539e720
chore(neon): Improve ValueInternal safety
kjvalencik Oct 11, 2024
25a00d9
Mechanically transform napi fns to return Result
akonradi-signal Sep 10, 2024
cabacd8
Use Result::unwrap() instead of assert_eq!
akonradi-signal Oct 23, 2024
ad2cb8f
Remove `let () = `
akonradi-signal Sep 17, 2024
ed60c50
Merge pull request #1081 from neon-bindings/kv/value-internal-safety
kjvalencik Oct 25, 2024
7dec390
chore: Update supported Node versions in README
kjvalencik Oct 29, 2024
323450a
Merge pull request #1065 from akonradi-signal/neon-runtime-check-status
dherman Nov 4, 2024
e97df6e
Add support for namespaced (and optionally prefixed) NPM binary packa…
dherman Nov 15, 2024
b73e862
prettier
dherman Nov 15, 2024
34e7bbd
bugfix: askProjectType needs to create an NPM cache correctly
dherman Nov 15, 2024
8fef4fd
prettier
dherman Nov 15, 2024
4dff419
squashing bugs: more clearly distinguish between when we're asking fo…
dherman Nov 16, 2024
8a560ff
prettier
dherman Nov 16, 2024
1f4836c
- bump create-neon version to 0.6.0 (since the public API technically…
dherman Nov 16, 2024
24534d9
prettier
dherman Nov 16, 2024
aa7441e
nit: mark `org` field as optional in typecast
dherman Nov 20, 2024
ac53ea1
good catch by @kjvalencik -- don't recreate `pkg`, it's already there
dherman Nov 20, 2024
7780a2f
Merge pull request #1083 from neon-bindings/create-namespaced-lib
dherman Nov 20, 2024
2388227
chore(neon): fix Clippy lints exposed by #1065
dherman Nov 22, 2024
8125e15
cargo fmt --all
dherman Nov 22, 2024
e41e317
slightly more consistent style
dherman Nov 23, 2024
3031a97
a few subtle logical and style improvements based on @kjvalencik's re…
dherman Nov 25, 2024
4f0adfc
cargo fmt --all
dherman Nov 25, 2024
00c1598
feat(neon-macros): Convert snake_case to camelCase when exporting fun…
kjvalencik Nov 22, 2024
cb8840a
Merge pull request #1084 from neon-bindings/kv/camel-case
kjvalencik Nov 26, 2024
77929a5
debug_assert_eq! on delete_async_work for consistency
dherman Nov 26, 2024
efba683
Merge pull request #1085 from neon-bindings/clippy-fixes-nov-24
dherman Nov 26, 2024
81d0580
feat(neon): Allow getting a `&'cx T` from a `Handle<'cx, JsBox<T>>`
kjvalencik Jan 10, 2025
c0f0442
fix(CI): Allow X server for electron tests
kjvalencik Jan 13, 2025
e996288
Merge pull request #1087 from neon-bindings/kv/jsbox-lifetime
kjvalencik Jan 13, 2025
61d2200
feat(neon): Add extractor for TypedArray
kjvalencik Jan 22, 2025
065ba2d
Merge pull request #1089 from neon-bindings/kv/buf-extractor
kjvalencik Jan 25, 2025
0893806
test(neon): Upload code coverage
kjvalencik Jan 30, 2025
7f4feb1
Merge pull request #1090 from neon-bindings/kv/code-coverage
kjvalencik Jan 31, 2025
0b1c5c8
fix(neon): Relax lifetime constraints on `With` and provide helper fo…
kjvalencik Jan 31, 2025
b1728fa
Type extractors for common container types (#1091)
dherman Feb 3, 2025
c3608d9
Merge pull request #1086 from neon-bindings/kv/with-fix
kjvalencik Feb 21, 2025
2ca578e
Performance regression suite (#1093)
dherman Mar 14, 2025
7f08b76
Bencher integration (#1094)
dherman Mar 24, 2025
7fc09f5
breaking: Remove the `FromArgs` impl on `T: TryFromJs` and add `cx.ar…
kjvalencik Mar 24, 2025
e4b6a01
Enable LTO in the workspace for better benchmarks
kjvalencik Mar 24, 2025
1db1a9a
chore: Allow bencher to comment
kjvalencik Mar 24, 2025
7f22eda
Merge pull request #1096 from neon-bindings/kv/no-args
kjvalencik Apr 21, 2025
12a7954
RC: v1.1.0-alpha.2 (#1100)
dherman May 2, 2025
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
8 changes: 4 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[alias]
# Neon defines mutually exclusive feature flags which prevents using `cargo clippy --all-features`
# The following aliases simplify linting the entire workspace
neon-check = " check --all --all-targets --features napi-experimental,futures,external-buffers"
neon-clippy = "clippy --all --all-targets --features napi-experimental,futures,external-buffers -- -A clippy::missing_safety_doc"
neon-test = " test --all --features=doc-dependencies,doc-comment,napi-experimental,futures,external-buffers"
neon-doc = " rustdoc -p neon --features=doc-dependencies,napi-experimental,futures,external-buffers -- --cfg docsrs"
neon-check = " check --all --all-targets --features napi-experimental,external-buffers,serde,tokio"
neon-clippy = "clippy --all --all-targets --features napi-experimental,external-buffers,serde,tokio -- -A clippy::missing_safety_doc"
neon-test = " test --all --features=doc-dependencies,doc-comment,napi-experimental,external-buffers,serde,tokio"
neon-doc = " rustdoc -p neon --features=doc-dependencies,napi-experimental,external-buffers,sys,serde,tokio -- --cfg docsrs"
61 changes: 61 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Benchmarks

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
bench:
name: regression
permissions:
checks: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: bencherdev/bencher@main
- name: Use Rust Stable
uses: dtolnay/rust-toolchain@stable
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: npm
- name: npm install
run: npm ci --prefer-offline --no-audit --no-fund
- name: Install Benchmark Dependencies
working-directory: ./bench
run: npm install
- name: Build Benchmark
working-directory: ./bench
run: npm run build
- name: Track base branch benchmarks with Bencher
if: github.ref_name == 'main'
run: bencher run
--project neon
--token '${{ secrets.BENCHER_API_TOKEN }}'
--branch main
--testbed ubuntu-latest
--adapter json
--github-actions '${{ secrets.GITHUB_TOKEN }}'
npm run --silent benchmark
working-directory: ./bench
- name: Track pull request benchmarks with Bencher
if: github.ref_name != 'main'
run: bencher run
--project neon
--token '${{ secrets.BENCHER_API_TOKEN }}'
--branch "$GITHUB_HEAD_REF"
--start-point "$GITHUB_BASE_REF"
--start-point-hash '${{ github.event.pull_request.base.sha }}'
--start-point-clone-thresholds
--start-point-reset
--testbed ubuntu-latest
--adapter json
--github-actions '${{ secrets.GITHUB_TOKEN }}'
npm run --silent benchmark
working-directory: ./bench
65 changes: 44 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,19 @@ jobs:
- name: Set Matrix
id: set_matrix
env:
FULL_NODE_VERSIONS: '["14.x", "16.x", "18.x"]'
FULL_NODE_VERSIONS: '["18.x", "20.x"]'
FULL_RUST_TOOLCHAINS: '["stable", "nightly"]'
PARTIAL_NODE_VERSIONS: '["16.x"]'
PARTIAL_NODE_VERSIONS: '["20.x"]'
PARTIAL_RUST_TOOLCHAINS: '["stable"]'
HAS_FULL_MATRIX_LABEL: ${{ contains(github.event.pull_request.labels.*.name, 'full matrix') }}
IS_PUSHED: ${{ github.event_name == 'push' }}
run: |
if [[ "$HAS_FULL_MATRIX_LABEL" == "true" ]] || [[ "$IS_PUSHED" == "true" ]]; then
echo "::set-output name=node_version::$FULL_NODE_VERSIONS"
echo "::set-output name=rust_toolchain::$FULL_RUST_TOOLCHAINS"
echo "node_version=$FULL_NODE_VERSIONS" >> $GITHUB_OUTPUT
echo "rust_toolchain=$FULL_RUST_TOOLCHAINS" >> $GITHUB_OUTPUT
else
echo "::set-output name=node_version::$PARTIAL_NODE_VERSIONS"
echo "::set-output name=rust_toolchain::$PARTIAL_RUST_TOOLCHAINS"
echo "node_version=$PARTIAL_NODE_VERSIONS" >> $GITHUB_OUTPUT
echo "rust_toolchain=$PARTIAL_RUST_TOOLCHAINS" >> $GITHUB_OUTPUT
fi

build:
Expand All @@ -51,55 +51,78 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
components: clippy,rustfmt

- name: Linkme nightly workaround
if: matrix.rust-toolchain == 'nightly' && matrix.os == 'ubuntu-latest'
# Workaround for linkme with `rust-lld`
# https://blog.rust-lang.org/2024/05/17/enabling-rust-lld-on-linux.html#possible-drawbacks
run: echo RUSTFLAGS=${RUSTFLAGS}\ -Clink-arg=-Wl,-z,nostart-stop-gc >> $GITHUB_ENV

- name: Rust Cache
uses: Swatinem/rust-cache@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Electron Cache Variables
id: electron_cache_vars
run: |
echo "::set-output name=key::${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}"
- name: Cache Electron (Linux)
if: matrix.os == 'ubuntu-latest'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ steps.electron_cache_vars.outputs.key }}
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
path: ~/.cache/electron
- name: Cache Electron (Windows)
if: matrix.os == 'windows-latest'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ steps.electron_cache_vars.outputs.key }}
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
path: "%LOCALAPPDATA%\\electron\\Cache"
- name: Cache Electron (macOS)
if: matrix.os == 'macos-latest'
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
path: ~/Library/Caches/electron

- name: Use npm v8
# https://github.com/npm/cli/issues/4552
run: npm -g i npm@~8.3
- name: Install cargo-llvm-cov
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
uses: taiki-e/install-action@cargo-llvm-cov

- name: Set coverage environment variables
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
run: cargo llvm-cov show-env | tr -d "'" >> $GITHUB_ENV

- name: npm install
run: npm ci --prefer-offline --no-audit --no-fund

- name: Allow unprivileged X server
if: matrix.os == 'ubuntu-latest'
run: sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0

- name: Test (Linux)
if: matrix.os == 'ubuntu-latest'
run: xvfb-run --auto-servernum npm test -- --nocapture
- name: Test
if: matrix.os != 'ubuntu-latest'
run: npm test

- name: Generate coverage report
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
run: cargo llvm-cov report --codecov --output-path target/codecov.json

- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.rust-toolchain == 'stable'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: neon-bindings/neon
files: target/codecov.json
12 changes: 7 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,26 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [20.x]
rust-toolchain: [nightly]

steps:
- uses: actions/checkout@v3
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Rust ${{ matrix.rust-toolchain }}
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
components: clippy,rustfmt
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Cache Electron
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/electron
key: ${{ runner.os }}-electron-${{ hashFiles('./package-lock.json') }}
Expand Down
24 changes: 18 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
# Rust
target
rls*.log

# Created by `trybuild` ui tests
wip
**/*~

# Node
**/node_modules
**/.DS_Store
npm-debug.log

# JS build
**/build
**/dist
cli/lib
test/cli/lib

# Neon build
**/index.node
**/artifacts.json
cli/lib
**/dist
pkgs/create-neon/create-neon-test-project
pkgs/create-neon/create-neon-manual-test-project
test/cli/lib
npm-debug.log
rls*.log

# System
**/.DS_Store
3 changes: 3 additions & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Neon owes its existence to the contributions of these fine people.
* [ComplexSpaces](https://github.com/complexspaces)
* [Nathaniel Daniel](https://github.com/adumbidiot)
* [John Darrington](https://github.com/DnOberon)
* [erics118](https://github.com/erics118)
* [Joey Ezechiëls](https://github.com/jjpe)
* [Ryan Fitzgerald](https://github.com/rf-)
* [Cory Forsyth](https://github.com/bantic)
Expand All @@ -39,6 +40,7 @@ Neon owes its existence to the contributions of these fine people.
* [Laz](https://github.com/lazops)
* [Anton Lazarev](https://github.com/antonok-edm)
* [Simon Liang](https://github.com/lhr0909)
* [Matthew Little](https://github.com/zone117x)
* [Terence Lee](https://github.com/hone)
* [Milan Loveless](https://github.com/MilanLoveless)
* [Mikuroさいな](https://github.com/MikuroXina)
Expand Down Expand Up @@ -73,4 +75,5 @@ Neon owes its existence to the contributions of these fine people.
* [Chi Wang](https://github.com/patr0nus)
* [wangcong](https://github.com/king6cong)
* [Amila Welihinda](https://github.com/amilajack)
* [xyloflake](https://github.com/xyloflake)
* [Felix Yan](https://github.com/felixonmars)
Loading