@scalar/snippetz 0.1.0 → 0.1.1

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.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './format';
2
1
  export * from './snippetz';
3
2
  export * from './types';
4
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAC1B,cAAc,SAAS,CAAA"}
package/dist/index.js CHANGED
@@ -1,28 +1,14 @@
1
- import e from "prettier/plugins/babel";
2
- import a from "prettier/plugins/estree";
3
- import * as n from "prettier";
4
- async function o(t) {
5
- if (t.target === "javascript")
6
- return await n.format(t.code, {
7
- semi: !1,
8
- parser: "babel",
9
- plugins: [e, a],
10
- singleQuote: !0
11
- });
12
- throw new Error(`Unsupported target: ${t.target}`);
13
- }
14
- const i = {};
15
- function f() {
1
+ const n = {};
2
+ function r() {
16
3
  return {
17
- get(t, r) {
18
- return r = {
19
- ...i,
20
- ...r
21
- }, o(t);
4
+ get(e, t) {
5
+ return t = {
6
+ ...n,
7
+ ...t
8
+ }, e.code;
22
9
  }
23
10
  };
24
11
  }
25
12
  export {
26
- o as format,
27
- f as snippetz
13
+ r as snippetz
28
14
  };
@@ -1 +1 @@
1
- (function(t,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("prettier/plugins/babel"),require("prettier/plugins/estree"),require("prettier")):typeof define=="function"&&define.amd?define(["exports","prettier/plugins/babel","prettier/plugins/estree","prettier"],n):(t=typeof globalThis<"u"?globalThis:t||self,n(t["@scalar/snippetz"]={},t.babel,t.estree,t.prettier))})(this,function(t,n,s,a){"use strict";function o(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const u=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(r,i,u.get?u:{enumerable:!0,get:()=>e[i]})}}return r.default=e,Object.freeze(r)}const f=o(a);async function p(e){if(e.target==="javascript")return await f.format(e.code,{semi:!1,parser:"babel",plugins:[n,s],singleQuote:!0});throw new Error(`Unsupported target: ${e.target}`)}const c={};function l(){return{get(e,r){return r={...c,...r},p(e)}}}t.format=p,t.snippetz=l,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports):typeof define=="function"&&define.amd?define(["exports"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["@scalar/snippetz"]={}))})(this,function(e){"use strict";const t={};function i(){return{get(o,n){return n={...t,...n},o.code}}}e.snippetz=i,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
@@ -1,6 +1,6 @@
1
1
  import type { Source } from './types';
2
2
  export type SnippetOptions = {};
3
3
  export declare function snippetz(): {
4
- get(source: Source, options?: Partial<SnippetOptions>): Promise<string>;
4
+ get(source: Source, options?: Partial<SnippetOptions>): string;
5
5
  };
6
6
  //# sourceMappingURL=snippetz.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,MAAM,cAAc,GAAG,EAAE,CAAA;AAI/B,wBAAgB,QAAQ;gBAER,MAAM,YAAY,QAAQ,cAAc,CAAC;EASxD"}
1
+ {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAErC,MAAM,MAAM,cAAc,GAAG,EAAE,CAAA;AAI/B,wBAAgB,QAAQ;gBAER,MAAM,YAAY,QAAQ,cAAc,CAAC;EASxD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scalar/snippetz",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "devDependencies": {
6
6
  "@vitest/ui": "^1.0.4",
@@ -8,9 +8,7 @@
8
8
  "vite": "^5.0.0",
9
9
  "vitest": "^1.0.4"
10
10
  },
11
- "dependencies": {
12
- "prettier": "^3.1.1"
13
- },
11
+ "dependencies": {},
14
12
  "files": [
15
13
  "dist"
16
14
  ],
package/dist/format.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export declare function format(source: any): Promise<string>;
2
- //# sourceMappingURL=format.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAIA,wBAAsB,MAAM,CAAC,MAAM,EAAE,GAAG,mBAavC"}