head	1.1;
branch	1.1.1;
access;
symbols
	netbsd-11-0-RC4:1.1.1.4
	netbsd-11-0-RC3:1.1.1.4
	netbsd-11-0-RC2:1.1.1.4
	netbsd-11-0-RC1:1.1.1.4
	perseant-exfatfs-base-20250801:1.1.1.4
	netbsd-11:1.1.1.4.0.4
	netbsd-11-base:1.1.1.4
	netbsd-10-1-RELEASE:1.1.1.3
	perseant-exfatfs-base-20240630:1.1.1.4
	perseant-exfatfs:1.1.1.4.0.2
	perseant-exfatfs-base:1.1.1.4
	netbsd-8-3-RELEASE:1.1.1.1
	netbsd-9-4-RELEASE:1.1.1.1
	netbsd-10-0-RELEASE:1.1.1.3
	netbsd-10-0-RC6:1.1.1.3
	netbsd-10-0-RC5:1.1.1.3
	netbsd-10-0-RC4:1.1.1.3
	netbsd-10-0-RC3:1.1.1.3
	netbsd-10-0-RC2:1.1.1.3
	netbsd-10-0-RC1:1.1.1.3
	FILE5_45:1.1.1.4
	netbsd-10:1.1.1.3.0.2
	netbsd-10-base:1.1.1.3
	FILE5_43:1.1.1.3
	netbsd-9-3-RELEASE:1.1.1.1
	cjep_sun2x-base1:1.1.1.2
	cjep_sun2x:1.1.1.2.0.6
	cjep_sun2x-base:1.1.1.2
	cjep_staticlib_x-base1:1.1.1.2
	netbsd-9-2-RELEASE:1.1.1.1
	cjep_staticlib_x:1.1.1.2.0.4
	cjep_staticlib_x-base:1.1.1.2
	FILE5_40:1.1.1.2
	netbsd-9-1-RELEASE:1.1.1.1
	FILE5_39:1.1.1.2
	phil-wifi-20200421:1.1.1.2
	phil-wifi-20200411:1.1.1.2
	is-mlppp:1.1.1.2.0.2
	is-mlppp-base:1.1.1.2
	phil-wifi-20200406:1.1.1.2
	netbsd-8-2-RELEASE:1.1.1.1
	netbsd-9-0-RELEASE:1.1.1.1
	netbsd-9-0-RC2:1.1.1.1
	FILE5_38:1.1.1.2
	netbsd-9-0-RC1:1.1.1.1
	phil-wifi-20191119:1.1.1.1
	netbsd-9:1.1.1.1.0.38
	netbsd-9-base:1.1.1.1
	phil-wifi-20190609:1.1.1.1
	netbsd-8-1-RELEASE:1.1.1.1
	FILE5_37:1.1.1.1
	netbsd-8-1-RC1:1.1.1.1
	pgoyette-compat-merge-20190127:1.1.1.1
	pgoyette-compat-20190127:1.1.1.1
	pgoyette-compat-20190118:1.1.1.1
	pgoyette-compat-1226:1.1.1.1
	pgoyette-compat-1126:1.1.1.1
	pgoyette-compat-1020:1.1.1.1
	FILE5_35:1.1.1.1
	pgoyette-compat-0930:1.1.1.1
	pgoyette-compat-0906:1.1.1.1
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.1.1.1
	netbsd-8-0-RELEASE:1.1.1.1
	phil-wifi:1.1.1.1.0.36
	phil-wifi-base:1.1.1.1
	pgoyette-compat-0625:1.1.1.1
	netbsd-8-0-RC2:1.1.1.1
	pgoyette-compat-0521:1.1.1.1
	pgoyette-compat-0502:1.1.1.1
	pgoyette-compat-0422:1.1.1.1
	netbsd-8-0-RC1:1.1.1.1
	FILE5_33:1.1.1.1
	pgoyette-compat-0415:1.1.1.1
	pgoyette-compat-0407:1.1.1.1
	pgoyette-compat-0330:1.1.1.1
	pgoyette-compat-0322:1.1.1.1
	pgoyette-compat-0315:1.1.1.1
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.1.1.1.0.34
	pgoyette-compat-base:1.1.1.1
	netbsd-7-1-1-RELEASE:1.1.1.1
	matt-nb8-mediatek:1.1.1.1.0.32
	matt-nb8-mediatek-base:1.1.1.1
	FILE5_32:1.1.1.1
	perseant-stdc-iso10646:1.1.1.1.0.30
	perseant-stdc-iso10646-base:1.1.1.1
	netbsd-8:1.1.1.1.0.28
	netbsd-8-base:1.1.1.1
	FILE5_31:1.1.1.1
	prg-localcount2-base3:1.1.1.1
	prg-localcount2-base2:1.1.1.1
	prg-localcount2-base1:1.1.1.1
	prg-localcount2:1.1.1.1.0.26
	prg-localcount2-base:1.1.1.1
	pgoyette-localcount-20170426:1.1.1.1
	bouyer-socketcan-base1:1.1.1.1
	pgoyette-localcount-20170320:1.1.1.1
	netbsd-7-1:1.1.1.1.0.24
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	FILE5_30:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.1.1.1.0.22
	bouyer-socketcan-base:1.1.1.1
	pgoyette-localcount-20170107:1.1.1.1
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.1.1.1
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.1.1.1
	netbsd-7-nhusb:1.1.1.1.0.20
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.1.1.1
	pgoyette-localcount-20160726:1.1.1.1
	pgoyette-localcount:1.1.1.1.0.18
	pgoyette-localcount-base:1.1.1.1
	netbsd-7-0-1-RELEASE:1.1.1.1
	netbsd-7-0:1.1.1.1.0.16
	netbsd-7-0-RELEASE:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	FILE5_22:1.1.1.1
	FILE5_20:1.1.1.1
	netbsd-7:1.1.1.1.0.14
	netbsd-7-base:1.1.1.1
	FILE5_19:1.1.1.1
	yamt-pagecache-base9:1.1.1.1
	yamt-pagecache-tag8:1.1.1.1.2.2
	tls-earlyentropy:1.1.1.1.0.12
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	FILE5_16:1.1.1.1
	riastradh-drm2-base2:1.1.1.1
	riastradh-drm2-base1:1.1.1.1
	riastradh-drm2:1.1.1.1.0.4
	riastradh-drm2-base:1.1.1.1
	khorben-n900:1.1.1.1.0.10
	agc-symver:1.1.1.1.0.8
	agc-symver-base:1.1.1.1
	FILE5_14:1.1.1.1
	tls-maxphys-base:1.1.1.1
	tls-maxphys:1.1.1.1.0.6
	yamt-pagecache:1.1.1.1.0.2
	yamt-pagecache-base8:1.1.1.1
	FILE_5_12:1.1.1.1
	CHRISTOS:1.1.1;
