Skip to content

Commit

Permalink
Merge pull request #374 from MatrixAI/feature-dep-upgrades
Browse files Browse the repository at this point in the history
Upgrading lib dependencies and node.js version
  • Loading branch information
emmacasolin authored Jun 7, 2022
2 parents 05f8174 + c37eddb commit 631a0da
Show file tree
Hide file tree
Showing 261 changed files with 25,656 additions and 11,207 deletions.
16 changes: 10 additions & 6 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {
"browser": true,
"commonjs": true,
"es6": true,
"es2021": true,
"node": true,
"jest": true
},
Expand All @@ -11,26 +11,24 @@
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
"prettier/@typescript-eslint"
"prettier"
],
"plugins": [
"import"
],
"parserOptions": {
"project": "tsconfig.json",
"sourceType": "module",
"ecmaVersion": 2020
"sourceType": "module"
},
"rules": {
"linebreak-style": ["error", "unix"],
"no-empty": 1,
"no-undef": 0,
"no-useless-catch": 1,
"no-prototype-builtins": 1,
"no-constant-condition": 0,
"no-useless-escape" : 0,
"no-console": "error",
"require-yield": 0,
"eqeqeq": ["error", "smart"],
"spaced-comment": [
"warn",
Expand Down Expand Up @@ -121,6 +119,12 @@
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "function",
"format": ["camelCase", "PascalCase"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allowSingleOrDouble"
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE", "PascalCase"],
Expand Down
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
/benches
/build
/builds
/dist/tsbuildinfo
25 changes: 20 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ runCommandNoCC
, callPackage
, jq
}:

let
Expand Down Expand Up @@ -32,11 +33,25 @@ let
"${utils.node2nixProd}/lib/node_modules" \
"$out/lib/node_modules/$packageName/"
fi
# create symlink to the deployed executable folder, if applicable
if [ -d "${utils.node2nixDev}/lib/node_modules/.bin" ]; then
cp -r ${utils.node2nixDev}/lib/node_modules/.bin $out/lib/node_modules/
ln -s $out/lib/node_modules/.bin $out/bin
# symlink bin executables
if [ \
"$(${jq}/bin/jq 'has("bin")' "$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json")" \
== \
"true" \
]; then
mkdir -p "$out/bin"
while IFS= read -r bin_name && IFS= read -r bin_path; do
# make files executable
chmod a+x "$out/lib/node_modules/${utils.node2nixDev.packageName}/$bin_path"
# create the symlink
ln -s \
"../lib/node_modules/${utils.node2nixDev.packageName}/$bin_path" \
"$out/bin/$bin_name"
done < <(
${jq}/bin/jq -r 'select(.bin != null) | .bin | to_entries[] | (.key, .value)' \
"$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json"
)
fi
'';
'';
in
drv
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const os = require('os');
const path = require('path');
const fs = require('fs');
const process = require('process');
const { pathsToModuleNameMapper } = require('ts-jest/utils');
const { pathsToModuleNameMapper } = require('ts-jest');
const { compilerOptions } = require('./tsconfig');

const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {
Expand Down
Loading

0 comments on commit 631a0da

Please sign in to comment.