Skip to content

Commit b0a46a4

Browse files
committed
remove node v18.x
1 parent 8f4fa26 commit b0a46a4

File tree

9 files changed

+24
-60
lines changed

9 files changed

+24
-60
lines changed

fixtures/brats/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "hello, world",
55
"main": "server.js",
66
"engines": {
7-
"node": "18.x"
7+
"node": "20.x"
88
},
99
"dependencies": {
1010
"bcrypt": "*",

fixtures/https/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"test": "echo \"Error: no test specified\" && exit 1"
88
},
99
"engines" : {
10-
"node" : "~>18"
10+
"node" : "~>20"
1111
}
1212
}

fixtures/vendored/binaries/package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fixtures/vendored/binaries/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"leftpad": "~0.0.1"
1414
},
1515
"engines": {
16-
"node": "~>18"
16+
"node": "~>20"
1717
},
1818
"repository": {
1919
"type": "git",

fixtures/vendored/yarn/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
},
1111
"engines": {
1212
"yarn": "*",
13-
"node": "~>18"
13+
"node": "~>20"
1414
}
1515
}

manifest.yml

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ include_files:
2424
- profile/newrelic-setup.sh
2525
- profile/nodejs.sh
2626
dependency_deprecation_dates:
27-
- version_line: 18.x.x
28-
name: node
29-
date: 2025-04-30
30-
link: https://github.com/nodejs/Release
3127
- version_line: 20.x.x
3228
name: node
3329
date: 2026-04-30
@@ -45,38 +41,6 @@ dependency_deprecation_dates:
4541
date: 2027-10-24
4642
link: https://www.python.org/dev/peps/pep-0664/
4743
dependencies:
48-
- name: node
49-
version: 18.20.7
50-
uri: https://buildpacks.cloudfoundry.org/dependencies/node/node_18.20.7_linux_x64_cflinuxfs3_3454218f.tgz
51-
sha256: 3454218faa6000ff415b649a35996d3ad7501d726fc30cf03b7bab92f508167c
52-
cf_stacks:
53-
- cflinuxfs3
54-
source: https://nodejs.org/dist/v18.20.7/node-v18.20.7.tar.gz
55-
source_sha256: f2f2f1ac616d8e253ed69cf0b44de7d4843c40d8a614f64c776ee59ff0047031
56-
- name: node
57-
version: 18.20.7
58-
uri: https://buildpacks.cloudfoundry.org/dependencies/node/node_18.20.7_linux_x64_cflinuxfs4_cd7a6534.tgz
59-
sha256: cd7a6534666f4bd23fa31f763b2fdc470be861f39675ca76f46ba9da329b6d78
60-
cf_stacks:
61-
- cflinuxfs4
62-
source: https://nodejs.org/dist/v18.20.7/node-v18.20.7.tar.gz
63-
source_sha256: f2f2f1ac616d8e253ed69cf0b44de7d4843c40d8a614f64c776ee59ff0047031
64-
- name: node
65-
version: 18.20.8
66-
uri: https://buildpacks.cloudfoundry.org/dependencies/node/node_18.20.8_linux_x64_cflinuxfs3_9ebc5f70.tgz
67-
sha256: 9ebc5f707d425f2e4b227c53dc04ea704cd71a2a8b64c7beb23adc3c3880ec82
68-
cf_stacks:
69-
- cflinuxfs3
70-
source: https://nodejs.org/dist/v18.20.8/node-v18.20.8.tar.gz
71-
source_sha256: ec60a6d2344ef9e1f093991ca1bb6bbe92c61c29d1762c4b99e08f87dbb91e2f
72-
- name: node
73-
version: 18.20.8
74-
uri: https://buildpacks.cloudfoundry.org/dependencies/node/node_18.20.8_linux_x64_cflinuxfs4_826e3a8e.tgz
75-
sha256: 826e3a8e94c5ee13162093f750f4b3569f96980b6ccc5818b1346a02d76f08eb
76-
cf_stacks:
77-
- cflinuxfs4
78-
source: https://nodejs.org/dist/v18.20.8/node-v18.20.8.tar.gz
79-
source_sha256: ec60a6d2344ef9e1f093991ca1bb6bbe92c61c29d1762c4b99e08f87dbb91e2f
8044
- name: node
8145
version: 20.19.3
8246
uri: https://buildpacks.cloudfoundry.org/dependencies/node/node_20.19.3_linux_x64_cflinuxfs3_96fdc321.tgz