locks; strict;
comment	@# @;


1.1
date	2013.01.03.16.27.54;	author christos;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2013.01.03.16.27.54;	author christos;	state Exp;
branches
	1.1.1.1.2.1
	1.1.1.1.6.1
	1.1.1.1.36.1;
next	1.1.1.2;

1.1.1.2
date	2019.12.17.02.23.53;	author christos;	state Exp;
branches;
next	1.1.1.3;
commitid	vqYTz60fS9PNg0PB;

1.1.1.3
date	2022.09.24.20.07.54;	author christos;	state Exp;
branches;
next	1.1.1.4;
commitid	Nf6F9kcpc0EPC9VD;

1.1.1.4
date	2023.08.18.18.36.50;	author christos;	state Exp;
branches;
next	;
commitid	IX26ghc1E2S0AiBE;

1.1.1.1.2.1
date	2013.01.03.16.27.54;	author yamt;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2013.01.23.00.04.35;	author yamt;	state Exp;
branches;
next	;

1.1.1.1.6.1
date	2013.01.03.16.27.54;	author tls;	state dead;
branches;
next	1.1.1.1.6.2;

1.1.1.1.6.2
date	2013.02.25.00.26.06;	author tls;	state Exp;
branches;
next	;

1.1.1.1.36.1
date	2020.04.08.14.04.04;	author martin;	state Exp;
branches;
next	;
commitid	Qli2aW9E74UFuA3C;


desc
@@


1.1
log
@Initial revision
@
text
@
#------------------------------------------------------------------------------
# $File: javascript,v 1.1 2012/06/16 13:30:36 christos Exp $
# javascript:  magic for javascript and node.js scripts.
#
0	search/1/w	#!/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/bin/nodejs		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/nodejs	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ node	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ nodejs	Node.js script text executable
!:mime application/javascript
@


