Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

esbuild-plugin-filelastmodified

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-plugin-filelastmodified - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

dist/declare.d.ts

19

dist/index.js

@@ -8,7 +8,2 @@ var __create = Object.create;

var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
var __export = (target, all) => {
__markAsModule(target);
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __reExport = (target, module2, desc) => {

@@ -25,8 +20,7 @@ if (module2 && typeof module2 === "object" || typeof module2 === "function") {

};
__export(exports, {
default: () => src_default
});
// src/index.ts
var import_fs = __toModule(require("fs"));
const PLUGIN_NAMESPACE = "fileLastModified";
const onResolve = (args) => {
var PLUGIN_NAMESPACE = "fileLastModified";
var onResolve = (args) => {
return {

@@ -37,3 +31,3 @@ path: args.importer,

};
const onLoad = async (args) => {
var onLoad = async (args) => {
const s = await import_fs.default.promises.stat(args.path);

@@ -45,3 +39,3 @@ const fileLastModified = s.mtimeMs.toString();

};
const plugin = (options) => {
var plugin = (options) => {
const { identifier = /__fileLastModified__/ } = options || {};

@@ -56,3 +50,2 @@ return {

};
var src_default = plugin;
module.exports = plugin;
{
"name": "esbuild-plugin-filelastmodified",
"version": "2.0.0",
"version": "2.0.1",
"description": "A esbuild plugin to import the last time the file has been modified.",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"main": "./dist",
"browser": "./dist/index.js",
"module": "./dist/index.mjs",
"files": [
"dist"
],
"scripts": {
"test": "npm run build && cd test && mocha 'index.js' --no-timeout --exit",
"dev": "node build.js",
"build": "cross-env NODE_ENV=production && node build.js"
"test": "cd test && mocha 'index.js' --no-timeout --exit",
"build": "ts-node bundle.ts && tsc --emitDeclarationOnly --outDir dist",
"prepublish": "npm run build"
},

@@ -16,2 +20,3 @@ "repository": "https://github.com/g45t345rt/esbuild-plugin-filelastmodified",

"license": "ISC",
"dependencies": {},
"devDependencies": {

@@ -24,4 +29,5 @@ "@types/node": "^16.10.1",

"normalize.css": "^8.0.1",
"ts-node": "^10.2.1",
"typescript": "^4.4.3"
}
}
}

@@ -49,3 +49,3 @@ # esbuild-plugin-filelastmodified

```js
const fileLastModified = __fileLastModified__
import lastModified from '__fileLastModified__'
```

@@ -56,3 +56,3 @@

```js
const fileLastModified = 16165180636939285e-4 // unix date time
const lastModified = 16165180636939285e-4 // unix date time
```

@@ -59,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc