@platformos/platformos-check-node 0.0.8 → 0.0.9

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
@@ -106,9 +106,16 @@ async function getApp(config) {
106
106
  // as mentioned in the documentation of node-glob
107
107
  // the path is normalised and '\' are replaced with '/' and then passed to the glob function
108
108
  let normalizedGlob = getAppFilesPathPattern(config.rootUri);
109
- const paths = await (0, glob_1.glob)(normalizedGlob, { absolute: true }).then((result) =>
110
- // Global ignored paths should not be part of the app
111
- result.filter((filePath) => !(0, platformos_check_common_1.isIgnored)(filePath, config)));
109
+ const paths = await (0, glob_1.glob)(normalizedGlob, { absolute: true }).then((result) => result.filter((filePath) => {
110
+ // Global ignored paths should not be part of the app
111
+ if ((0, platformos_check_common_1.isIgnored)(filePath, config))
112
+ return false;
113
+ // Only lint .liquid files that belong to a recognized platformOS directory.
114
+ // Generator templates, build artifacts, etc. are excluded.
115
+ if (filePath.endsWith('.liquid') && !(0, platformos_check_common_1.isKnownLiquidFile)(filePath))
116
+ return false;
117
+ return true;
118
+ }));
112
119
  const sourceCodes = await Promise.all(paths.map(toSourceCode));
113
120
  return sourceCodes.filter((x) => x !== undefined);
114
121
  }
@@ -57,7 +57,7 @@ async function createMockNodeModule(tempDir, moduleName, moduleContent = exports
57
57
  return nodeModuleRoot;
58
58
  }
59
59
  async function makeTempWorkspace(structure) {
60
- const root = await promises_1.default.mkdtemp(node_path_1.default.join(__dirname, '..', '.'));
60
+ const root = await promises_1.default.mkdtemp(node_path_1.default.join(node_os_1.default.tmpdir(), 'platformos-check-'));
61
61
  if (!root)
62
62
  throw new Error('Could not create temp dir for temp workspace');
63
63
  await createFiles(structure, [root]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformos/platformos-check-node",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "author": "platformOS",
@@ -33,8 +33,8 @@
33
33
  "type-check": "tsc --noEmit"
34
34
  },
35
35
  "dependencies": {
36
- "@platformos/platformos-check-common": "0.0.8",
37
- "@platformos/platformos-check-docs-updater": "0.0.8",
36
+ "@platformos/platformos-check-common": "0.0.9",
37
+ "@platformos/platformos-check-docs-updater": "0.0.9",
38
38
  "glob": "^13.0.0",
39
39
  "vscode-uri": "^3.1.0",
40
40
  "yaml": "^2.8.2"