1.1.1.1
log
@from ftp.astron.com
@
text
@@


1.1.1.1.36.1
log
@Merge changes from current as of 20200406
@
text
@d3 1
a3 1
# $File: javascript,v 1.2 2019/08/05 10:34:26 christos Exp $
a17 5
# Hermes by Facebook https://hermesengine.dev/
# https://github.com/facebook/hermes/blob/master/include/hermes/\
# BCGen/HBC/BytecodeFileFormat.h#L24
0	lequad		0x1F1903C103BC1FC6	Hermes JavaScript bytecode
>8	lelong		x			\b, version %d
@


1.1.1.2
log
@Import 5.38:
	- Always accept -S (no sandbox) even if we don't support sandboxing
	- More syscalls elided for sandboxiing
	- For ELF dynamic means having an interpreter not just PT_DYNAMIC
	- Check for large ELF session header offset
	- When saving and restoring a locale, keep the locale name in our
	  own storage.
	- Add a flag to disable CSV file detection.
	- Don't pass NULL/0 to memset to appease sanitizers.
	- Avoid spurious prints when looks for extensions or apple strings
	  in fsmagic.
	- Add builtin decompressors for xz and and bzip.
	- Add a limit for the number of CDF elements.
	- More checks for overflow in CDF.
@
text
@d3 1
a3 1
# $File: javascript,v 1.2 2019/08/05 10:34:26 christos Exp $
a17 5
# Hermes by Facebook https://hermesengine.dev/
# https://github.com/facebook/hermes/blob/master/include/hermes/\
# BCGen/HBC/BytecodeFileFormat.h#L24
0	lequad		0x1F1903C103BC1FC6	Hermes JavaScript bytecode
>8	lelong		x			\b, version %d
@


1.1.1.3
log
@Import file-5.43+; last was file-5.40

2022-09-20  17:12  Christos Zoulas <christos@@zoulas.com>

	* fixed various clustefuzz issues

2022-09-19  15:54  Christos Zoulas <christos@@zoulas.com>

	* Fix error detection for decompression code (Vincent Mihalkovic)

2022-09-15  13:50  Christos Zoulas <christos@@zoulas.com>

	* Add MAGIC_NO_COMPRESS_FORK and use it to produce a more
	  meaningful error message if we are sandboxing.

2022-09-15  10:45  Christos Zoulas <christos@@zoulas.com>

	* Add built-in lzip decompression support (Michal Gorny)

2022-09-14  10:35  Christos Zoulas <christos@@zoulas.com>

	* Add built-in zstd decompression support (Martin Rodriguez Reboredo)

2022-09-13  14:55  Christos Zoulas <christos@@zoulas.com>

	* release 5.43

2022-09-10   9:17  Christos Zoulas <christos@@zoulas.com>

	* Add octal indirect magic (Michal Gorny)

2022-08-17  11:43  Christos Zoulas <christos@@zoulas.com>

	* PR/374: avoid infinite loop in non-wide code (piru)
	* PR/373: Obey MAGIC_CONTINUE with multiple magic files (vismarli)

2022-07-26  11:10  Christos Zoulas <christos@@zoulas.com>

	* Fix bug with large flist (Florian Weimer)

2022-07-07  13:21  Christos Zoulas <christos@@zoulas.com>

        * PR/364: Detect non-nul-terminated core filenames from QEMU
	  (mam-ableton)

2022-07-04  15:45  Christos Zoulas <christos@@zoulas.com>

	* PR/359: Add support for http://ndjson.org/ (darose)
	* PR/362: Fix wide printing (ro-ee)
	* PR/358: Fix width for -f - (jpalus)
	* PR/356: Fix JSON constant parsing (davewhite)

2022-06-10   9:40  Christos Zoulas <christos@@zoulas.com>

	* release 5.42

2022-05-31  14:50   Christos Zoulas <christos@@zoulas.com>

	* PR/348: add missing cases to prevent file from aborting on
	  random magic files.

2022-05-27  21:05   Christos Zoulas <christos@@zoulas.com>

	* PR/351: octalify filenames when not raw before printing.

2022-04-18  17:51   Christos Zoulas <christos@@zoulas.com>

	* fix regex cacheing bug (Dirk Mueller)
	* merge file_regcomp and file_regerror() to simplify the code
	  and reduce memory requirements for storing regexes (Dirk Mueller)

