• In chevron_right

    Deno 1.21 improves REPL, error handling / infoworldcom · Thursday, 28 April - 19:17 edit

Deno 1.21 has been released. This latest upgrade to the JavaScript/TypeScript runtime features improvements to the REPL (read-evaluate-print loop) and a move away from default type-checking.

The Deno REPL is a tool for prototyping and trying out new things. With Deno 1.21, an -–eval-file flag can be used with the deno repl subcommand. This flag allows for passing of a list of paths or URLs to files that will be executed before the REPL starts and is useful for building custom, specialized REPLs. Also, type checking has been disabled for imported modules in the REPL, leading to faster imports. And the REPL now has a global clear() function that acts as an alias for console.clear . This aligns with what is found in REPLs in many browsers, Deno’s developers said.

To read this article in full, please click here

Značky: #JavaScript, #Node.js, #Rozne

  • In chevron_right

    The JavaScript language features roundup / infoworldcom · Thursday, 28 April - 10:00 edit

The JavaScript language specification, also known as ECMAScript or ES, is a living document, modified every year in response to evolving needs. While JavaScript started as a scripting language, the ECMAScript specification overview notes that the language “is now used for the full spectrum of programming tasks in many different environments and scales." Because of this, JavaScript is better understood as a fully featured general-purpose programming language.

With the upcoming ECMAScript 2022 release just around the corner, let's take a look at the new JavaScript language features introduced in ECMAScript 2021.

[ Also on InfoWorld: Builder CEO: Where JavaScript is headed is super interesting ]


The replaceAll() method takes a string or regular expression, called the pattern , as its first argument. The second argument is the pattern's replacement . Given the first and second argument, replaceAll() returns a new string that will be the source string with all instances of the pattern swapped for the replacement. The source string is not affected.

To read this article in full, please click here

Značky: #Rozne, #JavaScript

  • In chevron_right

    Go serverless with Vercel, SvelteKit, and MongoDB / infoworldcom · Thursday, 21 April - 10:00 edit

The cloud continues to evolve toward higher orders of abstraction. Automated deployment and hosting platforms, front-end frameworks, and back-end databases are increasingly powerful and sophisticated, and integrating them is easier than ever. This article shows you how to integrate Vercel , SvelteKit , and MongoDB for full-stack serverless development. Each of these technologies leads in its own domain. By using them together, developers can achieve impressive capabilities with a modest amount of work.

To read this article in full, please click here

Značky: #Rozne, #JavaScript

  • chevron_right

    Sabotage: Code added to popular NPM package wiped files in Russia and Belarus / ArsTechnica · Friday, 18 March - 18:31

Sabotage: Code added to popular NPM package wiped files in Russia and Belarus

Enlarge (credit: Getty Images)

The developer of a popular open source package has been caught adding malicious code to that package, which wiped files from computers located in Russia and Belarus, in a protest that has enraged many users and raised concerns about the safety of free and open source software.

The application, node.ipc, adds remote Inter Process Communication and neural networking capabilities to other open source code libraries. As a dependency, node.js is automatically downloaded and incorporated into other libraries, including ones like Vue.js CLI, which has more than 1 million weekly downloads.

A deliberate and dangerous act

Two weeks ago, the node.ipc author pushed a new version of the library that sabotaged computers located in Russia and Belarus, the countries invading Ukraine and providing support for the invasion, respectively. The new release added a function that checked the IP address of developers who used the node.ipc in their own projects. When an IP address geolocated to either Russia or Belarus, the new version wiped files from the machine and replaced it with a heart emoji.

Read 17 remaining paragraphs | Comments

  • In chevron_right

    Deno gets faster Rust calls / infoworldcom · Friday, 18 March - 10:00 edit

Faster calls into Rust are highlighted in the latest version of the Deno secure JavaScript/TypeScript runtime , improving performance.

The Rust enhancement pertains to communication between the Google V8 JavaScript engine leveraged by Deno and the rest of the runtime, which was written in the Rust language . With Deno 1.20, announced March 17, proponents have optimized the communication layer to be as much as 60% quicker, leveraging Rust procedural macros to generate optimized bindings for V8 from existing Rust code. The macro optimizes away deserialization of unused arguments, speeds up metric collection, and provides a base for future integration with the V8 Fast API to further boost performance between JavaScript and Rust.

To read this article in full, please click here

Značky: #Rust, #JavaScript, #Rozne

  • In chevron_right

    Vercel CEO: Deployment should be instantaneous / infoworldcom · Thursday, 17 March - 10:00 edit

Guillermo Rauch is the CEO and founder of Vercel , a cloud infrastructure company that offers advanced deployment capabilities for front-end JavaScript, edge, and serverless functions. Vercel is a kind of new layer on top of cloud platforms that automates a lot of the application deployment work that used to be done by hand (most of which fell under the “devops” heading).

Rauch is a longtime contributor to open source JavaScript, having also created MooTools and Mongoose . I got a chance to talk to him about some of the ground Vercel is breaking, including simplifying infrastructure and streamlining workflows for developers. Rauch also shared his insights into running a successful startup and how to approach funding.

To read this article in full, please click here

Značky: #JavaScript, #Rozne

  • In chevron_right

    Microsoft pushes optional type annotations for JavaScript / infoworldcom · Saturday, 12 March - 11:00 edit

Microsoft is backing a proposal to bring optional and erasable type syntax to JavaScript, potentially making the company’s TypeScript language , which builds on JavaScript, faster and easier to use.

The standards proposal calls for allowing type annotations to be added to JavaScript code that would be checked by type checkers external to JavaScript. At runtime, a JavaScript engine would treat the types as comments. The plan calls for JavaScript to carve out of a set of syntax for types that engines would ignore but tools such as TypeScript, Flow , and others could use. This proposal would add optional annotations to ECMAScript, the official standard underlying JavaScript .

To read this article in full, please click here

Značky: #Microsoft, #Rozne, #JavaScript, #Typescript

  • In chevron_right

    Deno 1.19 extends web streams support / infoworldcom · Wednesday, 23 February - 11:00 edit

Deno 1.19, the latest version of the secure runtime for JavaScript and TypeScript , extends web stream support and introduces a deno vendor subcommand for “vendoring” dependencies.

In Deno 1.19, unveiled February 17, files, network sockets, and stdio now are native web streams. With this feature, the Deno.FsFile and Deno.Conn interfaces have readable and writable properties of type ReadableStream and WritableStream respectively. This allows them to integrate nicely with other web APIs that use web streams, according to release notes .

To read this article in full, please click here

Značky: #Rozne, #Typescript, #JavaScript