diff options
author | 2022-07-18 13:12:03 -0700 | |
---|---|---|
committer | 2022-07-18 13:12:03 -0700 | |
commit | d2874f6a4931e4e6790f7859ec48d78735932402 (patch) | |
tree | e9c4171494e6a6237a1924ce0bfd3c9a47b805c7 | |
parent | a1a0c1847805691ec9398eeff6545119a5ad6566 (diff) | |
download | bun-d2874f6a4931e4e6790f7859ec48d78735932402.tar.gz bun-d2874f6a4931e4e6790f7859ec48d78735932402.tar.zst bun-d2874f6a4931e4e6790f7859ec48d78735932402.zip |
bump examples
-rw-r--r-- | examples/blank/package.json | 12 | ||||
-rw-r--r-- | examples/bun-bakery/package.json | 2 | ||||
-rw-r--r-- | examples/discord-interactions/package.json | 2 | ||||
-rw-r--r-- | examples/hono/package.json | 6 | ||||
-rw-r--r-- | examples/next/package.json | 6 | ||||
-rw-r--r-- | examples/react/package.json | 2 | ||||
-rw-r--r-- | misctools/package.json | 5 | ||||
-rw-r--r-- | misctools/publish-examples.js | 24 |
8 files changed, 36 insertions, 23 deletions
diff --git a/examples/blank/package.json b/examples/blank/package.json index 19ccf7f7f..6b117a8c8 100644 --- a/examples/blank/package.json +++ b/examples/blank/package.json @@ -1,8 +1,8 @@ { - "version": "1.0.0", - "name": "@bun-examples/blank", - "main": "src/index.js", - "devDependencies": { - "bun-types": "latest" - } + "name": "@bun-examples/blank", + "version": "0.0.3", + "module": "src/index.js", + "devDependencies": { + "bun-types": "latest" + } } diff --git a/examples/bun-bakery/package.json b/examples/bun-bakery/package.json index 09adae1b0..8723376db 100644 --- a/examples/bun-bakery/package.json +++ b/examples/bun-bakery/package.json @@ -1,5 +1,5 @@ { - "version": "1.0.0", + "version": "1.0.4", "name": "@bun-examples/bun-bakery", "dependencies": { "@kapsonfire/bun-bakery": "^0.2.0" diff --git a/examples/discord-interactions/package.json b/examples/discord-interactions/package.json index 5f5213622..faf7f85d4 100644 --- a/examples/discord-interactions/package.json +++ b/examples/discord-interactions/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.5", + "version": "0.0.9", "name": "@bun-examples/discord-interactions", "dependencies": { "slash-create": "^5.7.0" diff --git a/examples/hono/package.json b/examples/hono/package.json index e9929247c..7e99418db 100644 --- a/examples/hono/package.json +++ b/examples/hono/package.json @@ -1,7 +1,6 @@ { - "version": "1.0.2", + "version": "1.0.4", "name": "@bun-examples/hono", - "main": "src/index.js", "devDependencies": { "bun-types": "latest" }, @@ -10,5 +9,6 @@ }, "scripts": { "start": "bun run src/index.ts" - } + }, + "module": "src/index.js" } diff --git a/examples/next/package.json b/examples/next/package.json index 870dc2c34..5762fb7b8 100644 --- a/examples/next/package.json +++ b/examples/next/package.json @@ -1,7 +1,6 @@ { "name": "@bun-examples/next", - "version": "0.0.53", - "main": "index.js", + "version": "0.0.57", "dependencies": { "next": "^12.1.0", "react": "^18", @@ -17,5 +16,6 @@ "postinstall": [ "bun bun --use next" ] - } + }, + "module": "index.js" } diff --git a/examples/react/package.json b/examples/react/package.json index c3b93c592..fa7ac4c93 100644 --- a/examples/react/package.json +++ b/examples/react/package.json @@ -1,6 +1,6 @@ { "name": "@bun-examples/react", - "version": "0.1.0", + "version": "0.1.2", "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/misctools/package.json b/misctools/package.json index b03b5e908..18a85e85e 100644 --- a/misctools/package.json +++ b/misctools/package.json @@ -5,6 +5,7 @@ "license": "MIT", "devDependencies": { "@unicode/unicode-13.0.0": "^1.2.1", - "@unicode/unicode-3.0.0": "^1.2.1" + "@unicode/unicode-3.0.0": "^1.2.1", + "semver": "^7.3.7" } -} +}
\ No newline at end of file diff --git a/misctools/publish-examples.js b/misctools/publish-examples.js index b774e234f..d84466e15 100644 --- a/misctools/publish-examples.js +++ b/misctools/publish-examples.js @@ -77,20 +77,32 @@ for (let folder of examplesFolderEntries) { } catch (exception) {} restart: while (retryCount-- > 0) { - packageJSON.version = version; + packageJSON.version = require("semver").inc(packageJSON.version, "patch"); if ("private" in packageJSON) delete packageJSON.private; if ("license" in packageJSON) delete packageJSON.license; + if ("main" in packageJSON && !("module" in packageJSON)) { + packageJSON.module = packageJSON.main; + delete packageJSON.main; + } fs.writeFileSync( path.join(absolute, "package.json"), JSON.stringify(packageJSON, null, 2) ); - exec(`npm version patch --force`, { cwd: absolute }); + try { + exec(`npm version patch --force --no-commit-hooks --no-git-tag-version`, { + cwd: absolute, + }); - packageJSON = JSON.parse( - fs.readFileSync(path.join(absolute, "package.json"), "utf8") - ); - version = packageJSON.version; + packageJSON = JSON.parse( + fs.readFileSync(path.join(absolute, "package.json"), "utf8") + ); + version = packageJSON.version; + } catch (e) { + if (e.code !== "E404") { + throw e; + } + } try { exec( |