clojurific 0.12.1 → 0.12.3

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.
Files changed (126) hide show
  1. package/README.md +3 -2
  2. package/cljf/cli.js +3 -2
  3. package/cljf/java.js +2 -1
  4. package/cljf/launcher.js +20 -11
  5. package/package.json +2 -2
  6. package/vite-plugin-cljs/index.js +77 -22
  7. package/compiler/deps.edn +0 -9
  8. package/compiler/src/main/cljs/cljs/analyzer/passes/and_or.cljc +0 -118
  9. package/compiler/src/main/cljs/cljs/analyzer/passes/lite.cljc +0 -32
  10. package/compiler/src/main/cljs/cljs/analyzer/passes.cljc +0 -32
  11. package/compiler/src/main/cljs/cljs/bootstrap_nodejs.js +0 -154
  12. package/compiler/src/main/cljs/cljs/core/specs/alpha.cljc +0 -272
  13. package/compiler/src/main/cljs/cljs/core/specs/alpha.cljs +0 -10
  14. package/compiler/src/main/cljs/cljs/core.cljs +0 -13194
  15. package/compiler/src/main/cljs/cljs/esm/goog/array.js +0 -61
  16. package/compiler/src/main/cljs/cljs/esm/goog/math.js +0 -1846
  17. package/compiler/src/main/cljs/cljs/esm/goog/object.js +0 -80
  18. package/compiler/src/main/cljs/cljs/esm/goog/string.js +0 -192
  19. package/compiler/src/main/cljs/cljs/esm/goog/userAgent/product.js +0 -10
  20. package/compiler/src/main/cljs/cljs/esm/goog.js +0 -90
  21. package/compiler/src/main/cljs/cljs/esm/karma.cljs +0 -103
  22. package/compiler/src/main/cljs/cljs/esm/lazy.clj +0 -51
  23. package/compiler/src/main/cljs/cljs/esm/lazy.cljs +0 -49
  24. package/compiler/src/main/cljs/cljs/esm/node_test.cljs +0 -21
  25. package/compiler/src/main/cljs/cljs/esm/repl_runtime.cljs +0 -353
  26. package/compiler/src/main/cljs/cljs/externs.js +0 -27
  27. package/compiler/src/main/cljs/cljs/imul.js +0 -11
  28. package/compiler/src/main/cljs/cljs/js.clj +0 -24
  29. package/compiler/src/main/cljs/cljs/js.cljs +0 -1432
  30. package/compiler/src/main/cljs/cljs/loader.cljs +0 -107
  31. package/compiler/src/main/cljs/cljs/main.clj +0 -67
  32. package/compiler/src/main/cljs/cljs/math.cljs +0 -869
  33. package/compiler/src/main/cljs/cljs/module_deps.js +0 -250
  34. package/compiler/src/main/cljs/cljs/nodejs.cljs +0 -27
  35. package/compiler/src/main/cljs/cljs/nodejs_externs.js +0 -3
  36. package/compiler/src/main/cljs/cljs/nodejscli.cljs +0 -22
  37. package/compiler/src/main/cljs/cljs/pprint.cljc +0 -167
  38. package/compiler/src/main/cljs/cljs/pprint.cljs +0 -3325
  39. package/compiler/src/main/cljs/cljs/proxy/impl.cljs +0 -32
  40. package/compiler/src/main/cljs/cljs/proxy.cljs +0 -184
  41. package/compiler/src/main/cljs/cljs/reader.clj +0 -18
  42. package/compiler/src/main/cljs/cljs/reader.cljs +0 -214
  43. package/compiler/src/main/cljs/cljs/repl.cljs +0 -206
  44. package/compiler/src/main/cljs/cljs/source_map/base64.cljs +0 -25
  45. package/compiler/src/main/cljs/cljs/source_map/base64_vlq.cljs +0 -102
  46. package/compiler/src/main/cljs/cljs/source_map.cljs +0 -305
  47. package/compiler/src/main/cljs/cljs/spec/alpha.cljc +0 -564
  48. package/compiler/src/main/cljs/cljs/spec/alpha.cljs +0 -1510
  49. package/compiler/src/main/cljs/cljs/spec/gen/alpha.cljc +0 -68
  50. package/compiler/src/main/cljs/cljs/spec/gen/alpha.cljs +0 -183
  51. package/compiler/src/main/cljs/cljs/spec/test/alpha.cljc +0 -329
  52. package/compiler/src/main/cljs/cljs/spec/test/alpha.cljs +0 -380
  53. package/compiler/src/main/cljs/cljs/stacktrace.cljc +0 -578
  54. package/compiler/src/main/cljs/cljs/test.cljc +0 -458
  55. package/compiler/src/main/cljs/cljs/test.cljs +0 -606
  56. package/compiler/src/main/cljs/clojure/browser/dom.cljs +0 -152
  57. package/compiler/src/main/cljs/clojure/browser/event.cljs +0 -101
  58. package/compiler/src/main/cljs/clojure/browser/net.cljs +0 -181
  59. package/compiler/src/main/cljs/clojure/browser/repl/preload.cljs +0 -13
  60. package/compiler/src/main/cljs/clojure/browser/repl.cljs +0 -283
  61. package/compiler/src/main/cljs/clojure/core/protocols.cljs +0 -29
  62. package/compiler/src/main/cljs/clojure/core/reducers.cljs +0 -312
  63. package/compiler/src/main/cljs/clojure/data.cljs +0 -162
  64. package/compiler/src/main/cljs/clojure/datafy.cljs +0 -63
  65. package/compiler/src/main/cljs/clojure/edn.cljs +0 -55
  66. package/compiler/src/main/cljs/clojure/reflect.cljs +0 -57
  67. package/compiler/src/main/cljs/clojure/set.cljs +0 -165
  68. package/compiler/src/main/cljs/clojure/string.cljs +0 -290
  69. package/compiler/src/main/cljs/clojure/walk.cljs +0 -98
  70. package/compiler/src/main/cljs/clojure/zip.cljs +0 -291
  71. package/compiler/src/main/cljs/process/env.cljs +0 -12
  72. package/compiler/src/main/cljs/shadow/resource.clj +0 -60
  73. package/compiler/src/main/cljs/shadow/resource.cljs +0 -10
  74. package/compiler/src/main/clojure/cljs/analyzer/api.cljc +0 -299
  75. package/compiler/src/main/clojure/cljs/analyzer/impl/namespaces.cljc +0 -68
  76. package/compiler/src/main/clojure/cljs/analyzer/impl.cljc +0 -59
  77. package/compiler/src/main/clojure/cljs/analyzer/macros.clj +0 -57
  78. package/compiler/src/main/clojure/cljs/analyzer/utils.clj +0 -36
  79. package/compiler/src/main/clojure/cljs/analyzer.cljc +0 -5292
  80. package/compiler/src/main/clojure/cljs/build/api.clj +0 -309
  81. package/compiler/src/main/clojure/cljs/cli.clj +0 -812
  82. package/compiler/src/main/clojure/cljs/closure.clj +0 -3440
  83. package/compiler/src/main/clojure/cljs/compiler/api.clj +0 -101
  84. package/compiler/src/main/clojure/cljs/compiler/macros.clj +0 -16
  85. package/compiler/src/main/clojure/cljs/compiler.cljc +0 -2748
  86. package/compiler/src/main/clojure/cljs/core/macros.clj +0 -43
  87. package/compiler/src/main/clojure/cljs/core/server.clj +0 -167
  88. package/compiler/src/main/clojure/cljs/core.cljc +0 -3719
  89. package/compiler/src/main/clojure/cljs/env/macros.clj +0 -37
  90. package/compiler/src/main/clojure/cljs/env.cljc +0 -102
  91. package/compiler/src/main/clojure/cljs/esm/repl/nrepl.clj +0 -151
  92. package/compiler/src/main/clojure/cljs/esm/repl.clj +0 -878
  93. package/compiler/src/main/clojure/cljs/esm.clj +0 -987
  94. package/compiler/src/main/clojure/cljs/externs/default.edn +0 -1549
  95. package/compiler/src/main/clojure/cljs/externs.clj +0 -479
  96. package/compiler/src/main/clojure/cljs/foreign/node.clj +0 -207
  97. package/compiler/src/main/clojure/cljs/instant.clj +0 -54
  98. package/compiler/src/main/clojure/cljs/js_deps.cljc +0 -412
  99. package/compiler/src/main/clojure/cljs/module_graph.cljc +0 -402
  100. package/compiler/src/main/clojure/cljs/repl/bootstrap.clj +0 -53
  101. package/compiler/src/main/clojure/cljs/repl/browser.clj +0 -540
  102. package/compiler/src/main/clojure/cljs/repl/node.clj +0 -253
  103. package/compiler/src/main/clojure/cljs/repl/node_repl.js +0 -114
  104. package/compiler/src/main/clojure/cljs/repl/reflect.clj +0 -85
  105. package/compiler/src/main/clojure/cljs/repl/server.clj +0 -236
  106. package/compiler/src/main/clojure/cljs/repl.cljc +0 -1615
  107. package/compiler/src/main/clojure/cljs/server/browser.clj +0 -54
  108. package/compiler/src/main/clojure/cljs/server/node.clj +0 -54
  109. package/compiler/src/main/clojure/cljs/source_map/base64.clj +0 -28
  110. package/compiler/src/main/clojure/cljs/source_map/base64_vlq.clj +0 -104
  111. package/compiler/src/main/clojure/cljs/source_map.clj +0 -369
  112. package/compiler/src/main/clojure/cljs/support.cljc +0 -18
  113. package/compiler/src/main/clojure/cljs/tagged_literals.cljc +0 -93
  114. package/compiler/src/main/clojure/cljs/util.cljc +0 -420
  115. package/compiler/src/main/clojure/cljs/vendor/bridge.clj +0 -42
  116. package/compiler/src/main/clojure/cljs/vendor/clojure/data/json.clj +0 -809
  117. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/default_data_readers.clj +0 -303
  118. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/edn.clj +0 -440
  119. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/impl/commons.clj +0 -131
  120. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/impl/errors.clj +0 -214
  121. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/impl/inspect.clj +0 -91
  122. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/impl/utils.clj +0 -127
  123. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader/reader_types.clj +0 -431
  124. package/compiler/src/main/clojure/cljs/vendor/clojure/tools/reader.clj +0 -1035
  125. package/compiler/src/main/clojure/cljs/vendor/cognitect/transit.clj +0 -479
  126. /package/{compiler/no-clojurescript → no-clojurescript}/deps.edn +0 -0
