cache-extensions 1.8.1 → 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cache-extensions",
3
- "version": "1.8.1",
3
+ "version": "1.9.0",
4
4
  "private": false,
5
5
  "description": "Cache PHP extensions in GitHub Actions",
6
6
  "main": "lib/cache.js",
@@ -36,26 +36,26 @@
36
36
  "license": "MIT",
37
37
  "dependencies": {
38
38
  "@actions/cache": "^3.0.4",
39
- "@actions/core": "^1.9.1",
39
+ "@actions/core": "^1.10.0",
40
40
  "@actions/exec": "^1.1.1",
41
41
  "setup-php": "2.21.2"
42
42
  },
43
43
  "devDependencies": {
44
- "@types/jest": "^28.1.7",
45
- "@types/node": "^18.7.6",
46
- "@typescript-eslint/eslint-plugin": "^5.33.1",
47
- "@typescript-eslint/parser": "^5.33.1",
44
+ "@types/jest": "^29.1.2",
45
+ "@types/node": "^18.8.4",
46
+ "@typescript-eslint/eslint-plugin": "^5.40.0",
47
+ "@typescript-eslint/parser": "^5.40.0",
48
48
  "@vercel/ncc": "^0.34.0",
49
- "eslint": "^8.22.0",
49
+ "eslint": "^8.25.0",
50
50
  "eslint-config-prettier": "^8.5.0",
51
51
  "eslint-plugin-import": "^2.26.0",
52
- "eslint-plugin-jest": "^26.8.3",
52
+ "eslint-plugin-jest": "^27.1.1",
53
53
  "eslint-plugin-prettier": "^4.2.1",
54
- "jest": "^28.1.3",
55
- "jest-circus": "^28.1.3",
54
+ "jest": "^29.1.2",
55
+ "jest-circus": "^29.1.2",
56
56
  "prettier": "^2.7.1",
57
- "ts-jest": "^28.0.8",
58
- "typescript": "^4.7.4"
57
+ "ts-jest": "^29.0.3",
58
+ "typescript": "^4.8.4"
59
59
  },
