diff --git a/.pnp.cjs b/.pnp.cjs index 818ceea..8d17930 100755 --- a/.pnp.cjs +++ b/.pnp.cjs @@ -54,7 +54,7 @@ const RAW_RUNTIME_STATE = ["@types/jest", "npm:29.5.12"],\ ["@types/node", "npm:20.12.3"],\ ["eslint", "npm:8.57.0"],\ - ["typescript", "patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=d69c25"]\ + ["typescript", "patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441"]\ ],\ "linkType": "SOFT"\ }]\ @@ -4076,7 +4076,7 @@ const RAW_RUNTIME_STATE = ["@types/jest", "npm:29.5.12"],\ ["@types/node", "npm:20.12.3"],\ ["eslint", "npm:8.57.0"],\ - ["typescript", "patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=d69c25"]\ + ["typescript", "patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441"]\ ],\ "linkType": "SOFT"\ }]\ @@ -4482,8 +4482,8 @@ const RAW_RUNTIME_STATE = ["icss-utils", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:5.1.0"],\ ["postcss", "npm:8.4.38"],\ ["postcss-modules-extract-imports", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.0.0"],\ - ["postcss-modules-local-by-default", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.4"],\ - ["postcss-modules-scope", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.1"],\ + ["postcss-modules-local-by-default", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.5"],\ + ["postcss-modules-scope", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.2"],\ ["postcss-modules-values", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.0"],\ ["postcss-value-parser", "npm:4.2.0"],\ ["semver", "npm:7.6.0"],\ @@ -7468,17 +7468,17 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["postcss-modules-local-by-default", [\ - ["npm:4.0.4", {\ - "packageLocation": "./.yarn/cache/postcss-modules-local-by-default-npm-4.0.4-8827d7f55a-45790af417.zip/node_modules/postcss-modules-local-by-default/",\ + ["npm:4.0.5", {\ + "packageLocation": "./.yarn/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-b08b01aa7f.zip/node_modules/postcss-modules-local-by-default/",\ "packageDependencies": [\ - ["postcss-modules-local-by-default", "npm:4.0.4"]\ + ["postcss-modules-local-by-default", "npm:4.0.5"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.4", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-local-by-default-virtual-349eeeb448/0/cache/postcss-modules-local-by-default-npm-4.0.4-8827d7f55a-45790af417.zip/node_modules/postcss-modules-local-by-default/",\ + ["virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.5", {\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-local-by-default-virtual-c591a720a1/0/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-b08b01aa7f.zip/node_modules/postcss-modules-local-by-default/",\ "packageDependencies": [\ - ["postcss-modules-local-by-default", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.4"],\ + ["postcss-modules-local-by-default", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:4.0.5"],\ ["@types/postcss", null],\ ["icss-utils", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:5.1.0"],\ ["postcss", "npm:8.4.38"],\ @@ -7493,17 +7493,17 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["postcss-modules-scope", [\ - ["npm:3.1.1", {\ - "packageLocation": "./.yarn/cache/postcss-modules-scope-npm-3.1.1-e7a1c8c946-ca035969eb.zip/node_modules/postcss-modules-scope/",\ + ["npm:3.1.2", {\ + "packageLocation": "./.yarn/cache/postcss-modules-scope-npm-3.1.2-f65121dafd-e4b09460eb.zip/node_modules/postcss-modules-scope/",\ "packageDependencies": [\ - ["postcss-modules-scope", "npm:3.1.1"]\ + ["postcss-modules-scope", "npm:3.1.2"]\ ],\ "linkType": "SOFT"\ }],\ - ["virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.1", {\ - "packageLocation": "./.yarn/__virtual__/postcss-modules-scope-virtual-03658809dd/0/cache/postcss-modules-scope-npm-3.1.1-e7a1c8c946-ca035969eb.zip/node_modules/postcss-modules-scope/",\ + ["virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.2", {\ + "packageLocation": "./.yarn/__virtual__/postcss-modules-scope-virtual-b1b9804321/0/cache/postcss-modules-scope-npm-3.1.2-f65121dafd-e4b09460eb.zip/node_modules/postcss-modules-scope/",\ "packageDependencies": [\ - ["postcss-modules-scope", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.1"],\ + ["postcss-modules-scope", "virtual:01ba615251f33959d1aa5bce72d1c43eb92dd308acfb76af480e19ee2b9993a35273d25b3d9c7c8d62be5ad043fa79768cb1669d9e95e80e8b6dbefe5c0f2d6d#npm:3.1.2"],\ ["@types/postcss", null],\ ["postcss", "npm:8.4.38"],\ ["postcss-selector-parser", "npm:6.0.16"]\ @@ -8488,10 +8488,10 @@ const RAW_RUNTIME_STATE = }]\ ]],\ ["terser", [\ - ["npm:5.30.2", {\ - "packageLocation": "./.yarn/cache/terser-npm-5.30.2-242c8066c6-df671714eb.zip/node_modules/terser/",\ + ["npm:5.30.3", {\ + "packageLocation": "./.yarn/cache/terser-npm-5.30.3-e1ad3ed3b3-f4ee378065.zip/node_modules/terser/",\ "packageDependencies": [\ - ["terser", "npm:5.30.2"],\ + ["terser", "npm:5.30.3"],\ ["@jridgewell/source-map", "npm:0.3.6"],\ ["acorn", "npm:8.11.3"],\ ["commander", "npm:2.20.3"],\ @@ -8522,7 +8522,7 @@ const RAW_RUNTIME_STATE = ["jest-worker", "npm:27.5.1"],\ ["schema-utils", "npm:3.3.0"],\ ["serialize-javascript", "npm:6.0.2"],\ - ["terser", "npm:5.30.2"],\ + ["terser", "npm:5.30.3"],\ ["uglify-js", null],\ ["webpack", "virtual:392517b17731b73aef6cad8a02772f95c43e7d9885644249fb96b9e041816b2c2cbe91c13d3ee45101e86b636e9365c396965ca95b4f0175d94598c522a03f46#npm:5.89.0"]\ ],\ @@ -8552,7 +8552,7 @@ const RAW_RUNTIME_STATE = ["jest-worker", "npm:27.5.1"],\ ["schema-utils", "npm:3.3.0"],\ ["serialize-javascript", "npm:6.0.2"],\ - ["terser", "npm:5.30.2"],\ + ["terser", "npm:5.30.3"],\ ["uglify-js", null],\ ["webpack", "virtual:687efeee7bf930f30b703428582d9cdaf5d9d0d27091f33e56339ce192e31e2777d25a6c4c2caf77238495962f1a355645bb01cc373f3e6ca5683e0b8f27ad75#npm:5.91.0"]\ ],\ @@ -8825,13 +8825,6 @@ const RAW_RUNTIME_STATE = ["typescript", "patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441"]\ ],\ "linkType": "HARD"\ - }],\ - ["patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=d69c25", {\ - "packageLocation": "./.yarn/cache/typescript-patch-3bb5ebae8d-3abea47579.zip/node_modules/typescript/",\ - "packageDependencies": [\ - ["typescript", "patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=d69c25"]\ - ],\ - "linkType": "HARD"\ }]\ ]],\ ["undici-types", [\ diff --git a/.yarn/cache/postcss-modules-local-by-default-npm-4.0.4-8827d7f55a-45790af417.zip b/.yarn/cache/postcss-modules-local-by-default-npm-4.0.4-8827d7f55a-45790af417.zip deleted file mode 100644 index 4fe14f4..0000000 Binary files a/.yarn/cache/postcss-modules-local-by-default-npm-4.0.4-8827d7f55a-45790af417.zip and /dev/null differ diff --git a/.yarn/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-b08b01aa7f.zip b/.yarn/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-b08b01aa7f.zip new file mode 100644 index 0000000..bb05e4f Binary files /dev/null and b/.yarn/cache/postcss-modules-local-by-default-npm-4.0.5-1a623b43f9-b08b01aa7f.zip differ diff --git a/.yarn/cache/postcss-modules-scope-npm-3.1.1-e7a1c8c946-ca035969eb.zip b/.yarn/cache/postcss-modules-scope-npm-3.1.1-e7a1c8c946-ca035969eb.zip deleted file mode 100644 index 5dd02ec..0000000 Binary files a/.yarn/cache/postcss-modules-scope-npm-3.1.1-e7a1c8c946-ca035969eb.zip and /dev/null differ diff --git a/.yarn/cache/postcss-modules-scope-npm-3.1.2-f65121dafd-e4b09460eb.zip b/.yarn/cache/postcss-modules-scope-npm-3.1.2-f65121dafd-e4b09460eb.zip new file mode 100644 index 0000000..9e1ca7b Binary files /dev/null and b/.yarn/cache/postcss-modules-scope-npm-3.1.2-f65121dafd-e4b09460eb.zip differ diff --git a/.yarn/cache/terser-npm-5.30.2-242c8066c6-df671714eb.zip b/.yarn/cache/terser-npm-5.30.3-e1ad3ed3b3-f4ee378065.zip similarity index 55% rename from .yarn/cache/terser-npm-5.30.2-242c8066c6-df671714eb.zip rename to .yarn/cache/terser-npm-5.30.3-e1ad3ed3b3-f4ee378065.zip index 0e117ec..d1be80f 100644 Binary files a/.yarn/cache/terser-npm-5.30.2-242c8066c6-df671714eb.zip and b/.yarn/cache/terser-npm-5.30.3-e1ad3ed3b3-f4ee378065.zip differ diff --git a/.yarn/cache/typescript-npm-5.4.3-702063d215-de4c69f49a.zip b/.yarn/cache/typescript-npm-5.4.3-702063d215-de4c69f49a.zip deleted file mode 100644 index 5a815ac..0000000 Binary files a/.yarn/cache/typescript-npm-5.4.3-702063d215-de4c69f49a.zip and /dev/null differ diff --git a/.yarn/cache/typescript-patch-3bb5ebae8d-3abea47579.zip b/.yarn/cache/typescript-patch-3bb5ebae8d-3abea47579.zip deleted file mode 100644 index 76b7fbd..0000000 Binary files a/.yarn/cache/typescript-patch-3bb5ebae8d-3abea47579.zip and /dev/null differ diff --git a/libcnb/libcnb/src/platform.ts b/libcnb/libcnb/src/platform.ts index a1412a5..be4999a 100644 --- a/libcnb/libcnb/src/platform.ts +++ b/libcnb/libcnb/src/platform.ts @@ -1,5 +1,5 @@ -import { readFile } from 'fs/promises' -import { readdir } from 'fs/promises' +import { readFile } from 'node:fs/promises' +import { readdir } from 'node:fs/promises' import { join } from 'path' export class Platform { diff --git a/libcnb/libcnb/src/run.ts b/libcnb/libcnb/src/run.ts index 4187edc..ef9029c 100644 --- a/libcnb/libcnb/src/run.ts +++ b/libcnb/libcnb/src/run.ts @@ -1,5 +1,4 @@ -import path from 'path' - +import { basename } from 'path' import { Builder } from './build' import { Detector } from './detect' import { ExitHandler } from './exit.handler' @@ -7,7 +6,7 @@ import { build } from './build' import { detect } from './detect' export const run = async (detector: Detector, builder?: Builder) => { - const phase = path.basename(process.argv[1]) + const phase = basename(process.argv[1]) if (!['detect', 'build'].includes(phase)) { ExitHandler.error(new Error(`Unsupported phase ${phase}`)) diff --git a/package.json b/package.json index e3bd730..2c60ae7 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "@types/jest": "29", "@types/node": "20", "eslint": "8.57.0", - "typescript": "5.4.3" + "typescript": "5.2.2" }, "packageManager": "yarn@4.1.1", "schematic": { diff --git a/tsconfig.json b/tsconfig.json index ecd9691..a1cdae8 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,8 @@ "forceConsistentCasingInFileNames": true, "importHelpers": false, "isolatedModules": false, - "moduleResolution": "nodenext", + "module": "NodeNext", + "moduleResolution": "NodeNext", "noFallthroughCasesInSwitch": true, "noImplicitAny": false, "noImplicitReturns": false, @@ -19,12 +20,13 @@ "removeComments": true, "resolveJsonModule": true, "strict": true, - "strictPropertyInitialization": false, "sourceMap": false, - "module": "esnext", - "target": "es2022", - "jsx": "react", - "outDir": "./dist" + "target": "ES2022", + "types": ["node"], + "jsx": "react" }, - "include": ["buildpacks/**/*", "libcnb/**/*"] + "include": [ + "buildpacks/**/*", + "libcnb/**/*" + ] } diff --git a/yarn.lock b/yarn.lock index 190bf87..650b423 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2855,7 +2855,7 @@ __metadata: "@types/jest": "npm:29" "@types/node": "npm:20" eslint: "npm:8.57.0" - typescript: "npm:5.4.3" + typescript: "npm:5.2.2" languageName: unknown linkType: soft @@ -5795,26 +5795,26 @@ __metadata: linkType: hard "postcss-modules-local-by-default@npm:^4.0.3": - version: 4.0.4 - resolution: "postcss-modules-local-by-default@npm:4.0.4" + version: 4.0.5 + resolution: "postcss-modules-local-by-default@npm:4.0.5" dependencies: icss-utils: "npm:^5.0.0" postcss-selector-parser: "npm:^6.0.2" postcss-value-parser: "npm:^4.1.0" peerDependencies: postcss: ^8.1.0 - checksum: 10/45790af417b2ed6ed26e9922724cf3502569995833a2489abcfc2bb44166096762825cc02f6132cc6a2fb235165e76b859f9d90e8a057bc188a1b2c17f2d7af0 + checksum: 10/b08b01aa7f3d1a80bb1a5508ba3a208578fdd2fb6e54e5613fac244a4e014aa7ca639a614859fec93b399e5a6f86938f7690ca60f7e57c4e35b75621d3c07734 languageName: node linkType: hard "postcss-modules-scope@npm:^3.0.0": - version: 3.1.1 - resolution: "postcss-modules-scope@npm:3.1.1" + version: 3.1.2 + resolution: "postcss-modules-scope@npm:3.1.2" dependencies: postcss-selector-parser: "npm:^6.0.4" peerDependencies: postcss: ^8.1.0 - checksum: 10/ca035969eba62cf126864b10d7722e49c0d4f050cbd4618b6e9714d81b879cf4c53a5682501e00f9622e8f4ea6d7d7d53af295ae935fa833e0cc0bda416a287b + checksum: 10/e4b09460ebd041f7d8c9704b426186b918fbc6a35bf287f60af0e448d931272b7d431a6b78df19f27ea05b26e44b3e67aa2fff2586b08598988011e05fb690e3 languageName: node linkType: hard @@ -6682,8 +6682,8 @@ __metadata: linkType: hard "terser@npm:^5.26.0": - version: 5.30.2 - resolution: "terser@npm:5.30.2" + version: 5.30.3 + resolution: "terser@npm:5.30.3" dependencies: "@jridgewell/source-map": "npm:^0.3.3" acorn: "npm:^8.8.2" @@ -6691,7 +6691,7 @@ __metadata: source-map-support: "npm:~0.5.20" bin: terser: bin/terser - checksum: 10/df671714eb9160cc61d340ddbe6e54f66060bc893c2d420090e10df7f1a2e459725a56dc2e547e992c021ad4523b81eabc8f5a551c53505def80b7320a72506a + checksum: 10/f4ee378065a327c85472f351ac232fa47ec84d4f15df7ec58c044b41e3c063cf11aaedd90dcfe9c7f2a6ef01d4aab23deb61622301170dc77d0a8b6a6a83cf5e languageName: node linkType: hard @@ -6898,16 +6898,6 @@ __metadata: languageName: node linkType: hard -"typescript@npm:5.4.3": - version: 5.4.3 - resolution: "typescript@npm:5.4.3" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/de4c69f49a7ad4b1ea66a6dcc8b055ac34eb56af059a069d8988dd811c5e649be07e042e5bf573e8d0ac3ec2f30e6c999aa651cd09f6e9cbc6113749e8b6be20 - languageName: node - linkType: hard - "typescript@patch:typescript@npm%3A5.2.2#optional!builtin": version: 5.2.2 resolution: "typescript@patch:typescript@npm%3A5.2.2#optional!builtin::version=5.2.2&hash=f3b441" @@ -6918,16 +6908,6 @@ __metadata: languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.4.3#optional!builtin": - version: 5.4.3 - resolution: "typescript@patch:typescript@npm%3A5.4.3#optional!builtin::version=5.4.3&hash=d69c25" - bin: - tsc: bin/tsc - tsserver: bin/tsserver - checksum: 10/3abea475798fdf7ee46e75dafc50c85f30fd1e7061559ec2af61646f23d16c91742703f04f0ac55be52f58ca05c02f77404b7b94bbad16278c9a54c9eeb4f4ea - languageName: node - linkType: hard - "undici-types@npm:~5.26.4": version: 5.26.5 resolution: "undici-types@npm:5.26.5"