stimulus
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -1,1 +0,29 @@ | ||
export * from '@hotwired/stimulus-webpack-helpers'; | ||
/* | ||
Stimulus Webpack Helpers 1.0.0 | ||
Copyright © 2021 Basecamp, LLC | ||
*/ | ||
function definitionsFromContext(context) { | ||
return context.keys() | ||
.map((key) => definitionForModuleWithContextAndKey(context, key)) | ||
.filter((value) => value); | ||
} | ||
function definitionForModuleWithContextAndKey(context, key) { | ||
const identifier = identifierForContextKey(key); | ||
if (identifier) { | ||
return definitionForModuleAndIdentifier(context(key), identifier); | ||
} | ||
} | ||
function definitionForModuleAndIdentifier(module, identifier) { | ||
const controllerConstructor = module.default; | ||
if (typeof controllerConstructor == "function") { | ||
return { identifier, controllerConstructor }; | ||
} | ||
} | ||
function identifierForContextKey(key) { | ||
const logicalName = (key.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/) || [])[1]; | ||
if (logicalName) { | ||
return logicalName.replace(/_/g, "-").replace(/\//g, "--"); | ||
} | ||
} | ||
export { definitionForModuleAndIdentifier, definitionForModuleWithContextAndKey, definitionsFromContext, identifierForContextKey }; |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hotwired/stimulus-webpack-helpers')) : | ||
typeof define === 'function' && define.amd ? define(['exports', '@hotwired/stimulus-webpack-helpers'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.StimulusWebpackHelpers = {}, global.stimulusWebpackHelpers)); | ||
})(this, (function (exports, stimulusWebpackHelpers) { 'use strict'; | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.StimulusWebpackHelpers = {})); | ||
})(this, (function (exports) { 'use strict'; | ||
Object.keys(stimulusWebpackHelpers).forEach(function (k) { | ||
if (k !== 'default' && !exports.hasOwnProperty(k)) Object.defineProperty(exports, k, { | ||
enumerable: true, | ||
get: function () { return stimulusWebpackHelpers[k]; } | ||
}); | ||
}); | ||
/* | ||
Stimulus Webpack Helpers 1.0.0 | ||
Copyright © 2021 Basecamp, LLC | ||
*/ | ||
function definitionsFromContext(context) { | ||
return context.keys() | ||
.map((key) => definitionForModuleWithContextAndKey(context, key)) | ||
.filter((value) => value); | ||
} | ||
function definitionForModuleWithContextAndKey(context, key) { | ||
const identifier = identifierForContextKey(key); | ||
if (identifier) { | ||
return definitionForModuleAndIdentifier(context(key), identifier); | ||
} | ||
} | ||
function definitionForModuleAndIdentifier(module, identifier) { | ||
const controllerConstructor = module.default; | ||
if (typeof controllerConstructor == "function") { | ||
return { identifier, controllerConstructor }; | ||
} | ||
} | ||
function identifierForContextKey(key) { | ||
const logicalName = (key.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/) || [])[1]; | ||
if (logicalName) { | ||
return logicalName.replace(/_/g, "-").replace(/\//g, "--"); | ||
} | ||
} | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.definitionForModuleAndIdentifier = definitionForModuleAndIdentifier; | ||
exports.definitionForModuleWithContextAndKey = definitionForModuleWithContextAndKey; | ||
exports.definitionsFromContext = definitionsFromContext; | ||
exports.identifierForContextKey = identifierForContextKey; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
})); |
{ | ||
"name": "stimulus", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Stimulus JavaScript framework", | ||
@@ -16,2 +16,10 @@ "repository": "https://stimulus.hotwired.dev", | ||
"exports": { | ||
".": { | ||
"main": "./dist/stimulus.umd.js", | ||
"browser": "./dist/stimulus.js", | ||
"import": "./dist/stimulus.js", | ||
"module": "./dist/stimulus.js", | ||
"umd": "./dist/stimulus.umd.js", | ||
"types": "./index.d.ts" | ||
}, | ||
"./webpack-helpers": { | ||
@@ -38,3 +46,3 @@ "main": "./dist/webpack-helpers.umd.js", | ||
"dependencies": { | ||
"@hotwired/stimulus": "^3.1.0", | ||
"@hotwired/stimulus": "^3.1.1", | ||
"@hotwired/stimulus-webpack-helpers": "^1.0.0" | ||
@@ -41,0 +49,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
148367
4080
6
Updated@hotwired/stimulus@^3.1.1