@@ -1,272 +0,0 @@
1
- ; Copyright (c) Rich Hickey. All rights reserved.
2
- ; The use and distribution terms for this software are covered by the
3
- ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4
- ; which can be found in the file epl-v10.html at the root of this distribution.
5
- ; By using this software in any fashion, you are agreeing to be bound by
6
- ; the terms of this license.
7
- ; You must not remove this notice, or any other, from this software.
8
-
9
- (ns cljs.core.specs.alpha
10
- (:require [clojure.spec.alpha :as s]
11
- #?(:clj [cljs.core :as core]
12
- :cljs [cljs.core$macros :as core])))
13
-
14
- ;;;; destructure
15
-
16
- (s/def ::local-name (s/and simple-symbol? #(not= '& %)))
17
-
18
- (s/def ::binding-form
19
- (s/or :local-symbol ::local-name
20
- :seq-destructure ::seq-binding-form
21
- :map-destructure ::map-binding-form))
22
-
23
- ;; sequential destructuring
24
-
25
- (s/def ::seq-binding-form
26
- (s/and vector?
27
- (s/cat :forms (s/* ::binding-form)
28
- :rest-forms (s/? (s/cat :ampersand #{'&} :form ::binding-form))
29
- :as-form (s/? (s/cat :as #{:as} :as-sym ::local-name)))))
30
-
31
- ;; map destructuring
32
-
33
- (s/def ::non-binding-elements (s/cat :ampersand #{'&} ::non-binding-element (s/+ any?)))
34
- (s/def ::keys-form (s/and vector? (s/cat :bindings (s/* ident?) :nonbinding (s/? ::non-binding-elements))))
35
- (s/def ::syms-form (s/and vector? (s/cat :bindings (s/* symbol?) :nonbinding (s/? ::non-binding-elements))))
36
- (s/def ::simple-syms-form (s/and vector? (s/cat :bindings (s/* simple-symbol?) :nonbinding (s/? ::non-binding-elements))))
37
-
38
- (s/def ::keys ::keys-form)
39
- (s/def ::syms ::syms-form)
40
- (s/def ::strs ::simple-syms-form)
41
- (s/def ::keys! ::keys-form)
42
- (s/def ::syms! ::syms-form)
43
- (s/def ::strs! ::simple-syms-form)
44
- (s/def ::or map?)
45
- (s/def ::as ::local-name)
46
- (s/def ::defaults ::local-name)
47
- (s/def ::select ::local-name)
48
- (s/def ::excess ::local-name)
49
- (s/def ::missing ::local-name)
50
- (s/def ::all ::local-name)
51
-
52
- (s/def ::map-special-binding
53
- (s/keys :opt-un [::as ::or ::keys ::syms ::strs ::keys! ::syms! ::strs! ::select ::excess ::missing ::defaults ::all]))
54
-
55
- (s/def ::map-binding (s/tuple ::binding-form any?))
56
-
57
- (s/def ::ns-keys
58
- (s/tuple
59
- (s/and qualified-keyword? #(-> % name #{"keys" "syms" "keys!" "syms!"}))
60
- ::simple-syms-form))
61
-
62
- (s/def ::map-bindings
63
- (s/every (s/or :map-binding ::map-binding
64
- :qualified-keys-or-syms ::ns-keys
65
- :special-binding (s/tuple #{:as :or :keys :syms :strs :keys! :syms! :strs! :select :excess :missing :defaults :all} any?))
66
- :kind map?))
67
-
68
- (s/def ::map-binding-form (s/merge ::map-bindings ::map-special-binding))
69
-
70
- ;; bindings
71
-
72
- (defn even-number-of-forms?
73
- "Returns true if there are an even number of forms in a binding vector"
74
- [forms]
75
- (even? (count forms)))
76
-
77
- (s/def ::binding (s/cat :form ::binding-form :init-expr any?))
78
- (s/def ::bindings (s/and vector? even-number-of-forms? (s/* ::binding)))
79
-
80
- ;; let, if-let, when-let
81
-
82
- (s/fdef core/let
83
- :args (s/cat :bindings ::bindings
84
- :body (s/* any?)))
85
-
86
- (s/fdef core/if-let
87
- :args (s/cat :bindings (s/and vector? ::binding)
88
- :then any?
89
- :else (s/? any?)))
90
-
91
- (s/fdef core/when-let
92
- :args (s/cat :bindings (s/and vector? ::binding)
93
- :body (s/* any?)))
94
-
95
- ;; defn, defn-, fn
96
-
97
- (s/def ::param-list
98
- (s/and
99
- vector?
100
- (s/cat :params (s/* ::binding-form)
101
- :var-params (s/? (s/cat :ampersand #{'&} :var-form ::binding-form)))))
102
-
103
- (s/def ::params+body
104
- (s/cat :params ::param-list
105
- :body (s/alt :prepost+body (s/cat :prepost map?
106
- :body (s/+ any?))
107
- :body (s/* any?))))
108
-
109
- (s/def ::defn-args
110
- (s/cat :fn-name simple-symbol?
111
- :docstring (s/? string?)
112
- :meta (s/? map?)
113
- :fn-tail (s/alt :arity-1 ::params+body
114
- :arity-n (s/cat :bodies (s/+ (s/spec ::params+body))
115
- :attr-map (s/? map?)))))
116
-
117
- (s/fdef core/defn
118
- :args ::defn-args
119
- :ret any?)
120
-
121
- (s/fdef core/defn-
122
- :args ::defn-args
123
- :ret any?)
124
-
125
- (s/fdef core/fn
126
- :args (s/cat :fn-name (s/? simple-symbol?)
127
- :fn-tail (s/alt :arity-1 ::params+body
128
- :arity-n (s/+ (s/spec ::params+body))))
129
- :ret any?)
130
-
131
- ;;;; ns
132
-
133
- (s/def ::exclude (s/coll-of simple-symbol?))
134
- (s/def ::only (s/coll-of simple-symbol?))
135
- (s/def ::rename (s/map-of simple-symbol? simple-symbol?))
136
- (s/def ::filters (s/keys* :opt-un [::exclude ::only ::rename]))
137
-
138
- (s/def ::ns-refer-clojure
139
- (s/spec (s/cat :clause #{:refer-clojure}
140
- :refer-filters ::filters)))
141
-
142
- (s/def ::refer (s/coll-of simple-symbol?))
143
- (s/def ::refer-macros (s/coll-of simple-symbol?))
144
- (s/def ::include-macros #{true})
145
-
146
- (s/def ::lib (s/or :sym simple-symbol?
147
- :str string?))
148
-
149
- (s/def ::libspec
150
- (s/alt :lib ::lib
151
- :lib+opts (s/spec (s/cat :lib ::lib
152
- :options (s/keys* :opt-un [::as ::refer ::refer-macros ::include-macros])))))
153
-
154
- (s/def ::macros-libspec
155
- (s/alt :lib simple-symbol?
156
- :lib+opts (s/spec (s/cat :lib simple-symbol?
157
- :options (s/keys* :opt-un [::as ::refer])))))
158
-
159
- (s/def ::ns-require
160
- (s/spec (s/cat :clause #{:require}
161
- :body (s/+ (s/alt :libspec ::libspec
162
- :flag #{:reload :reload-all :verbose})))))
163
-
164
- (s/def ::ns-require-macros
165
- (s/spec (s/cat :clause #{:require-macros}
166
- :body (s/+ (s/alt :libspec ::macros-libspec
167
- :flag #{:reload :reload-all :verbose})))))
168
-
169
- (s/def ::package-list
170
- (s/spec
171
- (s/cat :package simple-symbol?
172
- :classes (s/+ simple-symbol?))))
173
-
174
- (s/def ::import-list
175
- (s/* (s/alt :class simple-symbol?
176
- :package-list ::package-list)))
177
-
178
- (s/def ::ns-import
179
- (s/spec
180
- (s/cat :clause #{:import}
181
- :classes ::import-list)))
182
-
183
- ;; same as ::libspec, but also supports the ::filters options in the libspec
184
- (s/def ::use-libspec
185
- (s/alt :lib ::lib
186
- :lib+opts (s/spec (s/cat :lib ::lib
187
- :options (s/keys* :req-un [::only] :opt-un [::rename])))))
188
-
189
- (s/def ::ns-use
190
- (s/spec (s/cat :clause #{:use}
191
- :libs (s/+ (s/alt :libspec ::use-libspec
192
- :flag #{:reload :reload-all :verbose})))))
193
-
194
- ;; same as ::libspec-macros, but also supports the ::filters options in the libspec
195
- (s/def ::use-macros-libspec
196
- (s/alt :lib simple-symbol?
197
- :lib+opts (s/spec (s/cat :lib simple-symbol?
198
- :options (s/keys* :req-un [::only] :opt-un [::rename])))))
199
-
200
- (s/def ::ns-use-macros
201
- (s/spec (s/cat :clause #{:use-macros}
202
- :libs (s/+ (s/alt :libspec ::use-macros-libspec
203
- :flag #{:reload :reload-all :verbose})))))
204
-
205
- (s/def ::ns-refer-global
206
- (s/spec (s/cat :clause #{:refer-global}
207
- :options (s/keys* :req-un [::only]))))
208
-
209
- (s/def ::ns-require-global
210
- (s/spec (s/cat :clause #{:require-global}
211
- :body (s/+ ::libspec))))
212
-
213
- (s/def ::ns-clauses
214
- (s/* (s/alt
215
- :refer-clojure ::ns-refer-clojure
216
- :require ::ns-require
217
- :require-macros ::ns-require-macros
218
- :import ::ns-import
219
- :use ::ns-use
220
- :use-macros ::ns-use-macros
221
- :refer-global ::ns-refer-global
222
- :require-global ::ns-require-global)))
223
-
224
- (s/def ::ns-form
225
- (s/cat :ns-name simple-symbol?
226
- :docstring (s/? string?)
227
- :attr-map (s/? map?)
228
- :ns-clauses ::ns-clauses))
229
-
230
- (s/fdef core/ns-special-form
231
- :args ::ns-form)
232
-
233
- (defn- quoted
234
- "Returns a spec that accepts a (quote ...) form of the spec"
235
- [spec]
236
- (s/spec (s/cat :quote #{'quote} :spec spec)))
237
-
238
- (s/def ::quoted-import-list
239
- (s/* (s/alt :class (quoted simple-symbol?)
240
- :package-list (quoted ::package-list))))
241
-
242
- (s/fdef core/import
243
- :args ::quoted-import-list)
244
-
245
- (s/fdef core/require
246
- :args (s/+ (s/alt :libspec (quoted ::libspec)
247
- :flag #{:reload :reload-all :verbose})))
248
-
249
- (s/fdef core/require-macros
250
- :args (s/+ (s/alt :libspec (quoted ::macros-libspec)
251
- :flag #{:reload :reload-all :verbose})))
252
-
253
- (s/fdef core/use
254
- :args (s/+ (s/alt :libspec (quoted ::use-libspec)
255
- :flag #{:reload :reload-all :verbose})))
256
-
257
- (s/fdef core/use-macros
258
- :args (s/+ (s/alt :libspec (quoted ::use-macros-libspec)
259
- :flag #{:reload :reload-all :verbose})))
260
-
261
- (comment
262
-
263
- (s/valid? ::ns-refer-global
264
- '(:refer-global :only [Date] :rename {Date MyDate}))
265
-
266
- (s/valid? ::ns-refer-global
267
- '(:refer-global :only))
268
-
269
- (s/valid? ::ns-require-global
270
- '(:require-global [jquery :as jq :refer [carousel] :rename {carousel car}]))
271
-
272
- )
@@ -1,10 +0,0 @@
1
- ; Copyright (c) Rich Hickey. All rights reserved.
2
- ; The use and distribution terms for this software are covered by the
3
- ; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
4
- ; which can be found in the file epl-v10.html at the root of this distribution.
5
- ; By using this software in any fashion, you are agreeing to be bound by
6
- ; the terms of this license.
7
- ; You must not remove this notice, or any other, from this software.
8
-
9
- (ns cljs.core.specs.alpha
10
- (:require-macros [cljs.core.specs.alpha]))