@zhouchangui/math-ati 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/bin/math-ati.js +3 -1
  2. package/package.json +1 -1
package/bin/math-ati.js CHANGED
@@ -12,8 +12,10 @@ const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '
12
12
  const templateRoot = path.join(packageRoot, 'templates', 'workspace');
13
13
  const requireFromCli = createRequire(import.meta.url);
14
14
  const execFileAsync = promisify(execFile);
15
+ const packageJson = JSON.parse(await readFile(path.join(packageRoot, 'package.json'), 'utf8'));
15
16
  const DEFAULT_CURRICULUM_ID = 'rj-7a';
16
17
  const DEFAULT_CURRICULUM_PACKAGE = '@zhouchangui/math-ati-curriculum-rj-7a';
18
+ const DEFAULT_CURRICULUM_PACKAGE_SPEC = `${DEFAULT_CURRICULUM_PACKAGE}@${packageJson.version}`;
17
19
 
18
20
  function printHelp() {
19
21
  console.log(`math-ati
@@ -180,7 +182,7 @@ async function resolveCurriculumDataRoot(flags) {
180
182
 
181
183
  const spec = flags['curriculum-package']
182
184
  || process.env.MATH_ATI_CURRICULUM_PACKAGE_SPEC
183
- || DEFAULT_CURRICULUM_PACKAGE;
185
+ || DEFAULT_CURRICULUM_PACKAGE_SPEC;
184
186
  const packageName = packageNameFromSpec(spec);
185
187
  let curriculumPackageRoot = await localCurriculumPackageRoot(packageName);
186
188
  let installed = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhouchangui/math-ati",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Local ATI math learning loop for printable practice, PDF grading, and mastery tracking.",
5
5
  "type": "module",
6
6
  "bin": {