nirguna 1.0.9 → 1.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/ChangeLog CHANGED
@@ -1,3 +1,31 @@
1
+ 2026.02.24, v1.1.1
2
+
3
+ fix:
4
+ - 5ba529b @putout/plugin-fasm: add-label-prefix: exclude CallExpression callee
5
+ - a6c2c3d @putout/plugin-fasm: insert-target: filter
6
+
7
+ feature:
8
+ - dde51ae @nirguna/transformer-wasm: publish
9
+ - c44bb5c @putout/plugin-wasm: convert-binary-to-call
10
+ - 4c250e1 @putout/plugin-wasm: convert-binary-to-function
11
+ - 448d50a @putout/plugin-wasm: apply-types: async
12
+ - 9f30e51 @putout/plugin-fasm: convert-args-to-regs: insert-target: improve support
13
+ - 8d44159 nemesis: target: boot, kernel, nemesis
14
+ - 0ab6c1f @putout/transform-fasm: insert-target
15
+
16
+ 2026.02.22, v1.1.0
17
+
18
+ fix:
19
+ - 9ba62ae nemesis: readSector: ah -> 1
20
+ - 9a8f54b @nirguna/plugin-nemesis: convert-find-first-to-int-0xff: readSector -> findFirst
21
+
22
+ feature:
23
+ - ac56b4e @nirguna/transformer-fasm: move out from nirguna
24
+ - facd68f @putout/cli-args: validate-args: add targets: linux, boot, kernel, nemesis
25
+ - bf84e1d @putout/plugin-fasm: insert-target: add
26
+ - 725e9c5 nemesis: screen size
27
+ - 9ec8005 nemesis: find-first: loop -> do while
28
+
1
29
  2026.02.21, v1.0.9
2
30
 
3
31
  feature:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nirguna",
3
- "version": "1.0.9",
3
+ "version": "1.1.1",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Compile JavaScript to WASM and FASM",
@@ -39,6 +39,8 @@
39
39
  "@nirguna/plugin-optimizer-fasm": "^1.0.0",
40
40
  "@nirguna/plugin-optimizer-wasm": "^1.0.0",
41
41
  "@nirguna/plugin-wasm": "^1.0.0",
42
+ "@nirguna/transformer-fasm": "^1.0.0",
43
+ "@nirguna/transformer-wasm": "^1.0.0",
42
44
  "@putout/babel": "^5.2.12",
43
45
  "@putout/plugin-assignment": "^2.0.0",
44
46
  "@putout/plugin-esm": "^10.0.1",
@@ -91,8 +93,6 @@
91
93
  "#translator-wasm": "./packages/translator-wasm/translator.js",
92
94
  "#test-wasm": "./packages/test-wasm/test.js",
93
95
  "#translator-fasm": "./packages/translator-fasm/translator.js",
94
- "#transformer-wasm": "./packages/transformer-wasm/transformer.js",
95
- "#transformer-fasm": "./packages/transformer-fasm/transformer.js",
96
96
  "#operator-wasm": "./packages/operator-wasm/index.js",
97
97
  "#nirguna": "./lib/nirguna.js"
98
98
  },
@@ -1,4 +1,4 @@
1
- import {transform} from '#transformer-fasm';
1
+ import {transform} from '@nirguna/transformer-fasm';
2
2
  import {print} from '#printer-fasm';
3
3
  import {translate} from '#translator-fasm';
4
4
  import {optimize} from '#optimizer-fasm';
@@ -25,7 +25,10 @@ export const compile = async (source, options = {}) => {
25
25
  places,
26
26
  });
27
27
 
28
- const [code, compilePlaces] = transform(source, config);
28
+ const [code, compilePlaces] = transform(source, {
29
+ ...config,
30
+ target,
31
+ });
29
32
 
30
33
  if (compilePlaces.length) {
31
34
  emitLastStateChange('transform', compilePlaces);
@@ -1,5 +1,5 @@
1
+ import {transform} from '@nirguna/transformer-wasm';
1
2
  import {translate} from '#translator-wasm';
2
- import {transform} from '#transformer-wasm';
3
3
  import {print} from '#printer-wasm';
4
4
  import {optimize} from '#optimizer-wasm';
5
5
 
@@ -60,3 +60,4 @@ export const compile = async (source, options = {}) => {
60
60
  emitLastStateChange('translate', places);
61
61
  return [binary, places];
62
62
  };
63
+
@@ -1,70 +0,0 @@
1
- import {readFileSync as _readFileSync} from 'node:fs';
2
- import putout from 'putout';
3
- import * as removeUselessOperand from '@putout/plugin-remove-useless-operand';
4
- import * as removeNestedBlocks from '@putout/plugin-remove-nested-blocks';
5
- import * as fasm from '@nirguna/plugin-fasm';
6
- import * as nirguna from '@nirguna/plugin-nirguna';
7
- import * as bundler from '@nirguna/plugin-bundler-fasm';
8
-
9
- const defaultConfig = {
10
- rules: {},
11
- plugins: [],
12
- };
13
-
14
- const parseConfig = (config) => ({
15
- ...defaultConfig,
16
- ...config,
17
- });
18
-
19
- export const transform = (source, config) => {
20
- const {
21
- debug,
22
- plugins,
23
- rules,
24
- readFileSync = _readFileSync,
25
- } = parseConfig(config);
26
-
27
- const variables = [];
28
- const functions = [];
29
-
30
- const {code: bundled} = putout(source, {
31
- isTS: true,
32
- rules: {
33
- 'nirguna/bundler-fasm/apply-debug': ['on', {
34
- debug,
35
- count: 0,
36
- variables,
37
- functions,
38
- }],
39
- 'nirguna/bundler-fasm/replace-section-data-with-let': ['on', {
40
- variables,
41
- }],
42
- 'nirguna/bundler-fasm/replace-section-code-with-functions': ['on', {
43
- functions,
44
- }],
45
- },
46
- plugins: [
47
- ['nirguna/bundler-fasm', bundler],
48
- ],
49
- });
50
-
51
- const {code, places} = putout(bundled, {
52
- fixCount: 5,
53
- isTS: true,
54
- rules: {
55
- ...rules,
56
- 'nirguna/fasm/apply-include': ['on', {
57
- readFileSync,
58
- }],
59
- },
60
- plugins: [
61
- ...plugins,
62
- ['remove-useless-operand', removeUselessOperand],
63
- ['remove-nested-blocks', removeNestedBlocks],
64
- ['nirguna/nirguna', nirguna],
65
- ['nirguna/fasm', fasm],
66
- ],
67
- });
68
-
69
- return [code, places];
70
- };
@@ -1,20 +0,0 @@
1
- import putout from 'putout';
2
- import * as removeNestedBlocks from '@putout/plugin-remove-nested-blocks';
3
- import * as esm from '@putout/plugin-esm';
4
- import * as nirguna from '@nirguna/plugin-nirguna';
5
- import * as wasm from '@nirguna/plugin-wasm';
6
-
7
- export const transform = (source) => {
8
- const {code, places} = putout(source, {
9
- fix: true,
10
- isTS: true,
11
- plugins: [
12
- ['nirguna/wasm', wasm],
13
- ['nirguna/nirguna', nirguna],
14
- ['esm', esm],
15
- ['remove-nested-blocks', removeNestedBlocks],
16
- ],
17
- });
18
-
19
- return [code, places];
20
- };