Skip to content

Commit

Permalink
29.1.17
Browse files Browse the repository at this point in the history
  • Loading branch information
dmail committed Oct 7, 2022
1 parent 0da89d1 commit 096a7f7
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 29.1.17

- Pass (urlInfo, context) to jsenvPluginGlobals

# 29.1.16

- Add "findDependent(urlInfo, callback)" to context.urlGraph
Expand Down
4 changes: 2 additions & 2 deletions dist/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29978,7 +29978,7 @@ const jsenvPluginInjectGlobals = urlAssociations => {
return {
name: "jsenv:inject_globals",
appliesDuring: "*",
transformUrlContent: async urlInfo => {
transformUrlContent: async (urlInfo, context) => {
const url = Object.keys(urlAssociations).find(url => {
return url === urlInfo.url;
});
Expand All @@ -29990,7 +29990,7 @@ const jsenvPluginInjectGlobals = urlAssociations => {
let globals = urlAssociations[url];

if (typeof globals === "function") {
globals = await globals();
globals = await globals(urlInfo, context);
}

if (Object.keys(globals).length === 0) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jsenv/core",
"version": "29.1.16",
"version": "29.1.17",
"description": "Tool to develop, test and build js projects",
"license": "MIT",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jsenv/demo-node-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"devDependencies": {
"@jsenv/assert": "2.7.0",
"@jsenv/core": "29.1.16",
"@jsenv/core": "29.1.17",
"@jsenv/eslint-config": "16.2.4",
"@jsenv/eslint-import-resolver": "0.3.1",
"eslint": "8.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jsenv/demo-web-preact/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@babel/plugin-syntax-import-assertions": "7.18.6",
"@babel/plugin-transform-react-jsx": "7.19.0",
"@jsenv/assert": "2.7.0",
"@jsenv/core": "29.1.16",
"@jsenv/core": "29.1.17",
"@jsenv/plugin-preact": "1.1.0",
"@jsenv/eslint-config": "16.2.4",
"@jsenv/eslint-import-resolver": "0.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jsenv/demo-web-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@babel/plugin-syntax-import-assertions": "7.18.6",
"@babel/plugin-transform-react-jsx": "7.19.0",
"@jsenv/assert": "2.7.0",
"@jsenv/core": "29.1.16",
"@jsenv/core": "29.1.17",
"@jsenv/plugin-react": "1.1.1",
"@jsenv/eslint-config": "16.2.4",
"@jsenv/eslint-import-resolver": "0.3.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jsenv/demo-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@babel/eslint-parser": "7.19.1",
"@babel/plugin-syntax-import-assertions": "7.18.6",
"@jsenv/assert": "2.7.0",
"@jsenv/core": "29.1.16",
"@jsenv/core": "29.1.17",
"@jsenv/eslint-config": "16.2.4",
"@jsenv/eslint-import-resolver": "0.3.1",
"eslint": "8.24.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-jsenv/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-jsenv",
"version": "1.2.43",
"version": "1.2.44",
"description": "jsenv npm initializer",
"license": "MIT",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/inject_globals/jsenv_plugin_inject_globals.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const jsenvPluginInjectGlobals = (urlAssociations) => {
return {
name: "jsenv:inject_globals",
appliesDuring: "*",
transformUrlContent: async (urlInfo) => {
transformUrlContent: async (urlInfo, context) => {
const url = Object.keys(urlAssociations).find((url) => {
return url === urlInfo.url
})
Expand All @@ -13,7 +13,7 @@ export const jsenvPluginInjectGlobals = (urlAssociations) => {
}
let globals = urlAssociations[url]
if (typeof globals === "function") {
globals = await globals()
globals = await globals(urlInfo, context)
}
if (Object.keys(globals).length === 0) {
return null
Expand Down

0 comments on commit 096a7f7

Please sign in to comment.