Skip to content

Commit 631a0da

Browse files
authored
Merge pull request #374 from MatrixAI/feature-dep-upgrades
Upgrading lib dependencies and node.js version
2 parents 05f8174 + c37eddb commit 631a0da

261 files changed

Lines changed: 25656 additions & 11207 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"env": {
33
"browser": true,
44
"commonjs": true,
5-
"es6": true,
5+
"es2021": true,
66
"node": true,
77
"jest": true
88
},
@@ -11,26 +11,24 @@
1111
"eslint:recommended",
1212
"plugin:@typescript-eslint/recommended",
1313
"plugin:prettier/recommended",
14-
"prettier",
15-
"prettier/@typescript-eslint"
14+
"prettier"
1615
],
1716
"plugins": [
1817
"import"
1918
],
2019
"parserOptions": {
2120
"project": "tsconfig.json",
22-
"sourceType": "module",
23-
"ecmaVersion": 2020
21+
"sourceType": "module"
2422
},
2523
"rules": {
2624
"linebreak-style": ["error", "unix"],
2725
"no-empty": 1,
28-
"no-undef": 0,
2926
"no-useless-catch": 1,
3027
"no-prototype-builtins": 1,
3128
"no-constant-condition": 0,
3229
"no-useless-escape" : 0,
3330
"no-console": "error",
31+
"require-yield": 0,
3432
"eqeqeq": ["error", "smart"],
3533
"spaced-comment": [
3634
"warn",
@@ -121,6 +119,12 @@
121119
"leadingUnderscore": "allow",
122120
"trailingUnderscore": "allowSingleOrDouble"
123121
},
122+
{
123+
"selector": "function",
124+
"format": ["camelCase", "PascalCase"],
125+
"leadingUnderscore": "allow",
126+
"trailingUnderscore": "allowSingleOrDouble"
127+
},
124128
{
125129
"selector": "variable",
126130
"format": ["camelCase", "UPPER_CASE", "PascalCase"],

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
/benches
1414
/build
1515
/builds
16+
/dist/tsbuildinfo

default.nix

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{ runCommandNoCC
22
, callPackage
3+
, jq
34
}:
45

56
let
@@ -32,11 +33,25 @@ let
3233
"${utils.node2nixProd}/lib/node_modules" \
3334
"$out/lib/node_modules/$packageName/"
3435
fi
35-
# create symlink to the deployed executable folder, if applicable
36-
if [ -d "${utils.node2nixDev}/lib/node_modules/.bin" ]; then
37-
cp -r ${utils.node2nixDev}/lib/node_modules/.bin $out/lib/node_modules/
38-
ln -s $out/lib/node_modules/.bin $out/bin
36+
# symlink bin executables
37+
if [ \
38+
"$(${jq}/bin/jq 'has("bin")' "$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json")" \
39+
== \
40+
"true" \
41+
]; then
42+
mkdir -p "$out/bin"
43+
while IFS= read -r bin_name && IFS= read -r bin_path; do
44+
# make files executable
45+
chmod a+x "$out/lib/node_modules/${utils.node2nixDev.packageName}/$bin_path"
46+
# create the symlink
47+
ln -s \
48+
"../lib/node_modules/${utils.node2nixDev.packageName}/$bin_path" \
49+
"$out/bin/$bin_name"
50+
done < <(
51+
${jq}/bin/jq -r 'select(.bin != null) | .bin | to_entries[] | (.key, .value)' \
52+
"$out/lib/node_modules/${utils.node2nixDev.packageName}/package.json"
53+
)
3954
fi
40-
'';
55+
'';
4156
in
4257
drv

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const os = require('os');
22
const path = require('path');
33
const fs = require('fs');
44
const process = require('process');
5-
const { pathsToModuleNameMapper } = require('ts-jest/utils');
5+
const { pathsToModuleNameMapper } = require('ts-jest');
66
const { compilerOptions } = require('./tsconfig');
77

88
const moduleNameMapper = pathsToModuleNameMapper(compilerOptions.paths, {

0 commit comments

Comments
 (0)