• In chevron_right

      Deno 1.21 improves REPL, error handling

      pubsub.slavino.sk / infoworldcom · Thursday, 28 April, 2022 - 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

      GitHub will require 2FA for some NPM registry users

      pubsub.slavino.sk / infoworldcom · Monday, 22 November, 2021 - 11:00 edit

    In light of two recent security incidents impacting the popular NPM registry for JavaScript packages, GitHub will require 2FA (two-factor authentication) for maintainers and admins of popular packages on NPM.

    The 2FA policy, intended to protect against account takeovers, will be put in place starting with a cohort of top packages in the first quarter of 2022, GitHub said in a bulletin published on November 15. GitHub became stewards of the registry after acquiring NPM in 2020 .

    To read this article in full, please click here


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

    • In chevron_right

      TypeScript 4.5 arrives with Promise improvements

      pubsub.slavino.sk / infoworldcom · Thursday, 18 November, 2021 - 21:10 edit

    TypeScript 4.5, the latest upgrade to Microsoft’s strongly typed language based on JavaScript, is now generally available.

    The release features a new utility type, the Awaited type, for modeling operations such as await in async functions or the .then() method on Promise objects. However, another capability originally planned for TypeScript 4.5, support for ECMAScript modules in Node.js 12, has been deferred to a later version of TypeScript.

    [ Also on InfoWorld: 7 tools transforming JavaScript development ]

    Node.js, which can work with TypeScript, has been working to support ECMAScript modules (ESM), which enable packaging of JavaScript code for reuse. This work has been difficult because Node.js was built on a different module system, CommonJS, Microsoft said. But ESM was largely implemented in Node.js 12.

    To read this article in full, please click here


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

    • In chevron_right

      How to use Auth0 with Node.js and Express

      pubsub.slavino.sk / infoworldcom · Thursday, 19 August, 2021 - 10:00 edit

    Cloud-based authentication and authorization platforms—sometimes known as IDaaS, or identity as a service — are an expanding area of cloud tooling, and it’s easy to see why. App security is difficult and error-prone, and virtually every project requires it. The ability to offload much of the work to a dedicated and proven service is enticing.

    Auth0 is an up-and-coming provider of authentication and authorization services (and open source software ). In this article, you will see how to incorporate Auth0 log-in capabilities into a app with a Node.js/Express back end, serving a straight JS front end, and then use the authenticated user info (via JWT) to show/hide UI information and secure RESTful endpoints.

    To read this article in full, please click here


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

    • In chevron_right

      How to use FilePond with Node.js

      pubsub.slavino.sk / infoworldcom · Thursday, 29 July, 2021 - 10:00 edit

    Uploading files is a common need for cloud apps. FilePond is a solid open-source project that offers sophisticated file handling and wrappers for many JavaScript frameworks like React and Svelte .

    This article gives an overview of handling file uploads with FilePond and a Node.js and Express back end.

    [ Also on InfoWorld: How to CRUD with Node.js and MongoDB ]

    Why FilePond?

    There are numerous libraries available for the task, but FilePond is supremely easy to use and handles niceties like image optimization without extra configuration. Moreover, it gives the developer a clear-cut process on the server-side.

    To read this article in full, please click here


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

    • In chevron_right

      Deno 1.8 preps for GPU-accelerated machine learning

      pubsub.slavino.sk / infoworldcom · Wednesday, 3 March, 2021 - 22:05 edit

    Deno 1.8, released on March 2, offers preliminary support for an API to bring enhanced machine learning to the secure JavaScript/TypeScript runtime .

    Experimental backing for the WebGPU API , for performing operations such as rendering and computation on a GPU, provides a path toward out-of-the-box GPU accelerated machine learning in Deno, release notes said. The WebGPU API gives developers a low-level, high-performance cross-architecture mechanism to program GPU hardware from JavaScript. It serves as the effective successor to WebGL on the web.

    To read this article in full, please click here


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

    • In chevron_right

      NPM CLI 7 arrives with Workspaces

      pubsub.slavino.sk / infoworldcom · Tuesday, 2 February, 2021 - 23:26 edit

    NPM CLI 7, an upgrade of the command line toolkit for the JavaScript package manager , is now generally available. The new version brings a Workspaces feature as well as changes to the lockfile format and enhanced performance.

    NPM CLI 7 had been available on an opt-in basis since October, but has now been promoted to the status of “latest” version. Installation instructions can be found on GitHub .

    [ Also on InfoWorld: What is Deno? A ‘better’ Node.js ]

    The highlight of NPM CLI 7 is a Workspaces capability to manage multiple packages from within a single, top-level root package. This long-requested feature was motivated by a desire to support the management of multiple packages that may or may not be used together.

    To read this article in full, please click here


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

    • In chevron_right

      Deno 1.7 brings compilation improvements

      pubsub.slavino.sk / infoworldcom · Wednesday, 27 January, 2021 - 11:00 edit

    Deno 1.7, the latest version of the JavaScript/TypeScript runtime built to serve as a more secure alternative to Node.js , is highlighted by improved compilation and data URL capabilities.

    Published January 19, Deno 1.7 offers features, stabilizations, and improvements to APIs and tools. Installation instructions can be found at deno.land .

    [ Also on InfoWorld: Full-stack developer: What it is and how you can become one ]

    Key to the Deno 1.7 release is that deno compile now can cross-compile from any in stable supported architecture, including Windows x64, MacOS x64, and Linux x64, to any other in stable supported architecture. Thus binaries for Windows and MacOS can be created from a single Linux CI machine.

    To read this article in full, please click here


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

    • In chevron_right

      Testing Web applications with node.js and Playwright

      pubsub.slavino.sk / infoworldcom · Tuesday, 6 October, 2020 - 10:00 edit

    Modern application development depends on automated testing, using test frameworks to ensure that code is ready to go into application packages and out to end-users. To get the most from testing, tests are written before code and can be integrated into source control and CI/CD (continuous integration/continuous deployment) pipelines. Tests should be everywhere in your development process. Need to merge a pull request? Test the code. Need to commit to a branch? Test the code.

    But there’s one area where testing is hard, especially when it needs to be automated. I’m talking about the need to interact with and test dynamic user interfaces. Web application testing is a complex process. Tools such as Selenium and webdriver are key elements in automating page content and in ensuring that you’re testing both page elements and the application as a whole. They’re important if you’re using headless browsers in an application; I’ve been using a set of Python scripts in a Twitter application built around Selenium and Chromium’s webdriver support to automate taking screenshots from an aircraft tracking application.

    To read this article in full, please click here


    Značky: #Node.js, #Rozne