@lsst/pik-plugin-select 0.6.6 → 0.6.7

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/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Command } from "commander";
2
2
  import pc from "picocolors";
3
- import { relative, extname } from "path";
3
+ import { relative } from "path";
4
4
  import { Parser, loadConfig, SingleSwitcher } from "@lsst/pik-core";
5
5
  import { readFile, writeFile } from "fs/promises";
6
6
  import { glob } from "glob";
@@ -87,8 +87,7 @@ const setCommand = new Command("set").description("Set a specific option for a s
87
87
  const selector = file.selectors.find((s) => s.name === selectorName);
88
88
  if (selector) {
89
89
  found = true;
90
- const extension = extname(file.path);
91
- const switcher = SingleSwitcher.forExtension(extension);
90
+ const switcher = SingleSwitcher.forFilePath(file.path);
92
91
  try {
93
92
  const newContent = switcher.switch(file.content, selector, optionName);
94
93
  await writeFile(file.path, newContent);
@@ -1 +1 @@
1
- {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,aAAa,CAAC;AAErB,eAAO,MAAM,UAAU,SA8CnB,CAAC"}
1
+ {"version":3,"file":"set.d.ts","sourceRoot":"","sources":["../../../src/lib/commands/set.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAMpC,OAAO,aAAa,CAAC;AAErB,eAAO,MAAM,UAAU,SA6CnB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lsst/pik-plugin-select",
3
- "version": "0.6.6",
3
+ "version": "0.6.7",
4
4
  "description": "Config selector plugin for pik CLI",
5
5
  "type": "module",
6
6
  "license": "MIT",