Skip to content

Commit

Permalink
feat: Remove the installation of the @types/google-apps-script package
Browse files Browse the repository at this point in the history
  • Loading branch information
hankei6km committed May 2, 2024
1 parent a37d9a3 commit a731aed
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 81 deletions.
8 changes: 1 addition & 7 deletions src/google-clasp/devcontainer-feature.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@
"name": "@google/clasp (via npm)",
"id": "google-clasp",
"version": "1.0.0",
"description": "Install the @google/clasp with @types/google-apps-script package via NPM registry",
"description": "Install the @google/clasp package via NPM registry",
"options": {
"version": {
"type": "string",
"proposals": ["latest"],
"default": "latest",
"description": "Select or enter a @google/clasp version."
},
"types": {
"type": "string",
"proposals": ["latest"],
"default": "latest",
"description": "Select or enter a @types/google-apps-script version(pass blank to not install)."
}
},
"installsAfter": [
Expand Down
6 changes: 0 additions & 6 deletions src/google-clasp/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

TARGET_PACKAGE="@google/clasp"
TARGET_VERSION=${VERSION:-"latest"}
TARGET_TYPES_PACKAGE="@types/google-apps-script"
TARGET_TYPES_VERSION=${TYPES:-"latest"}

set -e

Expand All @@ -21,10 +19,6 @@ install_packages() {

echo "Installing npm package: ${TARGET_PACKAGE}@${TARGET_VERSION}"
npm install --global --omit=dev --no-progress --cache "${TEMP_CACHE}" "${TARGET_PACKAGE}@${TARGET_VERSION}"
if test "${TARGET_TYPES_PACKAGE}" != ""; then
echo "Installing npm package: ${TARGET_TYPES_PACKAGE}@${TARGET_TYPES_VERSION}"
npm install --global --omit=dev --no-progress --cache "${TEMP_CACHE}" "${TARGET_TYPES_PACKAGE}@${TARGET_TYPES_VERSION}"
fi
}

# Check if npm is installed
Expand Down
32 changes: 0 additions & 32 deletions test/google-clasp/scenarios.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,37 +14,5 @@
}
},
"remoteUser": "node"
},
"types_v1.0.0": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/common-utils:1": {
"installZsh": false,
"installOhMyZsh": false,
"upgradePackages": false,
"username": "node"
},
"ghcr.io/devcontainers/features/node:1": {},
"google-clasp": {
"types": "1.0.0"
}
},
"remoteUser": "node"
},
"types_none": {
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/common-utils:1": {
"installZsh": false,
"installOhMyZsh": false,
"upgradePackages": false,
"username": "node"
},
"ghcr.io/devcontainers/features/node:1": {},
"google-clasp": {
"types": ""
}
},
"remoteUser": "node"
}
}
1 change: 0 additions & 1 deletion test/google-clasp/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ source dev-container-features-test-lib
# The 'check' command comes from the dev-container-features-test-lib.

check "Check @google/clasp is installed" clasp --version
check "Check types(@types/google-apps-script) is installed" npm list --global --depth 0 | grep -q "@types/google-apps-script@"

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
Expand Down
17 changes: 0 additions & 17 deletions test/google-clasp/types_none.sh

This file was deleted.

17 changes: 0 additions & 17 deletions test/google-clasp/types_v1.0.0.sh

This file was deleted.

1 change: 0 additions & 1 deletion test/google-clasp/v2.4.0.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ source dev-container-features-test-lib
# The 'check' command comes from the dev-container-features-test-lib.
# clasp 2.4.0 は動作しないので、パッケージの存在確認のみ行う。
check "Check @google/clasp@2.4.0 is installed" npm list --global --depth 0 | grep -q "@google/clasp@2.4.0"
check "Check types(@types/google-apps-script) is installed" npm list --global --depth 0 | grep -q "@types/google-apps-script@"

# Report result
# If any of the checks above exited with a non-zero exit code, the test will fail.
Expand Down

0 comments on commit a731aed

Please sign in to comment.