Skip to content

Commit a7d565b

Browse files
committed
build: Release handles OTP and CHANGELOG has more info
1 parent fa09304 commit a7d565b

File tree

5 files changed

+31
-2
lines changed

5 files changed

+31
-2
lines changed

.versionrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
types: [
3+
{ type: 'feat', section: 'Features', hidden: false },
4+
{ type: 'fix', section: 'Bug Fixes', hidden: false },
5+
{ type: 'chore', section: 'Internal Changes', hidden: false },
6+
{ type: 'build', section: 'Internal Changes', hidden: false },
7+
{ type: 'chore', section: 'Internal Changes', hidden: false },
8+
],
9+
};

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
},
4545
"devDependencies": {
4646
"@babel/core": "^7.16.0",
47+
"@babel/plugin-transform-runtime": "^7.16.4",
4748
"@babel/preset-env": "^7.16.4",
4849
"@babel/preset-react": "^7.16.0",
4950
"@babel/preset-typescript": "^7.16.0",

rollup.config.js

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ function createConfig(umd) {
2929
'@babel/preset-react',
3030
'@babel/preset-typescript',
3131
],
32+
plugins: ['@babel/plugin-transform-runtime'],
3233
include: ['src/**/*'],
3334
}),
3435
replace({

scripts/release.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ A token can be created at:
102102
loggedCommand("yarn rimraf dist");
103103
loggedCommand("yarn rollup -c rollup.config.js");
104104
loggedCommand("yarn tsc -p tsconfig.typedefs.json");
105-
loggedCommand(`yarn standard-version --preset angular${type}${prerelease}`);
105+
loggedCommand(`yarn standard-version${type}${prerelease}`);
106106

107107
const { version } = JSON.parse(
108108
readFileSync(join(process.cwd(), "package.json"), "utf8")
@@ -115,7 +115,13 @@ A token can be created at:
115115

116116
const releaseNotes = await getReleaseNotes(version);
117117

118-
loggedCommand("npm publish");
118+
const { opt } = await inquirer.prompt<{ opt: string }>({
119+
type: "input",
120+
name: "opt",
121+
message: "One Time Password (required to publish to npm)",
122+
});
123+
124+
loggedCommand(`npm publish --otp ${opt}`);
119125
loggedCommand("git push --follow-tags origin main");
120126
const octokit = new Octokit({ auth: GITHUB_TOKEN });
121127
const response = await octokit.request(

yarn.lock

+12
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,18 @@
770770
dependencies:
771771
"@babel/helper-plugin-utils" "^7.14.5"
772772

773+
"@babel/plugin-transform-runtime@^7.16.4":
774+
version "7.16.4"
775+
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.4.tgz#f9ba3c7034d429c581e1bd41b4952f3db3c2c7e8"
776+
integrity sha512-pru6+yHANMTukMtEZGC4fs7XPwg35v8sj5CIEmE+gEkFljFiVJxEWxx/7ZDkTK+iZRYo1bFXBtfIN95+K3cJ5A==
777+
dependencies:
778+
"@babel/helper-module-imports" "^7.16.0"
779+
"@babel/helper-plugin-utils" "^7.14.5"
780+
babel-plugin-polyfill-corejs2 "^0.3.0"
781+
babel-plugin-polyfill-corejs3 "^0.4.0"
782+
babel-plugin-polyfill-regenerator "^0.3.0"
783+
semver "^6.3.0"
784+
773785
"@babel/plugin-transform-shorthand-properties@^7.16.0":
774786
version "7.16.0"
775787
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.0.tgz#090372e3141f7cc324ed70b3daf5379df2fa384d"

0 commit comments

Comments
 (0)