You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ko...@apache.org on 2021/08/24 07:24:48 UTC

[arrow-site] branch master updated: ARROW-13705: [Website] pin node version to 16 to allow CI and local dev parity

This is an automated email from the ASF dual-hosted git repository.

kou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 0790998  ARROW-13705: [Website] pin node version to 16 to allow CI and local dev parity
0790998 is described below

commit 0790998bae6f5d3ab2a543bd5fc96c8c4b3f9e04
Author: Jiayu Liu <ji...@hey.com>
AuthorDate: Tue Aug 24 16:24:41 2021 +0900

    ARROW-13705: [Website] pin node version to 16 to allow CI and local dev parity
    
    pin node version to 16 to allow CI and local dev parity.
    
    another reason for this pin is that e.g. node 16 uses npm v7 which has version 2 lock format, incompatible with prior versions.
    
    Closes #142 from Jimexist/add-nvmrc and squashes the following commits:
    
    db0036d3d <Jiayu Liu> update caching mechanism
    992a3da7f <Jiayu Liu> update rakefile
    895af6f66 <Jiayu Liu> pin node version to 16
    
    Authored-by: Jiayu Liu <ji...@hey.com>
    Signed-off-by: Sutou Kouhei <ko...@clear-code.com>
---
 .github/workflows/deploy.yml |  4 +++-
 .nvmrc                       |  1 +
 Rakefile                     |  6 +++++-
 package-lock.json            | 15 +++++++++------
 package.json                 |  3 +++
 5 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 7055e50..72d2dcd 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -30,9 +30,11 @@ jobs:
     steps:
       - uses: actions/checkout@v2
       - uses: ruby/setup-ruby@v1
-      - uses: actions/setup-node@v2
         with:
           bundler-cache: true
+      - uses: actions/setup-node@v2
+        with:
+          cache: "npm"
       - name: Install dependencies
         run: |
           bundle install
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..b6a7d89
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+16
diff --git a/Rakefile b/Rakefile
index cea3ebc..3ccd40a 100644
--- a/Rakefile
+++ b/Rakefile
@@ -23,7 +23,11 @@ webpacked_js = "javascript/main.js"
 installed_package_lock_json = "node_modules/.package-lock.json"
 
 file installed_package_lock_json => ["package.json", "package-lock.json"] do
-  sh("npm", "install", "--no-save")
+  if production?
+    sh("npm", "ci")
+  else
+    sh("npm", "install", "--no-save")
+  end
 end
 
 file webpacked_js => ["_webpack/main.js", installed_package_lock_json] do
diff --git a/package-lock.json b/package-lock.json
index 707160c..86a6adc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,6 +13,9 @@
         "popper.js": "^1.16.1",
         "webpack": "^5.21.2",
         "webpack-cli": "^4.5.0"
+      },
+      "engines": {
+        "node": ">=16"
       }
     },
     "node_modules/@discoveryjs/json-ext": {
@@ -821,9 +824,9 @@
       }
     },
     "node_modules/path-parse": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
-      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
     },
     "node_modules/pkg-dir": {
       "version": "4.2.0",
@@ -1885,9 +1888,9 @@
       "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="
     },
     "path-parse": {
-      "version": "1.0.6",
-      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
-      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+      "version": "1.0.7",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
+      "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw=="
     },
     "pkg-dir": {
       "version": "4.2.0",
diff --git a/package.json b/package.json
index 12f05d9..591162f 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,9 @@
   "description": "The source of https://arrow.apache.org/.",
   "private": true,
   "scripts": {},
+  "engines": {
+    "node": ">=16"
+  },
   "repository": {
     "type": "git",
     "url": "git+https://github.com/apache/arrow-site.git"