2022-03-19  12:56   Christos Zoulas <christos@@zoulas.com>

	* cache regex (Dirk Mueller)
	* detect filesystem full by flushing output (Dirk Mueller)

2021-11-19  12:36   Christos Zoulas <christos@@zoulas.com>

	* implement running decompressor programs using
	  posix_spawnp(2) instead of vfork(2)

2021-10-24  11:51   Christos Zoulas <christos@@zoulas.com>

	* Add support for msdos dates and times

2021-10-20   9:55   Christos Zoulas <christos@@zoulas.com>

	* use the system byte swapping functions if available (Werner Fink)

2021-10-18  11:57  Christos Zoulas <christos@@zoulas.com>

	* release 5.41

2021-09-23  03:51  Christos Zoulas <christos@@zoulas.com>

	* Avinash Sonawane: Fix tzname detection

2021-09-03  09:17  Christos Zoulas <christos@@zoulas.com>

	* Fix relationship tests with "search" magic, don't short circuit
	  logic

2021-07-13  01:06  Christos Zoulas <christos@@zoulas.com>

	* Fix memory leak in compile mode

2021-07-01  03:51  Christos Zoulas <christos@@zoulas.com>

	* PR/272: kiefermat: Only set returnval = 1 when we printed something
	  (in all cases print or !print). This simplifies the logic and fixes
	  the issue in the PR with -k and --mime-type there was no continuation
	  printed before the default case.

2021-06-30  13:07  Christos Zoulas <christos@@zoulas.com>

	* PR/270: Don't translate unprintable characters in %s magic formats
	  when -r
	* PR/269: Avoid undefined behavior with clang (adding offset to NULL)

2021-05-09  18:38  Christos Zoulas <christos@@zoulas.com>

	* Add a new flag (f) that requires that the match is a full word,
	   not a partial word match.
	* Add varint types (unused)

2021-04-19  17:17  Christos Zoulas <christos@@zoulas.com>

	* PR/256: mutableVoid: If the file is less than 3 bytes, use the file
	  length to determine type
	* PR/259: aleksandr.v.novichkov: mime printing through indirect magic
	  is not taken into account, use match directly so that it does.

2021-04-04  17:02  Christos Zoulas <christos@@zoulas.com>

	* count the total bytes found not the total byte positions
	  in order to determine encoding (Anatol Belski)
@
text
@d3 1
a3 1
# $File: javascript,v 1.4 2022/09/02 08:08:17 christos Exp $
d6 1
a6 1
0	string/w	#!/bin/node		Node.js script text executable
d8 1
a8 1
0	string/w	#!/usr/bin/node		Node.js script text executable
d10 1
a10 1
0	string/w	#!/bin/nodejs		Node.js script text executable
d12 1
a12 1
0	string/w	#!/usr/bin/nodejs	Node.js script text executable
d14 1
a14 1
0	string		#!/usr/bin/env\ node	Node.js script text executable
d16 1
a16 1
0	string		#!/usr/bin/env\ nodejs	Node.js script text executable
a22 99

