Skip to content

Commit

Permalink
Merge pull request #895 from heroku/add-node-15
Browse files Browse the repository at this point in the history
Add Node 15 test and plugin references
  • Loading branch information
danielleadams authored Feb 1, 2021
2 parents 1f0a1c1 + 54bf313 commit 5d785fe
Show file tree
Hide file tree
Showing 35 changed files with 34 additions and 231 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- Add unit tests around the behavior of `WEB_CONCURRENCY` ([#876](https://github.com/heroku/heroku-buildpack-nodejs/pull/876))
- Add Node v15.6.0 to inventory ([#892](https://github.com/heroku/heroku-buildpack-nodejs/pull/892))
- add Node 10.23.2 and 15.7.0 to inventory ([#894](https://github.com/heroku/heroku-buildpack-nodejs/pull/894))
- Update Node.js plugin for Node 15; Add tests for Node 15 ([#895](https://github.com/heroku/heroku-buildpack-nodejs/pull/895))

## v182 (2020-01-05)
- add Node 14.15.3 and 15.5.0 to inventory ([#881](https://github.com/heroku/heroku-buildpack-nodejs/pull/881))
Expand Down
14 changes: 7 additions & 7 deletions plugin/download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ delete_old_plugin() {
rm -f "$dir/heroku-nodejs-plugin-node-10.tar.gz"
rm -f "$dir/heroku-nodejs-plugin-node-12.sha512"
rm -f "$dir/heroku-nodejs-plugin-node-12.tar.gz"
rm -f "$dir/heroku-nodejs-plugin-node-13.sha512"
rm -f "$dir/heroku-nodejs-plugin-node-13.tar.gz"
rm -f "$dir/heroku-nodejs-plugin-node-14.sha512"
rm -f "$dir/heroku-nodejs-plugin-node-14.tar.gz"
rm -f "$dir/heroku-nodejs-plugin-node-15.sha512"
rm -f "$dir/heroku-nodejs-plugin-node-15.tar.gz"
rm -f "$dir/version"
}

Expand All @@ -57,13 +57,13 @@ download_assets_for_release() {
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-12-$tag.sha512" "$dir/heroku-nodejs-plugin-node-12.sha512"
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-12-$tag.tar.gz" "$dir/heroku-nodejs-plugin-node-12.tar.gz"

# Node 13
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-13-$tag.sha512" "$dir/heroku-nodejs-plugin-node-13.sha512"
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-13-$tag.tar.gz" "$dir/heroku-nodejs-plugin-node-13.tar.gz"

# Node 14
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-14-$tag.sha512" "$dir/heroku-nodejs-plugin-node-14.sha512"
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-14-$tag.tar.gz" "$dir/heroku-nodejs-plugin-node-14.tar.gz"

# Node 15
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-15-$tag.sha512" "$dir/heroku-nodejs-plugin-node-15.sha512"
download "https://github.com/heroku/heroku-nodejs-plugin/releases/download/$tag/heroku-nodejs-plugin-node-15-$tag.tar.gz" "$dir/heroku-nodejs-plugin-node-15.tar.gz"
}

test_hash() {
Expand Down Expand Up @@ -98,7 +98,7 @@ echo "Plugins downloaded"

test_hash 10 $PLUGIN_DIR
test_hash 12 $PLUGIN_DIR
test_hash 13 $PLUGIN_DIR
test_hash 14 $PLUGIN_DIR
test_hash 15 $PLUGIN_DIR

echo "Done"
2 changes: 1 addition & 1 deletion plugin/heroku-nodejs-plugin-node-10.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ed4d9bd5999773df8c8048cc7263e17035cdcbad22765e416779cebbb5cd98d1c46197412d6c5e792f8a334e49832a4856bec7d62f9c7ec1596e5442123720cc heroku-nodejs-plugin-node-10-v7.tar.gz
36d7fd0cd35b95b3d0ee85a1fb50cd4a27f07bd7e4f0e045b60b8d8e7e2a77ec7d47e5af0734dce7bb2ab0e877b545e208e1c69985ddc42970ca55de497ec867 heroku-nodejs-plugin-node-10-v8.tar.gz
Binary file modified plugin/heroku-nodejs-plugin-node-10.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin/heroku-nodejs-plugin-node-12.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
eab38e97fe36832fbf5256caebc0581558a6c52674603e6c285f92d1e33c8614d5cbe8353a3299a058b473fbe650e098cac74d2962362bda7250ec4ac27a0407 heroku-nodejs-plugin-node-12-v7.tar.gz
56ce282e8238427347edc66dfcb24526fd45844599f4cff5561b672ec23613364320bc4d4bfc2cb405a5a06d4ea0228bcf72d3c7317945708b4e6f22f287bb5f heroku-nodejs-plugin-node-12-v8.tar.gz
Binary file modified plugin/heroku-nodejs-plugin-node-12.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin/heroku-nodejs-plugin-node-14.sha512
Original file line number Diff line number Diff line change
@@ -1 +1 @@
21e2f973e3a021a04e23e8cc16b07415266ff3c3ed8a422864c91340b3fe7afce5fc956dfe72bc41971389cb944645687ce9e3dbe8adbe3eb1f21d20aa537476 heroku-nodejs-plugin-node-14-v7.tar.gz
b03e6b3ca36531215c022f3473199e8a9b26fdc7a44099866768fa3b9ea9e4d14d12fc499c4ac0dc707427604b2060d8aec5352722496756e3c4da1873b57ee9 heroku-nodejs-plugin-node-14-v8.tar.gz
Binary file modified plugin/heroku-nodejs-plugin-node-14.tar.gz
Binary file not shown.
1 change: 1 addition & 0 deletions plugin/heroku-nodejs-plugin-node-15.sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
76635a81579f98875e705569def429670fdf809f1ddc9bdda1a7d2df6b09e0501d515cf7fb315f06af377b3da6eda9f562deac2948dc68de311680ec79bc8ee7 heroku-nodejs-plugin-node-15-v8.tar.gz
Binary file added plugin/heroku-nodejs-plugin-node-15.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion plugin/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v7
v8
25 changes: 0 additions & 25 deletions spec/ci/node_13_metrics_spec.rb

This file was deleted.

16 changes: 0 additions & 16 deletions spec/ci/node_13_spec.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require_relative '../spec_helper'

describe "Node Metrics for v11.x" do
context "test metrics for Node v11.x app" do
describe "Node Metrics for v15.x" do
context "test metrics for Node v15x app" do
let(:app) {
Hatchet::Runner.new(
"spec/fixtures/repos/node-11-metrics",
"spec/fixtures/repos/node-15-metrics",
config: {
"HEROKU_METRICS_URL" => "http://localhost:3000",
"METRICS_INTERVAL_OVERRIDE" => "10000"
Expand Down
6 changes: 3 additions & 3 deletions spec/ci/node_11_spec.rb → spec/ci/node_15_spec.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
require_relative '../spec_helper'

describe "Hello World for Node v11.x" do
context "a single-process Node v11.x app" do
describe "Hello World for Node v15.x" do
context "a single-process Node v15.x app" do
let(:app) {
Hatchet::Runner.new("spec/fixtures/repos/node-11")
Hatchet::Runner.new("spec/fixtures/repos/node-15")
}

it "should deploy successfully" do
Expand Down
1 change: 0 additions & 1 deletion spec/fixtures/repos/node-11-metrics/Procfile

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/repos/node-11/Procfile

This file was deleted.

21 changes: 0 additions & 21 deletions spec/fixtures/repos/node-11/package.json

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/repos/node-13-metrics/Procfile

This file was deleted.

11 changes: 0 additions & 11 deletions spec/fixtures/repos/node-13-metrics/package.json

This file was deleted.

73 changes: 0 additions & 73 deletions spec/fixtures/repos/node-13-metrics/src/index.js

This file was deleted.

1 change: 0 additions & 1 deletion spec/fixtures/repos/node-13/Procfile

This file was deleted.

3 changes: 0 additions & 3 deletions spec/fixtures/repos/node-13/app.json

This file was deleted.

46 changes: 0 additions & 46 deletions spec/fixtures/repos/node-13/src/index.js

This file was deleted.

1 change: 1 addition & 0 deletions spec/fixtures/repos/node-15-metrics/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,3 @@ const metricsListener = http.createServer((req, res) => {
});

metricsListener.listen(3000, () => console.log('Listening for metrics on 3000'));

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "node-metrics-test-app",
"version": "1.0.0",
"engines": {
"node": "11.x"
"node": "15.x"
},
"main": "index.js",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions spec/fixtures/repos/node-15/Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: node index.js
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
"name": "hello-world",
"version": "1.0.0",
"engines": {
"node": "13.x"
"node": "15.x"
},
"scripts": {
"prettify": "prettier --single-quote --trailing-comma all --write 'bin/*' 'src/**/*.js'",
"test": "jest --silent",
"dev": "nodemon --watch . --watch src/* src/index.js",
"heroku-postbuild": "echo NODE_OPTIONS: $NODE_OPTIONS"
"build": "echo NODE_OPTIONS: $NODE_OPTIONS"
},
"main": "index.js",
"license": "MIT",
Expand Down
10 changes: 5 additions & 5 deletions spec/hatchet/stack_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@
describe "Stack Changes" do
#Test upgrading stack invalidates the cache
it "should not restore cached directories" do
Hatchet::Runner.new("default-node", stack: "heroku-18").deploy do |app, heroku|
app.update_stack("heroku-16")
run!('git commit --allow-empty -m "heroku-16 migrate"')
Hatchet::Runner.new("default-node", stack: "heroku-20").deploy do |app, heroku|
app.update_stack("heroku-18")
run!('git commit --allow-empty -m "heroku-18 migrate"')
app.push!
expect(app.output).to include("Cached directories were not restored due to a change in version of node, npm, yarn or stack")
end
end

#Test cache for regular deploys is used on repeated deploys
it "should not restore cache if the stack did not change" do
Hatchet::Runner.new('default-node', stack: "heroku-16").deploy do |app, heroku|
app.update_stack("heroku-16")
Hatchet::Runner.new('default-node', stack: "heroku-20").deploy do |app, heroku|
app.update_stack("heroku-20")
run!('git commit --allow-empty -m "cedar migrate"')
app.push!
expect(app.output).to_not include("Cached directories were not restored due to a change in version of node, npm, yarn or stack")
Expand Down
2 changes: 1 addition & 1 deletion spec/nodebin/node_vX_metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
context "test metrics for Node v#{version} app" do
let(:app) {
Hatchet::Runner.new(
"spec/fixtures/repos/node-10-metrics",
"spec/fixtures/repos/node-14-metrics",
before_deploy: -> { set_node_version(version) },
config: {
"HEROKU_METRICS_URL" => "http://localhost:3000",
Expand Down
2 changes: 1 addition & 1 deletion spec/nodebin/node_vX_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
context "a single-process Node v#{version} app" do
let(:app) {
Hatchet::Runner.new(
"spec/fixtures/repos/node-10",
"spec/fixtures/repos/node-14",
before_deploy: -> { set_node_version(version) }
)
}
Expand Down
Loading

0 comments on commit 5d785fe

Please sign in to comment.