@prairielearn/run 1.0.8 → 1.0.10

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @prairielearn/run
2
2
 
3
+ ## 1.0.10
4
+
5
+ ### Patch Changes
6
+
7
+ - be4444e: Upgrade all JavaScript dependencies
8
+
9
+ ## 1.0.9
10
+
11
+ ### Patch Changes
12
+
13
+ - cec09b5: Upgrade all JavaScript dependencies
14
+
3
15
  ## 1.0.8
4
16
 
5
17
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import { assert } from 'chai';
1
+ import { assert, describe, it } from 'vitest';
2
2
  import { run } from './index.js';
3
3
  describe('run', () => {
4
4
  it('runs a function', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAE9B,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { assert } from 'chai';\n\nimport { run } from './index.js';\n\ndescribe('run', () => {\n it('runs a function', () => {\n const result = run(() => 1);\n assert.equal(result, 1);\n });\n\n it('runs an async function', async () => {\n const result = await run(async () => 1);\n assert.equal(result, 1);\n });\n});\n"]}
1
+ {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../src/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAC;AAEjC,QAAQ,CAAC,KAAK,EAAE,GAAG,EAAE;IACnB,EAAE,CAAC,iBAAiB,EAAE,GAAG,EAAE;QACzB,MAAM,MAAM,GAAG,GAAG,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wBAAwB,EAAE,KAAK,IAAI,EAAE;QACtC,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QACxC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { assert, describe, it } from 'vitest';\n\nimport { run } from './index.js';\n\ndescribe('run', () => {\n it('runs a function', () => {\n const result = run(() => 1);\n assert.equal(result, 1);\n });\n\n it('runs an async function', async () => {\n const result = await run(async () => 1);\n assert.equal(result, 1);\n });\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prairielearn/run",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -11,26 +11,14 @@
11
11
  "scripts": {
12
12
  "build": "tsc",
13
13
  "dev": "tsc --watch --preserveWatchOutput",
14
- "test": "c8 mocha src/**/*.test.ts"
14
+ "test": "vitest run --coverage"
15
15
  },
16
16
  "devDependencies": {
17
17
  "@prairielearn/tsconfig": "^0.0.0",
18
- "@types/node": "^20.17.30",
19
- "c8": "^10.1.3",
20
- "chai": "^5.2.0",
21
- "mocha": "^11.1.0",
22
- "tsx": "^4.19.3",
23
- "typescript": "^5.8.3"
24
- },
25
- "c8": {
26
- "reporter": [
27
- "html",
28
- "text-summary",
29
- "cobertura"
30
- ],
31
- "all": true,
32
- "include": [
33
- "src/**"
34
- ]
18
+ "@types/node": "^20.17.57",
19
+ "@vitest/coverage-v8": "^3.1.4",
20
+ "tsx": "^4.19.4",
21
+ "typescript": "^5.8.3",
22
+ "vitest": "^3.1.4"
35
23
  }
36
24
  }
package/src/index.test.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { assert } from 'chai';
1
+ import { assert, describe, it } from 'vitest';
2
2
 
3
3
  import { run } from './index.js';
4
4
 
package/tsconfig.json CHANGED
@@ -3,6 +3,6 @@
3
3
  "compilerOptions": {
4
4
  "outDir": "./dist",
5
5
  "rootDir": "./src",
6
- "types": ["mocha", "node"]
6
+ "types": ["node"]
7
7
  }
8
8
  }
@@ -0,0 +1,11 @@
1
+ import { defineConfig } from 'vitest/config';
2
+
3
+ export default defineConfig({
4
+ test: {
5
+ coverage: {
6
+ reporter: ['html', 'text-summary', 'cobertura'],
7
+ all: true,
8
+ include: ['src/**'],
9
+ },
10
+ },
11
+ });