@harperfast/template-vue-studio 1.4.3 → 1.4.4

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.
@@ -0,0 +1,23 @@
1
+ import js from '@eslint/js';
2
+ import globals from 'globals';
3
+
4
+ export default [
5
+ js.configs.recommended,
6
+ {
7
+ languageOptions: {
8
+ globals: {
9
+ ...globals.browser,
10
+ ...globals.node,
11
+ },
12
+ ecmaVersion: 'latest',
13
+ sourceType: 'module',
14
+ },
15
+ rules: {
16
+ 'no-unused-vars': 'warn',
17
+ 'no-console': 'off',
18
+ },
19
+ },
20
+ {
21
+ ignores: ['node_modules/'],
22
+ },
23
+ ];
package/package.json CHANGED
@@ -1,16 +1,20 @@
1
1
  {
2
2
  "name": "@harperfast/template-vue-studio",
3
- "version": "1.4.3",
3
+ "version": "1.4.4",
4
4
  "type": "module",
5
5
  "repository": "github:HarperFast/create-harper",
6
6
  "scripts": {},
7
7
  "devDependencies": {
8
+ "@eslint/js": "^10.0.1",
8
9
  "@harperfast/vite-plugin": "^0.0.1",
9
- "@vitejs/plugin-vue": "^6.0.0",
10
+ "@vitejs/plugin-vue": "^6.0.4",
10
11
  "dotenv-cli": "^11.0.0",
11
- "harperdb": "^4.7.17",
12
+ "eslint": "^10.0.2",
13
+ "globals": "^17.4.0",
14
+ "harperdb": "^4.7.20",
15
+ "prettier": "^3.8.1",
12
16
  "vite": "npm:rolldown-vite@7.3.1",
13
- "vue": "^3.5.13"
17
+ "vue": "^3.5.29"
14
18
  },
15
19
  "overrides": {
16
20
  "vite": "npm:rolldown-vite@7.3.1"
package/src/App.vue CHANGED
@@ -3,10 +3,11 @@ import typescriptLogo from '/typescript.svg';
3
3
  import viteLogo from '/vite.svg';
4
4
  import vueLogo from '/vue.svg';
5
5
  import { ref } from 'vue';
6
+ import { increment } from './counter.js';
6
7
 
7
8
  const counter = ref(0);
8
9
  const countUp = () => {
9
- counter.value++;
10
+ counter.value = increment(counter.value);
10
11
  };
11
12
  </script>
12
13
 
package/src/counter.js ADDED
@@ -0,0 +1,7 @@
1
+ export function increment(value) {
2
+ return value + 1;
3
+ }
4
+
5
+ export function decrement(value) {
6
+ return value - 1;
7
+ }
@@ -0,0 +1,15 @@
1
+ import assert from 'node:assert/strict';
2
+ import { test } from 'node:test';
3
+ import { decrement, increment } from '../src/counter.js';
4
+
5
+ test('increment function', () => {
6
+ assert.strictEqual(increment(0), 1);
7
+ assert.strictEqual(increment(1), 2);
8
+ assert.strictEqual(increment(-1), 0);
9
+ });
10
+
11
+ test('decrement function', () => {
12
+ assert.strictEqual(decrement(0), -1);
13
+ assert.strictEqual(decrement(1), 0);
14
+ assert.strictEqual(decrement(-1), -2);
15
+ });