bonkers-ui 1.0.46 → 1.0.47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -22,7 +22,7 @@ jobs:
22
22
  - run: yarn lint:script
23
23
  - run: yarn lint:style
24
24
  - run: yarn test
25
- - uses: mikeal/merge-release@master
25
+ - run: node publish.js
26
26
  env:
27
27
  GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28
28
  NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
package/package.json CHANGED
@@ -1,76 +1,78 @@
1
1
  {
2
- "name": "bonkers-ui",
3
- "version": "1.0.46",
4
- "private": false,
5
- "scripts": {
6
- "storybook": "storybook dev -p 6006",
7
- "build-storybook": "storybook build",
8
- "lint:script": "eslint --fix './src/**/*.{ts,tsx,vue}'",
9
- "lint:style": "stylelint --fix './src/**/*.{css,scss,vue}'",
10
- "lint:markup": "vue-tsc --noEmit",
11
- "deploy": "gh-pages -d storybook-static",
12
- "typecheck": "tsc --noEmit && vue-tsc --noEmit",
13
- "test": "vitest run",
14
- "i": "yarn install --frozen-lockfile"
15
- },
16
- "dependencies": {
17
- "@fortawesome/fontawesome-svg-core": "^6.4.0",
18
- "@fortawesome/free-brands-svg-icons": "^6.4.0",
19
- "@fortawesome/free-regular-svg-icons": "^6.4.0",
20
- "@fortawesome/free-solid-svg-icons": "^6.4.0",
21
- "@fortawesome/vue-fontawesome": "^3.0.3",
22
- "storybook-addon-designs": "^6.3.1",
23
- "vue": "^3.2.47",
24
- "vue-router": "^4.1.6"
25
- },
26
- "devDependencies": {
27
- "@storybook/addon-essentials": "^7.0.4",
28
- "@storybook/addon-links": "^7.0.4",
29
- "@storybook/addon-mdx-gfm": "^7.0.4",
30
- "@storybook/vue3": "^7.0.4",
31
- "@storybook/vue3-vite": "^7.0.4",
32
- "@typescript-eslint/eslint-plugin": "^5.58.0",
33
- "@typescript-eslint/parser": "^5.58.0",
34
- "@vitejs/plugin-vue": "^4.1.0",
35
- "@vue/eslint-config-typescript": "^11.0.2",
36
- "@vue/test-utils": "^2.3.2",
37
- "eslint": "8.38.0",
38
- "eslint-plugin-storybook": "^0.6.11",
39
- "eslint-plugin-vue": "^9.10.0",
40
- "gh-pages": "^5.0.0",
41
- "husky": "4.3.8",
42
- "jsdom": "^21.1.1",
43
- "lint-staged": "^13.2.1",
44
- "postcss": "^8.4.21",
45
- "postcss-html": "^1.4.1",
46
- "react": "^18.2.0",
47
- "react-dom": "^18.2.0",
48
- "storybook": "^7.0.4",
49
- "storybook-tailwind-dark-mode": "^1.0.16",
50
- "stylelint": "^15.4.0",
51
- "stylelint-config-recommended": "^11.0.0",
52
- "stylelint-config-recommended-vue": "^1.4.0",
53
- "stylelint-config-standard": "^32.0.0",
54
- "tailwindcss": "^3.3.1",
55
- "ts-node": "^10.9.1",
56
- "typescript": "^5.0.4",
57
- "vite": "^4.2.1",
58
- "vitest": "^0.30.1",
59
- "vue-eslint-parser": "^9.1.1",
60
- "vue-loader": "^17.0.1",
61
- "vue-tsc": "^1.2.0"
62
- },
63
- "lint-staged": {
64
- "*.{ts,tsx,vue}": [
65
- "eslint --fix",
66
- "bash -c 'yarn typecheck'"
67
- ],
68
- "*.{css,vue,tsx}": "stylelint --fix"
69
- },
70
- "husky": {
71
- "hooks": {
72
- "pre-commit": "yarn typecheck && yarn lint-staged && yarn test"
73
- }
74
- },
75
- "license": "MIT"
76
- }
2
+ "name": "bonkers-ui",
3
+ "version": "v1.0.47",
4
+ "private": false,
5
+ "scripts": {
6
+ "storybook": "storybook dev -p 6006",
7
+ "build-storybook": "storybook build",
8
+ "lint:script": "eslint --fix './src/**/*.{ts,tsx,vue}'",
9
+ "lint:style": "stylelint --fix './src/**/*.{css,scss,vue}'",
10
+ "lint:markup": "vue-tsc --noEmit",
11
+ "deploy": "gh-pages -d storybook-static",
12
+ "typecheck": "tsc --noEmit && vue-tsc --noEmit",
13
+ "test": "vitest run",
14
+ "i": "yarn install --frozen-lockfile"
15
+ },
16
+ "dependencies": {
17
+ "@fortawesome/fontawesome-svg-core": "^6.4.0",
18
+ "@fortawesome/free-brands-svg-icons": "^6.4.0",
19
+ "@fortawesome/free-regular-svg-icons": "^6.4.0",
20
+ "@fortawesome/free-solid-svg-icons": "^6.4.0",
21
+ "@fortawesome/vue-fontawesome": "^3.0.3",
22
+ "bent": "^7.3.12",
23
+ "simple-git": "^3.18.0",
24
+ "storybook-addon-designs": "^6.3.1",
25
+ "vue": "^3.2.47",
26
+ "vue-router": "^4.1.6"
27
+ },
28
+ "devDependencies": {
29
+ "@storybook/addon-essentials": "^7.0.4",
30
+ "@storybook/addon-links": "^7.0.4",
31
+ "@storybook/addon-mdx-gfm": "^7.0.4",
32
+ "@storybook/vue3": "^7.0.4",
33
+ "@storybook/vue3-vite": "^7.0.4",
34
+ "@typescript-eslint/eslint-plugin": "^5.58.0",
35
+ "@typescript-eslint/parser": "^5.58.0",
36
+ "@vitejs/plugin-vue": "^4.1.0",
37
+ "@vue/eslint-config-typescript": "^11.0.2",
38
+ "@vue/test-utils": "^2.3.2",
39
+ "eslint": "8.38.0",
40
+ "eslint-plugin-storybook": "^0.6.11",
41
+ "eslint-plugin-vue": "^9.10.0",
42
+ "gh-pages": "^5.0.0",
43
+ "husky": "4.3.8",
44
+ "jsdom": "^21.1.1",
45
+ "lint-staged": "^13.2.1",
46
+ "postcss": "^8.4.21",
47
+ "postcss-html": "^1.4.1",
48
+ "react": "^18.2.0",
49
+ "react-dom": "^18.2.0",
50
+ "storybook": "^7.0.4",
51
+ "storybook-tailwind-dark-mode": "^1.0.16",
52
+ "stylelint": "^15.4.0",
53
+ "stylelint-config-recommended": "^11.0.0",
54
+ "stylelint-config-recommended-vue": "^1.4.0",
55
+ "stylelint-config-standard": "^32.0.0",
56
+ "tailwindcss": "^3.3.1",
57
+ "ts-node": "^10.9.1",
58
+ "typescript": "^5.0.4",
59
+ "vite": "^4.2.1",
60
+ "vitest": "^0.30.1",
61
+ "vue-eslint-parser": "^9.1.1",
62
+ "vue-loader": "^17.0.1",
63
+ "vue-tsc": "^1.2.0"
64
+ },
65
+ "lint-staged": {
66
+ "*.{ts,tsx,vue}": [
67
+ "eslint --fix",
68
+ "bash -c 'yarn typecheck'"
69
+ ],
70
+ "*.{css,vue,tsx}": "stylelint --fix"
71
+ },
72
+ "husky": {
73
+ "hooks": {
74
+ "pre-commit": "yarn typecheck && yarn lint-staged && yarn test"
75
+ }
76
+ },
77
+ "license": "MIT"
78
+ }
package/publish.js ADDED
@@ -0,0 +1,45 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const { execSync } = require("child_process");
4
+
5
+ const DIR_VARIABLE = path.join(process.cwd(), "./");
6
+ const VERSION_TO_UPDATE = "patch";
7
+
8
+ const setVersionToJson = version => {
9
+ const json = JSON.parse(fs.readFileSync(path.join(DIR_VARIABLE, "package.json"), "utf8"));
10
+
11
+ json.version = version;
12
+
13
+ fs.writeFileSync(path.join(DIR_VARIABLE, "package.json"), JSON.stringify(json, null, 4));
14
+ };
15
+
16
+ const run = async () => {
17
+ if (!process.env.NPM_AUTH_TOKEN) throw new Error("Merge-release requires NPM_AUTH_TOKEN");
18
+
19
+ const pkg = require(path.join(DIR_VARIABLE, "package.json"));
20
+
21
+ const currentVersion = execSync(`npm view ${pkg.name} version`, { cwd: DIR_VARIABLE }).toString();
22
+ setVersionToJson(currentVersion);
23
+
24
+ let newVersion = execSync(`npm version --no-git-tag-version ${VERSION_TO_UPDATE}`, { cwd: DIR_VARIABLE }).toString();
25
+ newVersion = newVersion.replace(/(\r\n|\n|\r)/gm, "");
26
+
27
+ setVersionToJson(newVersion);
28
+
29
+ console.log("new version:", newVersion);
30
+
31
+ execSync(`npm config set _authToken=${process.env.NPM_AUTH_TOKEN}`);
32
+ execSync(`npm publish --verbose`, DIR_VARIABLE);
33
+ execSync(`git checkout package.json`);
34
+
35
+ execSync(`git tag ${newVersion}`);
36
+
37
+ execSync("git push --tags");
38
+
39
+ };
40
+
41
+ try{
42
+ run();
43
+ }catch(e){
44
+ console.error(e, "<------=");
45
+ }