60
60
  "bugs": {
61
61
  "url": "https://github.com/shivammathur/cache-extensions/issues"
@@ -19,5 +19,8 @@ redis
19
19
  ssh2
20
20
  swoole
21
21
  vips
22
+ xdebug
23
+ xdebug2
24
+ xlswriter
22
25
  yaml
23
26
  zmq
@@ -510,6 +510,8 @@ libnuma1
510
510
  libobjc-11-dev
511
511
  libobjc4
512
512
  libodbc2
513
+ libodbccr2
514
+ libodbcinst2
513
515
  libonig5
514
516
  libopenexr-dev
515
517
  libopenexr25
@@ -78,7 +78,7 @@ extension_dir_linux() {
78
78
 
79
79
  data() {
80
80
  old_versions="5.[3-5]"
81
- date='20211217'
81
+ date='20220831'
82
82
  if [ "$os" = "Linux" ]; then
83
83
  . /etc/lsb-release
84
84
  os=$os-$DISTRIB_CODENAME
@@ -86,8 +86,6 @@ data() {
86
86
  dir=$(extension_dir_linux "$api_version")
87
87
  sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
88
88
  elif [ "$os" = "Darwin" ]; then
89
- [[ "$extensions" == *"vips"* ]] && date='20220224'
90
- [[ "$extensions" =~ .*((pecl_)?http|mongodb).* ]] && date='20220304'
91
89
  api_version=$(get_api_version)
92
90
  dir=$(extension_dir_darwin "$api_version")
93
91
  sudo mkdir -p "$dir/deps" && fix_ownership "$dir"
@@ -100,8 +98,8 @@ data() {
100
98
  key="$os"-"$version"-"$key"-"$date"
101
99
  echo "$dir" > "${RUNNER_TEMP:?}"/dir
102
100
  echo "$key" > "${RUNNER_TEMP:?}"/key
103
- echo "::set-output name=dir::$dir"
104
- echo "::set-output name=key::$key"
101
+ echo "dir=$dir" >> ${GITHUB_OUTPUT:?}
102
+ echo "key=$key" >> ${GITHUB_OUTPUT:?}
105
103
  }
106
104
 
107
105
  dependencies() {
@@ -29,10 +29,12 @@ get_dependencies() {
29
29
  formula_file="$tap_dir/$ext_tap/Formula/$extension@${version:?}.rb"
30
30
  if [ -e "$formula_file" ]; then
31
31
  formula_deps="$(grep "depends_on" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
32
+ formula_deps_from_macos="$(grep "uses_from_macos \"lib" "$formula_file" | cut -d '"' -f 2 | tr '\n' ' ')"
32
33
  fi
33
34
  deps=()
34
35
  [[ -n "${list_deps[*]}" ]] && deps+=("${list_deps[@]}")
35
36
  [[ -n "${formula_deps[*]}" ]] && deps+=("${formula_deps[@]}")
37
+ [[ -n "${formula_deps_from_macos[*]}" ]] && deps+=("${formula_deps_from_macos[@]}")
36
38
  echo "${deps[@]}"
37
39
  }
38
40
 
@@ -117,6 +119,9 @@ restore_library_helper() {
117
119
  if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
118
120
  brew link --force --overwrite "$dep_name" 2>/dev/null || true
119
121
  fi
122
+ if ! [ -d "$brew_prefix/opt/$dep_name" ]; then
123
+ sudo ln -sf "$brew_cellar"/"$dep_name"/* "$brew_prefix"/opt/"$dep_name"
124
+ fi
120
125
  }
121
126
 
122
127
  restore_library() {
@@ -157,9 +162,7 @@ setup_dependencies() {
157
162
  IFS=' ' read -r -a extensions_array <<<"$(filter_extensions "${extensions_array[@]}")"
158
163
  if [[ -n "${extensions_array[*]// /}" ]]; then
159
164
  add_brew_tap "$php_tap"
160
- add_brew_tap "$ext_tap"
161
- # Remove once updated on the images
162
- curl -o "$tap_dir"/"$core_tap"/Formula/ca-certificates.rb -sL https://raw.githubusercontent.com/"$core_tap"/master/Formula/ca-certificates.rb
165
+ add_brew_tap "$ext_tap"
163
166
  for extension in "${extensions_array[@]}"; do
164
167
  IFS=' ' read -r -a dependency_array <<<"$(get_dependencies "$extension")"
165
168
  IFS=' ' read -r -a extension_array <<<"$(echo "${dependency_array[@]}" | grep -Eo "[a-z]*@" | sed 's/@//' | tr '\n' ' ')"
@@ -7,8 +7,8 @@ link_apt_fast() {
7
7
  fetch_package() {
8
8
  if ! [ -e /tmp/Packages ]; then
9
9
  . /etc/os-release
10
- deb_build_arch=$(dpkg-architecture -q DEB_BUILD_ARCH)
11
- curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$VERSION_CODENAME/main/binary-$deb_build_arch/Packages.gz"
10
+ arch=$(dpkg --print-architecture)
11
+ curl -o /tmp/Packages.gz -sL "http://ppa.launchpad.net/ondrej/php/ubuntu/dists/$VERSION_CODENAME/main/binary-$arch/Packages.gz"
12
12
  gzip -df /tmp/Packages.gz
13
13
  fi
14
14
  }
@@ -98,6 +98,7 @@ setup_dependencies() {
98
98
  libraries=""
99
99
  extension_packages=""
100
100
  for extension_package in "${extensions_array[@]}"; do
101
+ [[ ! "$extension_package" =~ php[0-9]+\.[0-9]+-[a-zA-Z]+$ ]] && continue
101
102
  fetch_package
102
103
  libraries="$libraries $(get_dependencies "$extension_package" "lib")"
103
104
  IFS=' ' read -r -a dependency_extension_packages_array <<<"$(get_dependencies "$extension_package" "php$version-")"