# v8 JavaScript engine bytecode
# From: Alexandre Iooss <erdnaxe@@crans.org>
# URL:	https://v8.dev/docs/ignition
# Note: used in bytenode and NW.js protected source code
# V8 bytecode extraction was added in NodeJS v5.7.0 (V8 4.6.85.31).
# Version information is provided for some v8 versions found in NodeJS releases.
2	uleshort		=0xC0DE
>0	ulelong^0xC0DE0000	>0
# Reservation table starts at 40
>>40	ulelong&0xFFFFFF00	=0x80000000
# Stub keys present
>>>24	ulelong			>0
>>>>0	ulelong^0xC0DE0000	x		v8 bytecode, external reference table size: %u bytes,
>>>>4	ulelong			=0xEE4BF478	version 5.1.281.111,
>>>>4	ulelong			=0xC4A0100C	version 5.5.372.43,
>>>>8	ulelong			x		source size: %u bytes,
>>>>12	ulelong			x		cpu features: %#08X,
>>>>16	ulelong			x		flag hash: %#08X,
>>>>20	ulelong			x		%u reservations,
>>>>28	ulelong			x		payload size: %u bytes,
>>>>32	ulelong			x		checksum1: %#08X,
>>>>36	ulelong			x		checksum2: %#08X
# No stub keys
>>>24	ulelong			=0
>>>>0	ulelong^0xC0DE0000	x		v8 bytecode, external reference table size: %u bytes,
>>>>4	ulelong			=0x54F0AD81	version 6.2.414.46,
>>>>4	ulelong			=0X7D1BF182	version 6.2.414.54,
>>>>4	ulelong			=0x35BA122E	version 6.2.414.77,
>>>>4	ulelong			=0X9319F9C2	version 6.2.414.78,
>>>>4	ulelong			=0xB1240060	version 6.6.346.32,
>>>>4	ulelong			=0x2B757060	version 6.7.288.46,
>>>>4	ulelong			=0x09D147AA	version 6.7.288.49,
>>>>4	ulelong			=0xF4D4F48A	version 6.8.275.32,
>>>>4	ulelong			=0xD3961326	version 7.0.276.38,
>>>>8	ulelong			x		source size: %u bytes,
>>>>12	ulelong			x		cpu features: %#08X,
>>>>16	ulelong			x		flag hash: %#08X,
>>>>20	ulelong			x		%u reservations,
>>>>28	ulelong			x		payload size: %u bytes,
>>>>32	ulelong			x		checksum1: %#08X,
>>>>36	ulelong			x		checksum2: %#08X
# Reservation table starts at 32
>>32	ulelong&0xFFFFFF00	=0x80000000
# Second checksum present
>>>28	ulelong			>0
>>>>0	ulelong^0xC0DE0000	x		v8 bytecode, external reference table size: %u bytes,
>>>>4	ulelong			=0x21DDF627	version 7.4.288.21,
>>>>4	ulelong			=0x1FC9FE84	version 7.4.288.27,
>>>>4	ulelong			=0x60A99E8B	version 7.5.288.22,
>>>>4	ulelong			=0x4F665E90	version 7.6.303.29,
>>>>4	ulelong			=0xC7ACFCDE	version 7.7.299.11,
>>>>4	ulelong			=0x7F641D8F	version 7.7.299.13,
>>>>4	ulelong			=0xFD9A4F2E	version 7.8.279.17,
>>>>4	ulelong			=0x3A845324	version 7.8.279.23,
>>>>4	ulelong			=0xFF52FEAF	version 7.9.317.25,
>>>>8	ulelong			x		source size: %u bytes,
>>>>12	ulelong			x		flag hash: %#08X,
>>>>16	ulelong			x		%u reservations,
>>>>20	ulelong			x		payload size: %u bytes,
>>>>24	ulelong			x		checksum1: %#08X,
>>>>28	ulelong			x		checksum2: %#08X
# No second checksum
>>>28	ulelong			=0
>>>>0	ulelong^0xC0DE0000	x		v8 bytecode, external reference table size: %u bytes,
>>>>4	ulelong			=0x8725E0F8	version 8.1.307.30,
>>>>4	ulelong			=0x09ED1289	version 8.1.307.31,
>>>>4	ulelong			=0xA5728C87	version 8.3.110.9,
>>>>4	ulelong			=0xB45C5D30	version 8.4.371.23,
>>>>4	ulelong			=0xED9C278B	version 8.4.371.19,
>>>>4	ulelong			=0xD27BFF42	version 8.6.395.16,
>>>>8	ulelong			x		source size: %u bytes,
>>>>12	ulelong			x		flag hash: %#08X,
>>>>16	ulelong			x		%u reservations,
>>>>20	ulelong			x		payload size: %u bytes,
>>>>24	ulelong			x		payload checksum: %#08X
# No reservation table and code starts at 24
>>32	ulelong		=0
>>>0	ulelong^0xC0DE0000	x		v8 bytecode, external reference table size: %u bytes,
>>>4	ulelong			=0x9A6F0B0F	version 9.0.257.17,
>>>4	ulelong			=0x271D5D1E	version 9.0.257.24,
>>>4	ulelong			=0x4EEA75DF	version 9.0.257.25,
>>>4	ulelong			=0x80809479	version 9.1.269.36,
>>>4	ulelong			=0x55C46F65	version 9.1.269.38,
>>>4	ulelong			=0x8A9C758A	version 9.2.230.21,
>>>4	ulelong			=0x9712F0E1	version 9.3.345.16,
>>>4	ulelong			=0x29593715	version 9.4.146.19,
>>>4	ulelong			=0xCD991825	version 9.4.146.24,
>>>4	ulelong			=0xACDD64EE	version 9.4.146.26,
>>>4	ulelong			=0xC96B4CD5	version 9.5.172.21,
>>>4	ulelong			=0xBCCE4578	version 9.5.172.25,
>>>4	ulelong			=0xA2EEA077	version 9.6.180.15,
>>>4	ulelong			=0xFD350011	version 10.1.124.8,
>>>4	ulelong			=0xBEF4028F	version 10.2.154.13,
>>>4	ulelong			=0xAF632352	version 10.2.154.4,
>>>8	ulelong			x		source size: %u bytes,
>>>12	ulelong			x		flag hash: %#08X,
>>>16	ulelong			x		payload size: %u bytes,
>>>20	ulelong			x		payload checksum: %#08X
@