src/nodejs/integration/versions_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ func testVersions(platform switchblade.Platform, fixtures string) func(*testing.
4141

4242
context("when there is a .nvmrc file", func() {
4343
it.Before(func() {
44-
Expect(os.WriteFile(filepath.Join(source, ".nvmrc"), []byte("18"), 0600)).To(Succeed())
44+
Expect(os.WriteFile(filepath.Join(source, ".nvmrc"), []byte("20"), 0600)).To(Succeed())
4545
})
4646

4747
it("uses the Node version specified in the .nvmrc file", func() {
4848
deployment, logs, err := platform.Deploy.Execute(name, source)
4949
Expect(err).NotTo(HaveOccurred())
5050

5151
Expect(logs).To(ContainLines(
52-
MatchRegexp("Installing node 18\\.\\d+\\.\\d+"),
52+
MatchRegexp("Installing node 20\\.\\d+\\.\\d+"),
5353
))
5454

5555
Eventually(deployment).Should(Serve("Hello world!"))
@@ -63,7 +63,7 @@ func testVersions(platform switchblade.Platform, fixtures string) func(*testing.
6363
}
6464
Expect(json.NewDecoder(response.Body).Decode(&process)).To(Succeed())
6565

66-
Expect(process.Version).To(MatchRegexp(`v18\.\d+\.\d+`))
66+
Expect(process.Version).To(MatchRegexp(`v20\.\d+\.\d+`))
6767
})
6868
})
6969

@@ -76,7 +76,7 @@ func testVersions(platform switchblade.Platform, fixtures string) func(*testing.
7676
Expect(json.NewDecoder(file).Decode(&pkg)).To(Succeed())
7777
Expect(file.Close()).To(Succeed())
7878

79-
pkg["engines"] = map[string]string{"node": "~>18"}
79+
pkg["engines"] = map[string]string{"node": "~>20"}
8080
content, err := json.Marshal(pkg)
8181
Expect(err).NotTo(HaveOccurred())
8282
Expect(os.WriteFile(filepath.Join(source, "package.json"), content, 0600)).To(Succeed())
@@ -87,7 +87,7 @@ func testVersions(platform switchblade.Platform, fixtures string) func(*testing.
8787
Expect(err).NotTo(HaveOccurred())
8888

8989
Expect(logs).To(ContainLines(
90-
MatchRegexp("Installing node 18\\.\\d+\\.\\d+"),
90+
MatchRegexp("Installing node 20\\.\\d+\\.\\d+"),
9191
))
9292

9393
Eventually(deployment).Should(Serve("Hello world!"))
@@ -101,7 +101,7 @@ func testVersions(platform switchblade.Platform, fixtures string) func(*testing.
101101
}
102102
Expect(json.NewDecoder(response.Body).Decode(&process)).To(Succeed())
103103

104-
Expect(process.Version).To(MatchRegexp(`v18\.\d+\.\d+`))
104+
Expect(process.Version).To(MatchRegexp(`v20\.\d+\.\d+`))
105105
})
106106

107107
context("when that version is unsupported", func() {

src/nodejs/supply/supply.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ type Supplier struct {
8383
}
8484

8585
var LTS = map[string]int{
86-
"gallium": 16,
87-
"hydrogen": 18,
86+
"iron": 20,
87+
"jod": 22,
8888
}
8989

9090
func Run(s *Supplier) error {
@@ -727,7 +727,7 @@ func (s *Supplier) InstallNode() error {
727727
}
728728

729729
func nodeVersionRequiresSSLEnvVars(version string) (bool, error) {
730-
// NOTE: ensures OpenSSL CA store works with Node v18 and higher. Waiting
730+
// NOTE: ensures OpenSSL CA store works with Node v20 and higher. Waiting
731731
// for resolution on https://github.com/nodejs/node/issues/43560 to decide
732732
// how to properly fix this.
733733

@@ -736,7 +736,7 @@ func nodeVersionRequiresSSLEnvVars(version string) (bool, error) {
736736
return false, err
737737
}
738738

739-
return nodeVersion.Major() >= 18, nil
739+
return nodeVersion.Major() >= 20, nil
740740
}
741741

742742
func (s *Supplier) InstallNPM() error {

src/nodejs/supply/supply_test.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,8 @@ var _ = Describe("Supply", func() {
279279
defer os.Remove(nvmrcFile)
280280

281281
testCases := [][]string{
282-
{"lts/hydrogen", "18.*.*"},
283-
{"lts/*", "18.*.*"},
282+
{"lts/iron", "20.*.*"},
283+
{"lts/jod", "22.*.*"},
284284
}
285285

286286
for _, testCase := range testCases {
@@ -435,7 +435,7 @@ var _ = Describe("Supply", func() {
435435

436436
Context("given valid .nvmrc", func() {
437437
It("validate should succeed", func() {
438-
validVersions := []string{"11.4", "node", "lts/*", "lts/hydrogen", "10", "10.1.1"}
438+
validVersions := []string{"11.4", "node", "lts/*", "lts/iron", "10", "10.1.1"}
439439
for _, version := range validVersions {
440440
Expect(os.WriteFile(filepath.Join(buildDir, ".nvmrc"), []byte(version), 0777)).To(Succeed())
441441
Expect(supplier.LoadNvmrc()).To(Succeed())
@@ -543,9 +543,9 @@ var _ = Describe("Supply", func() {
543543
})
544544
})
545545

546-
Context("Installing Node >=18", func() {
546+
Context("Installing Node >=20", func() {
547547
It("SSL_CERT_DIR env variable is set", func() {
548-
dep := libbuildpack.Dependency{Name: "node", Version: "18.0.0"}
548+
dep := libbuildpack.Dependency{Name: "node", Version: "20.0.0"}
549549
mockManifest.EXPECT().DefaultVersion("node").Return(dep, nil)
550550
mockManifest.EXPECT().AllDependencyVersions(gomock.Any())
551551
mockInstaller.EXPECT().InstallDependency(dep, nodeDir).Do(installNode).Return(nil)
@@ -564,7 +564,7 @@ var _ = Describe("Supply", func() {
564564
})
565565
})
566566

567-
Context("Installing Node <18", func() {
567+
Context("Installing Node <20", func() {
568568
It("SSL_CERT_DIR env variable is not set", func() {
569569
dep := libbuildpack.Dependency{Name: "node", Version: "16.0.0"}
570570
mockManifest.EXPECT().DefaultVersion("node").Return(dep, nil)
@@ -1344,7 +1344,7 @@ var _ = Describe("Supply", func() {
13441344
})
13451345
})
13461346

1347-
Describe("CreateDefaultEnv for Node <18", func() {
1347+
Describe("CreateDefaultEnv for Node <20", func() {
13481348
BeforeEach(func() {
13491349
supplier.NodeVersion = "16.0.0"
13501350
})
@@ -1421,9 +1421,9 @@ export PATH=$PATH:"$HOME/bin":$NODE_PATH/.bin
14211421
})
14221422
})
14231423

1424-
Describe("CreateDefaultEnv for Node >=18", func() {
1424+
Describe("CreateDefaultEnv for Node >=20", func() {
14251425
BeforeEach(func() {
1426-
supplier.NodeVersion = "18.0.0"
1426+
supplier.NodeVersion = "20.0.0"
14271427
})
14281428

14291429
It("writes an env file for NODE_HOME", func() {

0 commit comments

Comments
 (0)