Skip to content

Commit

Permalink
Adjust npm-cd to fit prettier structure (#1081)
Browse files Browse the repository at this point in the history
adjust npm-cd to fit prettier structure
  • Loading branch information
avifenesh authored Mar 6, 2024
1 parent 712c4ac commit b6892bc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/npm-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ jobs:
run: |
# Remove the "cpu" and "os" fileds so the base package would be able to install it on ubuntu
SED_FOR_MACOS=`if [[ "${{ matrix.build.OS }}" =~ .*"macos".* ]]; then echo "''"; fi`
sed -i $SED_FOR_MACOS '/"cpu":/d' ./package.json && sed -i $SED_FOR_MACOS '/"os":/d' ./package.json
sed -i $SED_FOR_MACOS '/"\/\/\/cpu": \[/,/]/d' ./package.json && sed -i $SED_FOR_MACOS '/"\/\/\/os": \[/,/]/d' ./package.json
mkdir -p bin
npm pack --pack-destination ./bin
ls ./bin
Expand Down
13 changes: 10 additions & 3 deletions node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"glide-rs": "file:rust-client",
"long": "^5.2.3",
"npmignore": "^0.3.0",
"prettier": "^3.2.5",
"protobufjs": "^7.2.2"
},
"bundleDependencies": [
Expand All @@ -32,7 +33,9 @@
"test": "jest --verbose --runInBand --testPathIgnorePatterns='RedisModules'",
"lint": "eslint -f unix \"src/**/*.{ts,tsx}\"",
"prepack": "npmignore --auto",
"test-modules": "jest --verbose --runInBand 'tests/RedisModules.test.ts'"
"test-modules": "jest --verbose --runInBand 'tests/RedisModules.test.ts'",
"prettier:check:ci": "./node_modules/.bin/prettier --check . --ignore-unknown '!**/*.{js,d.ts}'",
"prettier:format": "./node_modules/.bin/prettier --write . --ignore-unknown '!**/*.{js,d.ts}'"
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
Expand Down Expand Up @@ -70,8 +73,12 @@
"//": [
"The fields below have been commented out and are only necessary for publishing the package."
],
"///cpu": ["${node_arch}"],
"///os": ["${node_os}"],
"///cpu": [
"${node_arch}"
],
"///os": [
"${node_os}"
],
"///name": "${scope}${pkg_name}",
"///version": "${package_version}"
}

0 comments on commit b6892bc

Please sign in to comment.