1.1.1.4
log
@Update to file-5.45 (Last was file-5.44)

2023-07-27  15:45  Christos Zoulas <christos@@zoulas.com>

	* release 5.45

2023-07-17  11:53  Christos Zoulas <christos@@zoulas.com>

	* PR/465: psrok1: Avoid muslc asctime_r crash

2023-05-21  13:05  Christos Zoulas <christos@@zoulas.com>

	* add SIMH tape format support

2023-02-09  12:50  Christos Zoulas <christos@@zoulas.com>

	* bump the max size of the elf section notes to be read to 128K
	  and make it configurable

2023-01-08   1:08  Christos Zoulas <christos@@zoulas.com>

	* PR/415: Fix decompression with program returning empty

2022-12-26   1:47  Christos Zoulas <christos@@zoulas.com>

	* PR/408: fix -p with seccomp
	* PR/412: fix MinGW compilation
@
text
@d3 1
a3 1
# $File: javascript,v 1.5 2023/01/12 00:02:16 christos Exp $
d6 1
a6 1
0	string/tw	#!/bin/node		Node.js script executable
d8 1
a8 1
0	string/tw	#!/usr/bin/node		Node.js script executable
d10 1
a10 1
0	string/tw	#!/bin/nodejs		Node.js script executable
d12 1
a12 1
0	string/tw	#!/usr/bin/nodejs	Node.js script executable
d14 1
a14 1
0	string/t		#!/usr/bin/env\ node	Node.js script executable
d16 1
a16 1
0	string/t		#!/usr/bin/env\ nodejs	Node.js script executable
a17 50

# JavaScript
# The strength is increased to beat the C++ & HTML rules
0	search	"use\x20strict"	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	search	'use\x20strict'	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	module(\\.|\\[["'])exports.*=	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\^(const|var|let).*=.*require\\(	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\^export\x20(function|class|default|const|var|let|async)\x20	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\\((async\x20)?function[(\x20]	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\^(import|export).*\x20from\x20	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\^(import|export)\x20["']\\./	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	\^require\\(["']	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js
0	regex	typeof.*[!=]==	JavaScript source
!:strength +30
!:mime	application/javascript
!:ext 	js

# React Native minified JavaScript
0	search/128	__BUNDLE_START_TIME__=	React Native minified JavaScript
!:strength +30
!:mime	application/javascript
!:ext	bundle/jsbundle

@


1.1.1.1.6.1
log
@file javascript was added on branch tls-maxphys on 2013-02-25 00:26:06 +0000
@
text
@d1 17
@


1.1.1.1.6.2
log
@resync with head
@
text
@a0 17

#------------------------------------------------------------------------------
# $File: javascript,v 1.1 2012/06/16 13:30:36 christos Exp $
# javascript:  magic for javascript and node.js scripts.
#
0	search/1/w	#!/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/bin/nodejs		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/nodejs	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ node	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ nodejs	Node.js script text executable
!:mime application/javascript
@


1.1.1.1.2.1
log
@file javascript was added on branch yamt-pagecache on 2013-01-23 00:04:35 +0000
@
text
@d1 17
@


1.1.1.1.2.2
log
@sync with head
@
text
@a0 17

#------------------------------------------------------------------------------
# $File: javascript,v 1.1 2012/06/16 13:30:36 christos Exp $
# javascript:  magic for javascript and node.js scripts.
#
0	search/1/w	#!/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/node		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/bin/nodejs		Node.js script text executable
!:mime application/javascript
0	search/1/w	#!/usr/bin/nodejs	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ node	Node.js script text executable
!:mime application/javascript
0	search/1	#!/usr/bin/env\ nodejs	Node.js script text executable
!:mime application/javascript
@


