Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
],
"include": [
"/root/.cache",
"."
".",
"/opt/corepack"
],
"step": "build"
}
Expand All @@ -68,10 +69,6 @@
{
"path": "/mise/shims"
},
{
"dest": "mise.toml",
"src": "mise.toml"
},
{
"customName": "create mise config",
"name": "mise.toml",
Expand All @@ -94,6 +91,7 @@
"MISE_DATA_DIR": "/mise",
"MISE_IDIOMATIC_VERSION_FILE_ENABLE_TOOLS": "python,node,ruby,elixir,go,java,yarn",
"MISE_INSTALLS_DIR": "/mise/installs",
"MISE_NODE_COREPACK": "true",
"MISE_NODE_VERIFY": "false",
"MISE_PARANOID": "1",
"MISE_SHIMS_DIR": "/mise/shims",
Expand All @@ -108,6 +106,14 @@
{
"path": "/app/node_modules/.bin"
},
{
"dest": "package.json",
"src": "package.json"
},
{
"cmd": "sh -c 'npm i -g corepack@latest \u0026\u0026 corepack enable \u0026\u0026 corepack prepare --activate'",
"customName": "npm i -g corepack@latest \u0026\u0026 corepack enable \u0026\u0026 corepack prepare --activate"
},
{
"cmd": "mkdir -p /app/node_modules/.cache"
},
Expand All @@ -131,6 +137,7 @@
"name": "install",
"variables": {
"CI": "true",
"COREPACK_HOME": "/opt/corepack",
"NODE_ENV": "production",
"NPM_CONFIG_FUND": "false",
"NPM_CONFIG_PRODUCTION": "false",
Expand Down
12 changes: 10 additions & 2 deletions examples/node-latest-npm-native-deps/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
const Database = require('better-sqlite3');
const bcrypt = require('bcrypt');

console.log('Node version:', process.version);
console.log('Testing better-sqlite3 (native module)...');
console.log('Testing better-sqlite3 and bcrypt (native modules)...');

// Create an in-memory database
const db = new Database(':memory:');
Expand All @@ -22,4 +23,11 @@ console.log('Rows:', rows);

db.close();

console.log('✓ better-sqlite3 native module working correctly with npm');
console.log('Testing bcrypt (native module)...');
const saltRounds = 10;
const hash = bcrypt.hashSync('npm-native-deps', saltRounds);
const match = bcrypt.compareSync('npm-native-deps', hash);
console.log('Bcrypt hash generated:', hash.substring(0, 20) + '...');
console.log('Bcrypt compare result:', match);

console.log('✓ better-sqlite3 and bcrypt native modules working correctly with npm');
3 changes: 0 additions & 3 deletions examples/node-latest-npm-native-deps/mise.toml

This file was deleted.

Loading
Loading