Skip to content

Commit

Permalink
Merge pull request #32 from Quodatum/dev
Browse files Browse the repository at this point in the history
[fix] package resolution #31
  • Loading branch information
apb2006 committed Jul 24, 2023
2 parents b902763 + 3af3fc9 commit 09a2d60
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/compiler/static_context.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*jshint esversion: 9 */
const processors = require('./processors');
const processors = require('../processors');

exports.StaticContext = function (parent, pos, processor) {
'use strict';
Expand Down
7 changes: 5 additions & 2 deletions lib/compiler/processors.js → lib/processors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
const processors = require('../../processors.json');

const path = require('path');
const processorsPath = require.resolve("../processors.json");
const processors=require(processorsPath);

exports.names= function() {
return Object.keys(processors);
Expand All @@ -11,7 +14,7 @@ exports.namespaces= function(processor) {
const mods = processors[processor].modules;

mods.forEach(function (uri) {
const mod = require("../../" + uri);
const mod = require(path.resolve(processorsPath,"../", uri));
//console.log("procmod: ",uri)
loadpackage(ns, mod);
});
Expand Down
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"author": "Andy Bunce <bunce.andy@gmail.com> (https://github.com/apb2006)",
"name": "@quodatum/xqlint",
"description": "XQuery Quality Checker",
"version": "0.2.4",
"version": "0.2.5",
"keywords": [
"xquery",
"dev",
Expand All @@ -15,7 +15,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/Quodatum/xqlint.git"
"url": "git+https://github.com/Quodatum/xqlint.git"
},
"main": "./lib/xqlint.js",
"xqlint": {
Expand Down Expand Up @@ -54,8 +54,13 @@
"lib": "lib",
"test": "test"
},
"files": [
"processors.json",
"packages/",
"lib/"
],
"license": "Apache-2.0",
"bin": {
"xqlint": "bin/xqlint"
}
}
}

0 comments on commit 09a2d60

Please sign in to comment.