Socket
Socket
Sign inDemoInstall

nuejs-core

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

nuejs-core - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

package.json
{
"name": "nuejs-core",
"version": "0.3.0",
"version": "0.3.1",

@@ -5,0 +5,0 @@ "description": "The Nue framework for building user interfaces",

@@ -57,3 +57,30 @@

### Getting Started
Please see https://nuejs.org/docs/
### The big picture
The ultimate goal of Nue is to build a content first alternative to **Vercel** and **Netlify**, which is extremely fast and ridiculously easy to use.
![Nue Roadmap](https://nuejs.org/img/roadmap4-big.png)
#### Why Nue?
- [Content first](https://nuejs.org/docs/why-nue/content-first.html)
- [Extreme performance](https://nuejs.org/docs/why-nue/extreme-performance.html)
- [Closer to standards](https://nuejs.org/docs/why-nue/closer-to-standards.html)
### Contributing
Please see [contributing.md](/CONTRIBUTING.md)
### Community
Please see [GitHub discussions](https://github.com/nuejs/nue/discussions)

@@ -38,3 +38,3 @@

if (i % 2 == 0) {
if (str) ret.push(`'${str}'`)
if (str) ret.push(str.includes("'") ? JSON.stringify(str) : `'${str}'`)

@@ -41,0 +41,0 @@ // Object: { is-active: isActive() }

@@ -196,3 +196,2 @@

}
// root

@@ -202,2 +201,6 @@ if (type == 'root') {

} else if (type == 'script' || attribs?.client) {
delete attribs.client
// do nothing: pass content as is
// content

@@ -281,3 +284,3 @@ } else if (type == 'text') {

function getJS(nodes) {
const scripts = nodes.filter(el => el.type == 'script' && !el.attribs.type)
const scripts = nodes.filter(el => el.type == 'script' && !Object.keys(el.attribs)[0])
const js = scripts.map(getInnerHTML)

@@ -284,0 +287,0 @@ scripts.forEach(removeElement)

import { compileFile } from '..'
import { compileFile } from '../index.js'

@@ -4,0 +4,0 @@ for (const name of ['basics', 'loops']) {

import { compile } from '..'
import { compile } from '../index.js'

@@ -4,0 +4,0 @@ /*

@@ -49,2 +49,3 @@

'Hey { name }': [ "'Hey '", '_.name' ],
"Hey, I'm { name }": [ '"Hey, I\'m "', '_.name' ],
'foo { alarm } is-alert': [ "'foo '", '_.alarm', "' is-alert'" ],

@@ -51,0 +52,0 @@ 'is-cool { danger: hasError }': [ "'is-cool '", "_.hasError && 'danger '" ],

import { render } from '..'
import { render } from '../index.js'

@@ -187,3 +187,21 @@

const GA = `
<body>
<script async src="https://ga.com/js?id=666"></script>
<script client>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments)}
</script>
</body>
`
test('GA', () => {
const html = render(GA)
expect(html).toInclude('<script async src')
expect(html).toInclude('<script>')
expect(html).toInclude('(){dataLayer.push(arguments)}')
})
const IF_SIBLING = `

@@ -222,7 +240,16 @@ <nav @name="navi">

} catch (e) {
expect(e.subexpr).toBe('foo[0]')
expect(e.line).toBe(2)
expect(e.column).toBe(9)
// Getting different results from different environments
// bun: TypeError: undefined is not an object (evaluating '_.foo[0]')
if (process.isBun) {
expect(e.subexpr).toBe('foo[0]')
expect(e.line).toBe(2)
expect(e.column).toBe(9)
} else {
// node: TypeError: Cannot read properties of undefined (reading '0')
expect(e.subexpr).toBe('0')
expect(e.line).toBe(2)
expect(e.column).toBe(13)
}
}
})
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